mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-11-11 05:17:43 +08:00
Add the experimental forge capability seam: - dsh-experimental-forge: provider-neutral repository and change request references, a provider registry, and shared status polling. Watchers of one change request share one loop; each forge has one batched fetch in flight, and the cadence follows check, mergeability, and lifecycle state. - dsh-experimental-forge-github: GitHub provider that runs the GitHub CLI on the host with a scrubbed environment and reads every due pull request of a host in one GraphQL query. - dsh-experimental-forge-session: a host-only projection derives Session bindings from gh pr create and git push shell results and from plugin:forge-session/binding records; push results trigger head-branch discovery of open pull requests, and Session watchers poll bound change requests through ctx.forge.
16 lines
682 B
TypeScript
16 lines
682 B
TypeScript
/** Canonical identities for change requests. */
|
|
|
|
import { brandString } from '@deepseek-ai/dsh-brand'
|
|
import type { ChangeRequestKey, ChangeRequestRef } from './types.ts'
|
|
|
|
/**
|
|
* Build the canonical identity of a change request. Host, owner, and name
|
|
* compare case-insensitively, as they do on the hosts this vocabulary serves.
|
|
* @param ref - change request to identify.
|
|
* @returns `<forge>:<host>/<owner>/<name>#<number>` in lowercase.
|
|
*/
|
|
export function changeRequestKey(ref: ChangeRequestRef): ChangeRequestKey {
|
|
const { forge, host, owner, name } = ref.repository
|
|
return brandString<ChangeRequestKey>(`${forge}:${host}/${owner}/${name}#${ref.number}`.toLowerCase())
|
|
}
|