@agimon-ai/po-core 0.0.0-alpha.119 → 0.0.0-alpha.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apiContracts.d.mts +30 -0
- package/dist/apiContracts.d.mts.map +1 -1
- package/dist/src/schemas/workflow.cjs +6 -0
- package/dist/src/schemas/workflow.cjs.map +1 -1
- package/dist/src/schemas/workflow.d.mts +32 -0
- package/dist/src/schemas/workflow.d.mts.map +1 -1
- package/dist/src/schemas/workflow.mjs +5 -1
- package/dist/src/schemas/workflow.mjs.map +1 -1
- package/dist/workflow.cjs +2 -0
- package/dist/workflow.d.mts +2 -2
- package/dist/workflow.mjs +1 -1
- package/package.json +4 -4
package/dist/apiContracts.d.mts
CHANGED
|
@@ -555,6 +555,8 @@ interface PoWorkflowLaunchOverrides {
|
|
|
555
555
|
readonly env?: Readonly<Record<string, string>>;
|
|
556
556
|
readonly prompt?: string;
|
|
557
557
|
readonly name?: string;
|
|
558
|
+
/** Team whose members role-bound jobs resolve to, instead of the workflow's default team. */
|
|
559
|
+
readonly team?: string;
|
|
558
560
|
}
|
|
559
561
|
/** Session-owned. Rejection means no observable registration was accepted. */
|
|
560
562
|
interface PoWorkflowLaunchService {
|
|
@@ -814,6 +816,33 @@ interface PoWorkflowContextService {
|
|
|
814
816
|
readonly state: PoWorkflowRunsService;
|
|
815
817
|
readonly children?: PoWorkflowChildrenSession;
|
|
816
818
|
}
|
|
819
|
+
interface PoWorkflowIdentityRequest {
|
|
820
|
+
readonly team: string;
|
|
821
|
+
/** Every role the job declares; all of them must belong to one member. */
|
|
822
|
+
readonly roles: readonly string[];
|
|
823
|
+
}
|
|
824
|
+
/** One member a job was admitted as. Kept in run state, so it carries names and digests, never secrets. */
|
|
825
|
+
interface PoWorkflowIdentityBinding {
|
|
826
|
+
readonly team: string;
|
|
827
|
+
readonly teamRevision: string;
|
|
828
|
+
readonly product?: string;
|
|
829
|
+
readonly roles: readonly string[];
|
|
830
|
+
/** Stable across machines; the local profile name may differ between them. */
|
|
831
|
+
readonly ref: string;
|
|
832
|
+
readonly profile: string;
|
|
833
|
+
readonly contentDigest: string;
|
|
834
|
+
readonly policyDigest: string;
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* Resolves role-bound workflow jobs to team members. Bound per workspace by the package that owns
|
|
838
|
+
* profiles and teams; the workspace comes from that scope, never from workflow input. Both calls
|
|
839
|
+
* throw, without naming secrets, when no single authorized member qualifies.
|
|
840
|
+
*/
|
|
841
|
+
interface PoWorkflowIdentityService {
|
|
842
|
+
resolve(request: PoWorkflowIdentityRequest): Promise<PoWorkflowIdentityBinding>;
|
|
843
|
+
/** Rechecks a saved binding against the current team and authorization, returning it as it stands now. */
|
|
844
|
+
revalidate(binding: PoWorkflowIdentityBinding): Promise<PoWorkflowIdentityBinding>;
|
|
845
|
+
}
|
|
817
846
|
declare module '@deepseek-ai/cordis' {
|
|
818
847
|
interface Context {
|
|
819
848
|
'po/workflow-launch': PoWorkflowLaunchService;
|
|
@@ -821,6 +850,7 @@ declare module '@deepseek-ai/cordis' {
|
|
|
821
850
|
'po/workflow-runs': PoWorkflowRunsService;
|
|
822
851
|
'po/workflow-context': PoWorkflowContextService;
|
|
823
852
|
'po/workflow-admissions': PoWorkflowAdmissionsService;
|
|
853
|
+
'po/workflow-identity': PoWorkflowIdentityService;
|
|
824
854
|
}
|
|
825
855
|
}
|
|
826
856
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiContracts.d.mts","names":["_0","_0","_0","_0","IoContext","_0","_$__hubChannel0.PoHubSessionUsage","_0","_$__protocolContracts0.ChordMethods"],"sources":["../src/schemas/serverBundle.ts","../src/schemas/brain.ts","../src/schemas/serverScope.ts","../src/schemas/approvalPrompt.ts","../src/schemas/approval.ts","../src/schemas/backgroundWork.ts","../src/schemas/notification.ts","../src/schemas/platform.ts","../src/schemas/workflow.ts","../src/schemas/hubChannel.ts","../src/schemas/packageApi.ts","../src/schemas/apiContracts.ts","../src/services/apiContracts/index.ts","../src/schemas/builtinApiContracts.ts","../src/schemas/httpApiContracts.ts","../src/schemas/protocolContracts.ts","../src/schemas/sessionProtocol.ts","../src/schemas/sessionApiContracts.ts","../src/schemas/transportApiContracts.ts"],"mappings":";;;;;;;;;;;;UAKiB;WACN;WACA;;UAGM;WACN;;WAEA;;WAEA,cAAc;;WAEd,iBAAiB;;WAEjB,cAAc;;WAEd;;WAEA;WACA,iBAAiB;WACjB,iBAAiB;WACjB;;;;;UCtBM;EACf;EACA,OAAO;;UAGQ;EACf;EACA;EACA,QAAQ,YAAY;;UAGL;EACf;EACA;EACA,OAAO;EACP,aAAa;EACb,OAAO;EACP;EACA;;UAGe;EACf;EACA;EACA,OAAO;EACP,OAAO;;;UAIQ;EACf;EACA;EACA;EACA;;UAGe;EACf,OAAO;EACP,OAAO;EACP,KAAK;;EAEL,SAAS;;UAGM;EACf,OAAO;EACP,QAAQ;EACR,UAAU;;EAEV,iBAAiB;EACjB,UAAU;EACV,WAAW;EACX,OAAO;EACP;;;UA+Be;EACf;EACA;IACE;IACA,OAAO;IACP;IACA;IACA;;EAEF;IACE;IACA;IACA,OAAO;IACP;;EAEF;;;;;UCrFe,kBAAkB;WACxB;WACA,OAAO;;WAEP;;WAEA,QAAQ;;;KAeP;;UAoBK,sBAAsB;WAC5B,OAAO;EAChB,WAAW;;;UAII,oBAAoB;EACnC,QAAQ,GACN,KAAK,qBACL,cAAc,IAAI,QAAQ,IAC1B,WAAW,OAAO,aAAa,gBAC9B,QAAQ,sBAAsB;;EAEjC,IAAI,OAAO;;EAEX,MAAM,MAAM,sBAAsB;;;UA0BnB;WACN,OAAO;;EAEhB,YAAY;;;;;;EAMZ,QAAQ,GAAG,UAAU,kBAAkB,IAAI,OAAO,IAAI,cAAc;;EAEpE,QAAQ,GAAG,UAAU,kBAAkB,KAAK;;EAE5C,KAAK,gBAAgB,QAAQ,MAAM,MAAM,MAAM,WAAW,OAAO;;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_0","_0","IoContext","_0","_$__hubChannel0.PoHubSessionUsage","_0","_$__protocolContracts0.ChordMethods"],"sources":["../src/schemas/serverBundle.ts","../src/schemas/brain.ts","../src/schemas/serverScope.ts","../src/schemas/approvalPrompt.ts","../src/schemas/approval.ts","../src/schemas/backgroundWork.ts","../src/schemas/notification.ts","../src/schemas/platform.ts","../src/schemas/workflow.ts","../src/schemas/hubChannel.ts","../src/schemas/packageApi.ts","../src/schemas/apiContracts.ts","../src/services/apiContracts/index.ts","../src/schemas/builtinApiContracts.ts","../src/schemas/httpApiContracts.ts","../src/schemas/protocolContracts.ts","../src/schemas/sessionProtocol.ts","../src/schemas/sessionApiContracts.ts","../src/schemas/transportApiContracts.ts"],"mappings":";;;;;;;;;;;;UAKiB;WACN;WACA;;UAGM;WACN;;WAEA;;WAEA,cAAc;;WAEd,iBAAiB;;WAEjB,cAAc;;WAEd;;WAEA;WACA,iBAAiB;WACjB,iBAAiB;WACjB;;;;;UCtBM;EACf;EACA,OAAO;;UAGQ;EACf;EACA;EACA,QAAQ,YAAY;;UAGL;EACf;EACA;EACA,OAAO;EACP,aAAa;EACb,OAAO;EACP;EACA;;UAGe;EACf;EACA;EACA,OAAO;EACP,OAAO;;;UAIQ;EACf;EACA;EACA;EACA;;UAGe;EACf,OAAO;EACP,OAAO;EACP,KAAK;;EAEL,SAAS;;UAGM;EACf,OAAO;EACP,QAAQ;EACR,UAAU;;EAEV,iBAAiB;EACjB,UAAU;EACV,WAAW;EACX,OAAO;EACP;;;UA+Be;EACf;EACA;IACE;IACA,OAAO;IACP;IACA;IACA;;EAEF;IACE;IACA;IACA,OAAO;IACP;;EAEF;;;;;UCrFe,kBAAkB;WACxB;WACA,OAAO;;WAEP;;WAEA,QAAQ;;;KAeP;;UAoBK,sBAAsB;WAC5B,OAAO;EAChB,WAAW;;;UAII,oBAAoB;EACnC,QAAQ,GACN,KAAK,qBACL,cAAc,IAAI,QAAQ,IAC1B,WAAW,OAAO,aAAa,gBAC9B,QAAQ,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AA,KAAA,QAAA,KAAA,eAAA,KAAA,UAAA,KAAA,OAAA,KAAA,QAAA,KAAA,SAAA,KAAA;;qBAqCjB,wBAAsB,KAAA,QAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAwBtB,wBAAsB,KAAA,QAAA,KAAA"}
|
|
@@ -5,6 +5,7 @@ const PO_WORKFLOW_DEFINITION_SOURCES_SERVICE = "po/workflow-definition-sources";
|
|
|
5
5
|
const PO_WORKFLOW_RUNS_SERVICE = "po/workflow-runs";
|
|
6
6
|
const PO_WORKFLOW_CONTEXT_SERVICE = "po/workflow-context";
|
|
7
7
|
const PO_WORKFLOW_ADMISSIONS_SERVICE = "po/workflow-admissions";
|
|
8
|
+
const PO_WORKFLOW_IDENTITY_SERVICE = "po/workflow-identity";
|
|
8
9
|
/** A source-relative definition, never an arbitrary host path. */
|
|
9
10
|
const PoWorkflowDefinitionRefSchema = typebox.Type.Object({
|
|
10
11
|
source: typebox.Type.String({ minLength: 1 }),
|
|
@@ -35,10 +36,14 @@ function readPoWorkflowContextService(context) {
|
|
|
35
36
|
function readPoWorkflowAdmissionsService(context) {
|
|
36
37
|
return context.get(PO_WORKFLOW_ADMISSIONS_SERVICE);
|
|
37
38
|
}
|
|
39
|
+
function readPoWorkflowIdentityService(context) {
|
|
40
|
+
return context.get(PO_WORKFLOW_IDENTITY_SERVICE);
|
|
41
|
+
}
|
|
38
42
|
//#endregion
|
|
39
43
|
exports.PO_WORKFLOW_ADMISSIONS_SERVICE = PO_WORKFLOW_ADMISSIONS_SERVICE;
|
|
40
44
|
exports.PO_WORKFLOW_CONTEXT_SERVICE = PO_WORKFLOW_CONTEXT_SERVICE;
|
|
41
45
|
exports.PO_WORKFLOW_DEFINITION_SOURCES_SERVICE = PO_WORKFLOW_DEFINITION_SOURCES_SERVICE;
|
|
46
|
+
exports.PO_WORKFLOW_IDENTITY_SERVICE = PO_WORKFLOW_IDENTITY_SERVICE;
|
|
42
47
|
exports.PO_WORKFLOW_LAUNCH_SERVICE = PO_WORKFLOW_LAUNCH_SERVICE;
|
|
43
48
|
exports.PO_WORKFLOW_RUNS_SERVICE = PO_WORKFLOW_RUNS_SERVICE;
|
|
44
49
|
exports.PoWorkflowDefinitionRefSchema = PoWorkflowDefinitionRefSchema;
|
|
@@ -46,6 +51,7 @@ exports.PoWorkflowRunRefSchema = PoWorkflowRunRefSchema;
|
|
|
46
51
|
exports.readPoWorkflowAdmissionsService = readPoWorkflowAdmissionsService;
|
|
47
52
|
exports.readPoWorkflowContextService = readPoWorkflowContextService;
|
|
48
53
|
exports.readPoWorkflowDefinitionSourcesService = readPoWorkflowDefinitionSourcesService;
|
|
54
|
+
exports.readPoWorkflowIdentityService = readPoWorkflowIdentityService;
|
|
49
55
|
exports.readPoWorkflowLaunchService = readPoWorkflowLaunchService;
|
|
50
56
|
exports.readPoWorkflowRunsService = readPoWorkflowRunsService;
|
|
51
57
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.cjs","names":["Type"],"sources":["../../../src/schemas/workflow.ts"],"sourcesContent":["import type { Context } from '@deepseek-ai/cordis';\nimport { type Static, Type } from 'typebox';\n\nexport const PO_WORKFLOW_LAUNCH_SERVICE = 'po/workflow-launch';\nexport const PO_WORKFLOW_DEFINITION_SOURCES_SERVICE = 'po/workflow-definition-sources';\nexport const PO_WORKFLOW_RUNS_SERVICE = 'po/workflow-runs';\nexport const PO_WORKFLOW_CONTEXT_SERVICE = 'po/workflow-context';\nexport const PO_WORKFLOW_ADMISSIONS_SERVICE = 'po/workflow-admissions';\n\n/** A source-relative definition, never an arbitrary host path. */\nexport const PoWorkflowDefinitionRefSchema = Type.Object(\n {\n source: Type.String({ minLength: 1 }),\n key: Type.String({\n minLength: 1,\n pattern: '^(?!/)(?!.*\\\\\\\\)(?!.*:)(?!.*[\\\\u0000-\\\\u001f\\\\u007f])(?!.*(?:^|/)\\\\.{1,2}(?:/|$))[^/]+(?:/[^/]+)*$',\n }),\n },\n { additionalProperties: false },\n);\nexport type PoWorkflowDefinitionRef = Static<typeof PoWorkflowDefinitionRefSchema>;\n\n/** Registration receipt. runId fences a runKey that can be reused later. */\nexport const PoWorkflowRunRefSchema = Type.Object(\n {\n runId: Type.String({ minLength: 1 }),\n ownerSessionId: Type.String({ minLength: 1 }),\n runKey: Type.String({ minLength: 1 }),\n registryWorkspace: Type.String({ minLength: 1 }),\n },\n { additionalProperties: false },\n);\nexport type PoWorkflowRunRef = Static<typeof PoWorkflowRunRefSchema>;\n\nexport interface PoWorkflowLaunchOverrides {\n readonly runner?: string;\n readonly command?: string;\n readonly choice?: string;\n readonly job?: string;\n readonly inputs?: Readonly<Record<string, string>>;\n readonly env?: Readonly<Record<string, string>>;\n readonly prompt?: string;\n readonly name?: string;\n}\n\n/** Session-owned. Rejection means no observable registration was accepted. */\nexport interface PoWorkflowLaunchService {\n launch(definition: PoWorkflowDefinitionRef, overrides?: PoWorkflowLaunchOverrides): Promise<PoWorkflowRunRef>;\n}\n\n/** Non-secret host association. Environment variables never establish this binding. */\nexport interface PoWorkflowPolicyAssociation {\n readonly coordinator: string;\n readonly key: string;\n}\n\n/** Independent of runId and executionGeneration, including continue-next resumes. */\nexport interface PoWorkflowOperationEpoch {\n readonly admissionId: string;\n readonly operationId: string;\n}\n\nexport interface PoWorkflowPolicyBinding {\n readonly association: PoWorkflowPolicyAssociation;\n readonly epoch: PoWorkflowOperationEpoch;\n}\n\nexport interface PoWorkflowExecutionPolicyRequest {\n readonly binding: PoWorkflowPolicyBinding;\n readonly reason: 'launch' | 'recover' | 'startup' | 'resume';\n readonly ownerSessionId: string;\n readonly launcherSessionId: string;\n /** The engine supplies the actual persisted run after createRun, including startup and recovery. */\n readonly run?: PoWorkflowRunRef;\n readonly previousRun?: PoWorkflowRunRef;\n /** Ephemeral host lifetime, never persisted. */\n readonly signal: AbortSignal;\n}\n\nexport interface PoWorkflowExecutionPolicyResult {\n /** Trusted non-secret context only. PO_* and WORKFLOW_* engine identity keys are forbidden. */\n readonly environment?: Readonly<Record<string, string>>;\n}\n\n/**\n * How a bound generation ended. `abandoned` is a person giving up a failed run: it is never recovered.\n * A coordinator releases what it holds for success, skipped and abandoned, and keeps it for failed and\n * interrupted so a recovery of the run reuses it.\n */\nexport type PoWorkflowSettlementOutcome = PoWorkflowOutcome | 'abandoned';\n\nexport interface PoWorkflowSettlementRequest {\n readonly binding: PoWorkflowPolicyBinding;\n readonly run: PoWorkflowRunRef;\n readonly outcome: PoWorkflowSettlementOutcome;\n readonly failedJob?: string;\n readonly ownerSessionId: string;\n readonly launcherSessionId: string;\n /** Ephemeral host lifetime, never persisted. */\n readonly signal: AbortSignal;\n}\n\nexport interface PoWorkflowPolicyOptions {\n readonly environmentKeys: readonly string[];\n /**\n * Called once a bound generation is terminal, and again with `abandoned` if a person abandons it.\n * Delivery is durable: the engine retries until this resolves, including after a restart or a\n * remount, so it must be idempotent. Throwing leaves the settlement pending.\n */\n readonly settle?: (request: PoWorkflowSettlementRequest) => Promise<void>;\n}\n\nexport interface PoWorkflowAdmissionOverrides extends PoWorkflowLaunchOverrides {\n readonly policy?: PoWorkflowPolicyAssociation;\n /**\n * Run the workflow as this same-workspace session instead of the caller, for example a session in an\n * isolated checkout. Trusted in-process launchers only: never accepted from tools, code mode or HTTP.\n */\n readonly targetSessionId?: string;\n}\n\nexport interface PoWorkflowRecoveryOptions {\n readonly runner?: string;\n}\n\nexport type PoWorkflowAdmissionRequest =\n | {\n readonly kind: 'launch';\n readonly definition: PoWorkflowDefinitionRef;\n readonly overrides?: PoWorkflowAdmissionOverrides;\n }\n | { readonly kind: 'recover'; readonly previousRun: PoWorkflowRunRef; readonly options?: PoWorkflowRecoveryOptions };\n\nexport interface PoWorkflowValidationReport {\n readonly errors: readonly { readonly code: string; readonly message: string; readonly location?: string }[];\n readonly warnings: readonly { readonly code: string; readonly message: string; readonly location?: string }[];\n readonly deferred: readonly { readonly location: string; readonly reference: string; readonly reason: string }[];\n /** Declared by the definition and reported only: the engine never provisions a checkout itself. */\n readonly isolation?: 'checkout';\n}\n\nexport type PoWorkflowAdmission =\n | {\n readonly attemptId: string;\n readonly admissionId: string;\n readonly state: 'pending';\n readonly binding?: PoWorkflowPolicyBinding;\n }\n | {\n readonly attemptId: string;\n readonly admissionId: string;\n readonly state: 'rejected';\n readonly errors: readonly string[];\n }\n | {\n readonly attemptId: string;\n readonly admissionId: string;\n readonly state: 'registered';\n readonly run: PoWorkflowRunRef;\n readonly binding?: PoWorkflowPolicyBinding;\n };\n\n/** Trusted, session-bound opt-in capability, never exposed as a tool or code-mode namespace. */\nexport interface PoWorkflowAdmissionsService {\n validate(request: PoWorkflowAdmissionRequest): Promise<PoWorkflowValidationReport>;\n launch(\n attemptId: string,\n definition: PoWorkflowDefinitionRef,\n overrides?: PoWorkflowAdmissionOverrides,\n ): Promise<PoWorkflowAdmission>;\n recover(\n attemptId: string,\n previousRun: PoWorkflowRunRef,\n options?: PoWorkflowRecoveryOptions,\n ): Promise<PoWorkflowAdmission>;\n /** Undefined is unknown or unauthorized, never proof that an executor did not start. */\n read(attemptId: string): Promise<PoWorkflowAdmission | undefined>;\n /** Session-owned registration. Duplicate (source session, coordinator) is rejected.\n * Disposal is generation-fenced. Remounting only reattaches; other sessions never supply this callback.\n * The engine persists the source launcher identity and never falls back to another session's policy.\n */\n registerPolicy(\n coordinator: string,\n beforeExecution: (request: PoWorkflowExecutionPolicyRequest) => Promise<PoWorkflowExecutionPolicyResult | void>,\n options: PoWorkflowPolicyOptions,\n ): { dispose(): void };\n}\nexport interface PoWorkflowDefinitionSource {\n readonly source: string;\n /** An admitted, materialized absolute directory. Registration does not fetch it. */\n readonly directory: string;\n}\n\nexport interface PoWorkflowDefinitionSourceHandle {\n readonly source: string;\n readonly generation: string;\n dispose(): void;\n}\n\n/** Workspace-owned registry. Disposal withdraws only the handle's registration. */\nexport interface PoWorkflowDefinitionSourcesService {\n register(contribution: PoWorkflowDefinitionSource): PoWorkflowDefinitionSourceHandle;\n list(): readonly PoWorkflowDefinitionSource[];\n subscribe(listener: (sources: readonly PoWorkflowDefinitionSource[]) => void): () => void;\n}\n\nexport type PoWorkflowStage = 'running' | 'completed' | 'error';\nexport type PoWorkflowOutcome = 'success' | 'skipped' | 'failed' | 'interrupted';\nexport type PoWorkflowProgressState =\n | 'pending'\n | 'running'\n | 'completed'\n | 'skipped'\n | 'failed'\n | 'pause_requested'\n | 'paused'\n | 'resumed';\n\nexport interface PoWorkflowStepState {\n readonly name: string;\n readonly status: PoWorkflowProgressState;\n readonly ref?: { readonly kind: string; readonly id: string; readonly label?: string };\n readonly reason?: string;\n}\n\nexport interface PoWorkflowJobState {\n readonly name: string;\n readonly phase: 'pre' | 'job' | 'post';\n readonly status: PoWorkflowProgressState;\n readonly steps: readonly PoWorkflowStepState[];\n}\n\nexport interface PoWorkflowRunState {\n readonly run: PoWorkflowRunRef;\n readonly stage: PoWorkflowStage;\n readonly outcome?: PoWorkflowOutcome;\n /** From the same persisted snapshot as stage/outcome, never a newer cached operation. */\n readonly binding?: PoWorkflowPolicyBinding;\n readonly jobs: readonly PoWorkflowJobState[];\n readonly children?: readonly PoWorkflowChildrenStatus[];\n}\n\n/** The parsed definition actually used, not a re-read of mutable YAML on disk. */\nexport interface PoWorkflowConfig {\n readonly definition: PoWorkflowDefinitionRef;\n readonly revision: string;\n /** Engine-owned YAML vocabulary. Core does not import or implement the parser. */\n readonly workflow: Readonly<Record<string, unknown>>;\n}\n\n/** Owner-authoritative views, or an authorized projection for a launcher. */\nexport interface PoWorkflowRunsService {\n readConfig(runId: string): Promise<PoWorkflowConfig | undefined>;\n readState(runId: string): Promise<PoWorkflowRunState | undefined>;\n /** Replays the latest state, including terminal state, before subsequent updates. */\n subscribe(runId: string, listener: (state: PoWorkflowRunState) => void): () => void;\n}\n\nexport interface PoWorkflowChildInvocation {\n readonly invocationId: string;\n readonly job: string;\n readonly state: 'running' | 'completed' | 'failed' | 'interrupted';\n readonly sessionIds: readonly string[];\n readonly startedAt: string;\n readonly endedAt?: string;\n readonly error?: string;\n readonly usage?: import('./hubChannel').PoHubSessionUsage;\n}\n\nexport interface PoWorkflowCriterionState {\n readonly key: string;\n readonly description: string;\n readonly verifiedBy: string;\n readonly status: 'unchecked' | 'checked' | 'not-met';\n readonly feedback?: string;\n readonly invocationId?: string;\n}\n\nexport interface PoWorkflowChildrenStatus {\n readonly lead: string;\n readonly continuations: number;\n readonly maxContinuations: number;\n readonly criteria: readonly PoWorkflowCriterionState[];\n readonly invocations: readonly PoWorkflowChildInvocation[];\n}\n\n/** In-process, caller-bound capability. Never accepted from a tool or serialized. */\nexport interface PoWorkflowChildrenSession {\n readonly role: 'lead' | 'child' | 'consumer';\n spawnChild?(input: {\n job: string;\n prompt: string;\n inputs?: Record<string, string | number | boolean>;\n }): Promise<PoWorkflowChildInvocation>;\n childStatus?(input: { invocationId: string }): Promise<PoWorkflowChildInvocation>;\n children?(): Promise<PoWorkflowChildrenStatus>;\n reportCriteria?(input: {\n results: Record<string, { status: 'checked' | 'not-met'; feedback?: string }>;\n }): Promise<void>;\n /** Immutable pre-review snapshot selected by the runtime, not mutable paths. */\n reviewArtifacts?(): Promise<{ revision: string; artifacts: Readonly<Record<string, string>> }>;\n /** Returns exactly the accepted bytes, after a fresh authoritative ledger/revision check. */\n acceptedArtifacts?(input: {\n job: string;\n }): Promise<{ revision: string; artifacts: Readonly<Record<string, string>> }>;\n}\n\n/** Bound only in the trusted step-session bootstrap, before packages mount. */\nexport interface PoWorkflowContextService {\n readonly run: PoWorkflowRunRef;\n readonly job: string;\n readonly step: string;\n readonly attempt: number;\n readonly config: PoWorkflowConfig;\n readonly jobEnvironment: Readonly<Record<string, string>>;\n readonly stepEnvironment: Readonly<Record<string, string>>;\n readonly traceparent?: string;\n /** Absolute path of the workflow's instructions file, read in place of the discovered AGENTS.md files. */\n readonly instructions?: string;\n readonly state: PoWorkflowRunsService;\n readonly children?: PoWorkflowChildrenSession;\n}\n\n// These are in-process capabilities, not remote session-create fields or durable records.\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n 'po/workflow-launch': PoWorkflowLaunchService;\n 'po/workflow-definition-sources': PoWorkflowDefinitionSourcesService;\n 'po/workflow-runs': PoWorkflowRunsService;\n 'po/workflow-context': PoWorkflowContextService;\n 'po/workflow-admissions': PoWorkflowAdmissionsService;\n }\n}\n\nexport function readPoWorkflowLaunchService(context: Context): PoWorkflowLaunchService | undefined {\n return context.get(PO_WORKFLOW_LAUNCH_SERVICE) as PoWorkflowLaunchService | undefined;\n}\n\nexport function readPoWorkflowDefinitionSourcesService(\n context: Context,\n): PoWorkflowDefinitionSourcesService | undefined {\n return context.get(PO_WORKFLOW_DEFINITION_SOURCES_SERVICE) as PoWorkflowDefinitionSourcesService | undefined;\n}\n\nexport function readPoWorkflowRunsService(context: Context): PoWorkflowRunsService | undefined {\n return context.get(PO_WORKFLOW_RUNS_SERVICE) as PoWorkflowRunsService | undefined;\n}\n\nexport function readPoWorkflowContextService(context: Context): PoWorkflowContextService | undefined {\n return context.get(PO_WORKFLOW_CONTEXT_SERVICE) as PoWorkflowContextService | undefined;\n}\n\nexport function readPoWorkflowAdmissionsService(context: Context): PoWorkflowAdmissionsService | undefined {\n return context.get(PO_WORKFLOW_ADMISSIONS_SERVICE) as PoWorkflowAdmissionsService | undefined;\n}\n"],"mappings":";;AAGA,MAAa,6BAA6B;AAC1C,MAAa,yCAAyC;AACtD,MAAa,2BAA2B;AACxC,MAAa,8BAA8B;AAC3C,MAAa,iCAAiC;;AAG9C,MAAa,gCAAgCA,QAAAA,KAAK,OAChD;CACE,QAAQA,QAAAA,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CACpC,KAAKA,QAAAA,KAAK,OAAO;EACf,WAAW;EACX,SAAS;CACX,CAAC;AACH,GACA,EAAE,sBAAsB,MAAM,CAChC;;AAIA,MAAa,yBAAyBA,QAAAA,KAAK,OACzC;CACE,OAAOA,QAAAA,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CACnC,gBAAgBA,QAAAA,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CAC5C,QAAQA,QAAAA,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CACpC,mBAAmBA,QAAAA,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;AACjD,GACA,EAAE,sBAAsB,MAAM,CAChC;AA+SA,SAAgB,4BAA4B,SAAuD;CACjG,OAAO,QAAQ,IAAI,0BAA0B;AAC/C;AAEA,SAAgB,uCACd,SACgD;CAChD,OAAO,QAAQ,IAAI,sCAAsC;AAC3D;AAEA,SAAgB,0BAA0B,SAAqD;CAC7F,OAAO,QAAQ,IAAI,wBAAwB;AAC7C;AAEA,SAAgB,6BAA6B,SAAwD;CACnG,OAAO,QAAQ,IAAI,2BAA2B;AAChD;AAEA,SAAgB,gCAAgC,SAA2D;CACzG,OAAO,QAAQ,IAAI,8BAA8B;AACnD"}
|
|
1
|
+
{"version":3,"file":"workflow.cjs","names":["Type"],"sources":["../../../src/schemas/workflow.ts"],"sourcesContent":["import type { Context } from '@deepseek-ai/cordis';\nimport { type Static, Type } from 'typebox';\n\nexport const PO_WORKFLOW_LAUNCH_SERVICE = 'po/workflow-launch';\nexport const PO_WORKFLOW_DEFINITION_SOURCES_SERVICE = 'po/workflow-definition-sources';\nexport const PO_WORKFLOW_RUNS_SERVICE = 'po/workflow-runs';\nexport const PO_WORKFLOW_CONTEXT_SERVICE = 'po/workflow-context';\nexport const PO_WORKFLOW_ADMISSIONS_SERVICE = 'po/workflow-admissions';\nexport const PO_WORKFLOW_IDENTITY_SERVICE = 'po/workflow-identity';\n\n/** A source-relative definition, never an arbitrary host path. */\nexport const PoWorkflowDefinitionRefSchema = Type.Object(\n {\n source: Type.String({ minLength: 1 }),\n key: Type.String({\n minLength: 1,\n pattern: '^(?!/)(?!.*\\\\\\\\)(?!.*:)(?!.*[\\\\u0000-\\\\u001f\\\\u007f])(?!.*(?:^|/)\\\\.{1,2}(?:/|$))[^/]+(?:/[^/]+)*$',\n }),\n },\n { additionalProperties: false },\n);\nexport type PoWorkflowDefinitionRef = Static<typeof PoWorkflowDefinitionRefSchema>;\n\n/** Registration receipt. runId fences a runKey that can be reused later. */\nexport const PoWorkflowRunRefSchema = Type.Object(\n {\n runId: Type.String({ minLength: 1 }),\n ownerSessionId: Type.String({ minLength: 1 }),\n runKey: Type.String({ minLength: 1 }),\n registryWorkspace: Type.String({ minLength: 1 }),\n },\n { additionalProperties: false },\n);\nexport type PoWorkflowRunRef = Static<typeof PoWorkflowRunRefSchema>;\n\nexport interface PoWorkflowLaunchOverrides {\n readonly runner?: string;\n readonly command?: string;\n readonly choice?: string;\n readonly job?: string;\n readonly inputs?: Readonly<Record<string, string>>;\n readonly env?: Readonly<Record<string, string>>;\n readonly prompt?: string;\n readonly name?: string;\n /** Team whose members role-bound jobs resolve to, instead of the workflow's default team. */\n readonly team?: string;\n}\n\n/** Session-owned. Rejection means no observable registration was accepted. */\nexport interface PoWorkflowLaunchService {\n launch(definition: PoWorkflowDefinitionRef, overrides?: PoWorkflowLaunchOverrides): Promise<PoWorkflowRunRef>;\n}\n\n/** Non-secret host association. Environment variables never establish this binding. */\nexport interface PoWorkflowPolicyAssociation {\n readonly coordinator: string;\n readonly key: string;\n}\n\n/** Independent of runId and executionGeneration, including continue-next resumes. */\nexport interface PoWorkflowOperationEpoch {\n readonly admissionId: string;\n readonly operationId: string;\n}\n\nexport interface PoWorkflowPolicyBinding {\n readonly association: PoWorkflowPolicyAssociation;\n readonly epoch: PoWorkflowOperationEpoch;\n}\n\nexport interface PoWorkflowExecutionPolicyRequest {\n readonly binding: PoWorkflowPolicyBinding;\n readonly reason: 'launch' | 'recover' | 'startup' | 'resume';\n readonly ownerSessionId: string;\n readonly launcherSessionId: string;\n /** The engine supplies the actual persisted run after createRun, including startup and recovery. */\n readonly run?: PoWorkflowRunRef;\n readonly previousRun?: PoWorkflowRunRef;\n /** Ephemeral host lifetime, never persisted. */\n readonly signal: AbortSignal;\n}\n\nexport interface PoWorkflowExecutionPolicyResult {\n /** Trusted non-secret context only. PO_* and WORKFLOW_* engine identity keys are forbidden. */\n readonly environment?: Readonly<Record<string, string>>;\n}\n\n/**\n * How a bound generation ended. `abandoned` is a person giving up a failed run: it is never recovered.\n * A coordinator releases what it holds for success, skipped and abandoned, and keeps it for failed and\n * interrupted so a recovery of the run reuses it.\n */\nexport type PoWorkflowSettlementOutcome = PoWorkflowOutcome | 'abandoned';\n\nexport interface PoWorkflowSettlementRequest {\n readonly binding: PoWorkflowPolicyBinding;\n readonly run: PoWorkflowRunRef;\n readonly outcome: PoWorkflowSettlementOutcome;\n readonly failedJob?: string;\n readonly ownerSessionId: string;\n readonly launcherSessionId: string;\n /** Ephemeral host lifetime, never persisted. */\n readonly signal: AbortSignal;\n}\n\nexport interface PoWorkflowPolicyOptions {\n readonly environmentKeys: readonly string[];\n /**\n * Called once a bound generation is terminal, and again with `abandoned` if a person abandons it.\n * Delivery is durable: the engine retries until this resolves, including after a restart or a\n * remount, so it must be idempotent. Throwing leaves the settlement pending.\n */\n readonly settle?: (request: PoWorkflowSettlementRequest) => Promise<void>;\n}\n\nexport interface PoWorkflowAdmissionOverrides extends PoWorkflowLaunchOverrides {\n readonly policy?: PoWorkflowPolicyAssociation;\n /**\n * Run the workflow as this same-workspace session instead of the caller, for example a session in an\n * isolated checkout. Trusted in-process launchers only: never accepted from tools, code mode or HTTP.\n */\n readonly targetSessionId?: string;\n}\n\nexport interface PoWorkflowRecoveryOptions {\n readonly runner?: string;\n}\n\nexport type PoWorkflowAdmissionRequest =\n | {\n readonly kind: 'launch';\n readonly definition: PoWorkflowDefinitionRef;\n readonly overrides?: PoWorkflowAdmissionOverrides;\n }\n | { readonly kind: 'recover'; readonly previousRun: PoWorkflowRunRef; readonly options?: PoWorkflowRecoveryOptions };\n\nexport interface PoWorkflowValidationReport {\n readonly errors: readonly { readonly code: string; readonly message: string; readonly location?: string }[];\n readonly warnings: readonly { readonly code: string; readonly message: string; readonly location?: string }[];\n readonly deferred: readonly { readonly location: string; readonly reference: string; readonly reason: string }[];\n /** Declared by the definition and reported only: the engine never provisions a checkout itself. */\n readonly isolation?: 'checkout';\n}\n\nexport type PoWorkflowAdmission =\n | {\n readonly attemptId: string;\n readonly admissionId: string;\n readonly state: 'pending';\n readonly binding?: PoWorkflowPolicyBinding;\n }\n | {\n readonly attemptId: string;\n readonly admissionId: string;\n readonly state: 'rejected';\n readonly errors: readonly string[];\n }\n | {\n readonly attemptId: string;\n readonly admissionId: string;\n readonly state: 'registered';\n readonly run: PoWorkflowRunRef;\n readonly binding?: PoWorkflowPolicyBinding;\n };\n\n/** Trusted, session-bound opt-in capability, never exposed as a tool or code-mode namespace. */\nexport interface PoWorkflowAdmissionsService {\n validate(request: PoWorkflowAdmissionRequest): Promise<PoWorkflowValidationReport>;\n launch(\n attemptId: string,\n definition: PoWorkflowDefinitionRef,\n overrides?: PoWorkflowAdmissionOverrides,\n ): Promise<PoWorkflowAdmission>;\n recover(\n attemptId: string,\n previousRun: PoWorkflowRunRef,\n options?: PoWorkflowRecoveryOptions,\n ): Promise<PoWorkflowAdmission>;\n /** Undefined is unknown or unauthorized, never proof that an executor did not start. */\n read(attemptId: string): Promise<PoWorkflowAdmission | undefined>;\n /** Session-owned registration. Duplicate (source session, coordinator) is rejected.\n * Disposal is generation-fenced. Remounting only reattaches; other sessions never supply this callback.\n * The engine persists the source launcher identity and never falls back to another session's policy.\n */\n registerPolicy(\n coordinator: string,\n beforeExecution: (request: PoWorkflowExecutionPolicyRequest) => Promise<PoWorkflowExecutionPolicyResult | void>,\n options: PoWorkflowPolicyOptions,\n ): { dispose(): void };\n}\nexport interface PoWorkflowDefinitionSource {\n readonly source: string;\n /** An admitted, materialized absolute directory. Registration does not fetch it. */\n readonly directory: string;\n}\n\nexport interface PoWorkflowDefinitionSourceHandle {\n readonly source: string;\n readonly generation: string;\n dispose(): void;\n}\n\n/** Workspace-owned registry. Disposal withdraws only the handle's registration. */\nexport interface PoWorkflowDefinitionSourcesService {\n register(contribution: PoWorkflowDefinitionSource): PoWorkflowDefinitionSourceHandle;\n list(): readonly PoWorkflowDefinitionSource[];\n subscribe(listener: (sources: readonly PoWorkflowDefinitionSource[]) => void): () => void;\n}\n\nexport type PoWorkflowStage = 'running' | 'completed' | 'error';\nexport type PoWorkflowOutcome = 'success' | 'skipped' | 'failed' | 'interrupted';\nexport type PoWorkflowProgressState =\n | 'pending'\n | 'running'\n | 'completed'\n | 'skipped'\n | 'failed'\n | 'pause_requested'\n | 'paused'\n | 'resumed';\n\nexport interface PoWorkflowStepState {\n readonly name: string;\n readonly status: PoWorkflowProgressState;\n readonly ref?: { readonly kind: string; readonly id: string; readonly label?: string };\n readonly reason?: string;\n}\n\nexport interface PoWorkflowJobState {\n readonly name: string;\n readonly phase: 'pre' | 'job' | 'post';\n readonly status: PoWorkflowProgressState;\n readonly steps: readonly PoWorkflowStepState[];\n}\n\nexport interface PoWorkflowRunState {\n readonly run: PoWorkflowRunRef;\n readonly stage: PoWorkflowStage;\n readonly outcome?: PoWorkflowOutcome;\n /** From the same persisted snapshot as stage/outcome, never a newer cached operation. */\n readonly binding?: PoWorkflowPolicyBinding;\n readonly jobs: readonly PoWorkflowJobState[];\n readonly children?: readonly PoWorkflowChildrenStatus[];\n}\n\n/** The parsed definition actually used, not a re-read of mutable YAML on disk. */\nexport interface PoWorkflowConfig {\n readonly definition: PoWorkflowDefinitionRef;\n readonly revision: string;\n /** Engine-owned YAML vocabulary. Core does not import or implement the parser. */\n readonly workflow: Readonly<Record<string, unknown>>;\n}\n\n/** Owner-authoritative views, or an authorized projection for a launcher. */\nexport interface PoWorkflowRunsService {\n readConfig(runId: string): Promise<PoWorkflowConfig | undefined>;\n readState(runId: string): Promise<PoWorkflowRunState | undefined>;\n /** Replays the latest state, including terminal state, before subsequent updates. */\n subscribe(runId: string, listener: (state: PoWorkflowRunState) => void): () => void;\n}\n\nexport interface PoWorkflowChildInvocation {\n readonly invocationId: string;\n readonly job: string;\n readonly state: 'running' | 'completed' | 'failed' | 'interrupted';\n readonly sessionIds: readonly string[];\n readonly startedAt: string;\n readonly endedAt?: string;\n readonly error?: string;\n readonly usage?: import('./hubChannel').PoHubSessionUsage;\n}\n\nexport interface PoWorkflowCriterionState {\n readonly key: string;\n readonly description: string;\n readonly verifiedBy: string;\n readonly status: 'unchecked' | 'checked' | 'not-met';\n readonly feedback?: string;\n readonly invocationId?: string;\n}\n\nexport interface PoWorkflowChildrenStatus {\n readonly lead: string;\n readonly continuations: number;\n readonly maxContinuations: number;\n readonly criteria: readonly PoWorkflowCriterionState[];\n readonly invocations: readonly PoWorkflowChildInvocation[];\n}\n\n/** In-process, caller-bound capability. Never accepted from a tool or serialized. */\nexport interface PoWorkflowChildrenSession {\n readonly role: 'lead' | 'child' | 'consumer';\n spawnChild?(input: {\n job: string;\n prompt: string;\n inputs?: Record<string, string | number | boolean>;\n }): Promise<PoWorkflowChildInvocation>;\n childStatus?(input: { invocationId: string }): Promise<PoWorkflowChildInvocation>;\n children?(): Promise<PoWorkflowChildrenStatus>;\n reportCriteria?(input: {\n results: Record<string, { status: 'checked' | 'not-met'; feedback?: string }>;\n }): Promise<void>;\n /** Immutable pre-review snapshot selected by the runtime, not mutable paths. */\n reviewArtifacts?(): Promise<{ revision: string; artifacts: Readonly<Record<string, string>> }>;\n /** Returns exactly the accepted bytes, after a fresh authoritative ledger/revision check. */\n acceptedArtifacts?(input: {\n job: string;\n }): Promise<{ revision: string; artifacts: Readonly<Record<string, string>> }>;\n}\n\n/** Bound only in the trusted step-session bootstrap, before packages mount. */\nexport interface PoWorkflowContextService {\n readonly run: PoWorkflowRunRef;\n readonly job: string;\n readonly step: string;\n readonly attempt: number;\n readonly config: PoWorkflowConfig;\n readonly jobEnvironment: Readonly<Record<string, string>>;\n readonly stepEnvironment: Readonly<Record<string, string>>;\n readonly traceparent?: string;\n /** Absolute path of the workflow's instructions file, read in place of the discovered AGENTS.md files. */\n readonly instructions?: string;\n readonly state: PoWorkflowRunsService;\n readonly children?: PoWorkflowChildrenSession;\n}\n\nexport interface PoWorkflowIdentityRequest {\n readonly team: string;\n /** Every role the job declares; all of them must belong to one member. */\n readonly roles: readonly string[];\n}\n\n/** One member a job was admitted as. Kept in run state, so it carries names and digests, never secrets. */\nexport interface PoWorkflowIdentityBinding {\n readonly team: string;\n readonly teamRevision: string;\n readonly product?: string;\n readonly roles: readonly string[];\n /** Stable across machines; the local profile name may differ between them. */\n readonly ref: string;\n readonly profile: string;\n readonly contentDigest: string;\n readonly policyDigest: string;\n}\n\n/**\n * Resolves role-bound workflow jobs to team members. Bound per workspace by the package that owns\n * profiles and teams; the workspace comes from that scope, never from workflow input. Both calls\n * throw, without naming secrets, when no single authorized member qualifies.\n */\nexport interface PoWorkflowIdentityService {\n resolve(request: PoWorkflowIdentityRequest): Promise<PoWorkflowIdentityBinding>;\n /** Rechecks a saved binding against the current team and authorization, returning it as it stands now. */\n revalidate(binding: PoWorkflowIdentityBinding): Promise<PoWorkflowIdentityBinding>;\n}\n\n// These are in-process capabilities, not remote session-create fields or durable records.\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n 'po/workflow-launch': PoWorkflowLaunchService;\n 'po/workflow-definition-sources': PoWorkflowDefinitionSourcesService;\n 'po/workflow-runs': PoWorkflowRunsService;\n 'po/workflow-context': PoWorkflowContextService;\n 'po/workflow-admissions': PoWorkflowAdmissionsService;\n 'po/workflow-identity': PoWorkflowIdentityService;\n }\n}\n\nexport function readPoWorkflowLaunchService(context: Context): PoWorkflowLaunchService | undefined {\n return context.get(PO_WORKFLOW_LAUNCH_SERVICE) as PoWorkflowLaunchService | undefined;\n}\n\nexport function readPoWorkflowDefinitionSourcesService(\n context: Context,\n): PoWorkflowDefinitionSourcesService | undefined {\n return context.get(PO_WORKFLOW_DEFINITION_SOURCES_SERVICE) as PoWorkflowDefinitionSourcesService | undefined;\n}\n\nexport function readPoWorkflowRunsService(context: Context): PoWorkflowRunsService | undefined {\n return context.get(PO_WORKFLOW_RUNS_SERVICE) as PoWorkflowRunsService | undefined;\n}\n\nexport function readPoWorkflowContextService(context: Context): PoWorkflowContextService | undefined {\n return context.get(PO_WORKFLOW_CONTEXT_SERVICE) as PoWorkflowContextService | undefined;\n}\n\nexport function readPoWorkflowAdmissionsService(context: Context): PoWorkflowAdmissionsService | undefined {\n return context.get(PO_WORKFLOW_ADMISSIONS_SERVICE) as PoWorkflowAdmissionsService | undefined;\n}\n\nexport function readPoWorkflowIdentityService(context: Context): PoWorkflowIdentityService | undefined {\n return context.get(PO_WORKFLOW_IDENTITY_SERVICE) as PoWorkflowIdentityService | undefined;\n}\n"],"mappings":";;AAGA,MAAa,6BAA6B;AAC1C,MAAa,yCAAyC;AACtD,MAAa,2BAA2B;AACxC,MAAa,8BAA8B;AAC3C,MAAa,iCAAiC;AAC9C,MAAa,+BAA+B;;AAG5C,MAAa,gCAAgCA,QAAAA,KAAK,OAChD;CACE,QAAQA,QAAAA,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CACpC,KAAKA,QAAAA,KAAK,OAAO;EACf,WAAW;EACX,SAAS;CACX,CAAC;AACH,GACA,EAAE,sBAAsB,MAAM,CAChC;;AAIA,MAAa,yBAAyBA,QAAAA,KAAK,OACzC;CACE,OAAOA,QAAAA,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CACnC,gBAAgBA,QAAAA,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CAC5C,QAAQA,QAAAA,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CACpC,mBAAmBA,QAAAA,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;AACjD,GACA,EAAE,sBAAsB,MAAM,CAChC;AAgVA,SAAgB,4BAA4B,SAAuD;CACjG,OAAO,QAAQ,IAAI,0BAA0B;AAC/C;AAEA,SAAgB,uCACd,SACgD;CAChD,OAAO,QAAQ,IAAI,sCAAsC;AAC3D;AAEA,SAAgB,0BAA0B,SAAqD;CAC7F,OAAO,QAAQ,IAAI,wBAAwB;AAC7C;AAEA,SAAgB,6BAA6B,SAAwD;CACnG,OAAO,QAAQ,IAAI,2BAA2B;AAChD;AAEA,SAAgB,gCAAgC,SAA2D;CACzG,OAAO,QAAQ,IAAI,8BAA8B;AACnD;AAEA,SAAgB,8BAA8B,SAAyD;CACrG,OAAO,QAAQ,IAAI,4BAA4B;AACjD"}
|
|
@@ -7,6 +7,7 @@ export declare const PO_WORKFLOW_DEFINITION_SOURCES_SERVICE = "po/workflow-defin
|
|
|
7
7
|
export declare const PO_WORKFLOW_RUNS_SERVICE = "po/workflow-runs";
|
|
8
8
|
export declare const PO_WORKFLOW_CONTEXT_SERVICE = "po/workflow-context";
|
|
9
9
|
export declare const PO_WORKFLOW_ADMISSIONS_SERVICE = "po/workflow-admissions";
|
|
10
|
+
export declare const PO_WORKFLOW_IDENTITY_SERVICE = "po/workflow-identity";
|
|
10
11
|
/** A source-relative definition, never an arbitrary host path. */
|
|
11
12
|
export declare const PoWorkflowDefinitionRefSchema: Type.TObject<{
|
|
12
13
|
source: Type.TString;
|
|
@@ -30,6 +31,8 @@ export interface PoWorkflowLaunchOverrides {
|
|
|
30
31
|
readonly env?: Readonly<Record<string, string>>;
|
|
31
32
|
readonly prompt?: string;
|
|
32
33
|
readonly name?: string;
|
|
34
|
+
/** Team whose members role-bound jobs resolve to, instead of the workflow's default team. */
|
|
35
|
+
readonly team?: string;
|
|
33
36
|
}
|
|
34
37
|
/** Session-owned. Rejection means no observable registration was accepted. */
|
|
35
38
|
export interface PoWorkflowLaunchService {
|
|
@@ -289,6 +292,33 @@ export interface PoWorkflowContextService {
|
|
|
289
292
|
readonly state: PoWorkflowRunsService;
|
|
290
293
|
readonly children?: PoWorkflowChildrenSession;
|
|
291
294
|
}
|
|
295
|
+
export interface PoWorkflowIdentityRequest {
|
|
296
|
+
readonly team: string;
|
|
297
|
+
/** Every role the job declares; all of them must belong to one member. */
|
|
298
|
+
readonly roles: readonly string[];
|
|
299
|
+
}
|
|
300
|
+
/** One member a job was admitted as. Kept in run state, so it carries names and digests, never secrets. */
|
|
301
|
+
export interface PoWorkflowIdentityBinding {
|
|
302
|
+
readonly team: string;
|
|
303
|
+
readonly teamRevision: string;
|
|
304
|
+
readonly product?: string;
|
|
305
|
+
readonly roles: readonly string[];
|
|
306
|
+
/** Stable across machines; the local profile name may differ between them. */
|
|
307
|
+
readonly ref: string;
|
|
308
|
+
readonly profile: string;
|
|
309
|
+
readonly contentDigest: string;
|
|
310
|
+
readonly policyDigest: string;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Resolves role-bound workflow jobs to team members. Bound per workspace by the package that owns
|
|
314
|
+
* profiles and teams; the workspace comes from that scope, never from workflow input. Both calls
|
|
315
|
+
* throw, without naming secrets, when no single authorized member qualifies.
|
|
316
|
+
*/
|
|
317
|
+
export interface PoWorkflowIdentityService {
|
|
318
|
+
resolve(request: PoWorkflowIdentityRequest): Promise<PoWorkflowIdentityBinding>;
|
|
319
|
+
/** Rechecks a saved binding against the current team and authorization, returning it as it stands now. */
|
|
320
|
+
revalidate(binding: PoWorkflowIdentityBinding): Promise<PoWorkflowIdentityBinding>;
|
|
321
|
+
}
|
|
292
322
|
declare module '@deepseek-ai/cordis' {
|
|
293
323
|
interface Context {
|
|
294
324
|
'po/workflow-launch': PoWorkflowLaunchService;
|
|
@@ -296,6 +326,7 @@ declare module '@deepseek-ai/cordis' {
|
|
|
296
326
|
'po/workflow-runs': PoWorkflowRunsService;
|
|
297
327
|
'po/workflow-context': PoWorkflowContextService;
|
|
298
328
|
'po/workflow-admissions': PoWorkflowAdmissionsService;
|
|
329
|
+
'po/workflow-identity': PoWorkflowIdentityService;
|
|
299
330
|
}
|
|
300
331
|
}
|
|
301
332
|
export declare function readPoWorkflowLaunchService(context: Context): PoWorkflowLaunchService | undefined;
|
|
@@ -303,5 +334,6 @@ export declare function readPoWorkflowDefinitionSourcesService(context: Context)
|
|
|
303
334
|
export declare function readPoWorkflowRunsService(context: Context): PoWorkflowRunsService | undefined;
|
|
304
335
|
export declare function readPoWorkflowContextService(context: Context): PoWorkflowContextService | undefined;
|
|
305
336
|
export declare function readPoWorkflowAdmissionsService(context: Context): PoWorkflowAdmissionsService | undefined;
|
|
337
|
+
export declare function readPoWorkflowIdentityService(context: Context): PoWorkflowIdentityService | undefined;
|
|
306
338
|
//#endregion
|
|
307
339
|
//# sourceMappingURL=workflow.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.mts","names":["_$__hubChannel0.PoHubSessionUsage"],"sources":["../../../src/schemas/workflow.ts"],"mappings":";;;;qBAGa;qBACA;qBACA;qBACA;qBACA;;qBAGA,+BAA6B,KAAA;;;;YAU9B,0BAA0B,cAAc;;qBAGvC,wBAAsB,KAAA;;;;;;YASvB,mBAAmB,cAAc;iBAE5B;WACN;WACA;WACA;WACA;WACA,SAAS,SAAS;WAClB,MAAM,SAAS;WACf;WACA;;;iBAIM;EACf,OAAO,YAAY,yBAAyB,YAAY,4BAA4B,QAAQ;;;iBAI7E;WACN;WACA;;;iBAIM;WACN;WACA;;iBAGM;WACN,aAAa;WACb,OAAO;;iBAGD;WACN,SAAS;WACT;WACA;WACA;;WAEA,MAAM;WACN,cAAc;;WAEd,QAAQ;;iBAGF;;WAEN,cAAc,SAAS;;;;;;;YAQtB,8BAA8B;iBAEzB;WACN,SAAS;WACT,KAAK;WACL,SAAS;WACT;WACA;WACA;;WAEA,QAAQ;;iBAGF;WACN;;;;;;WAMA,UAAU,SAAS,gCAAgC;;iBAG7C,qCAAqC;WAC3C,SAAS;;;;;WAKT;;iBAGM;WACN;;YAGC;WAEG;WACA,YAAY;WACZ,YAAY;;WAEZ;WAA0B,aAAa;WAA2B,UAAU;;iBAE1E;WACN;aAA4B;aAAuB;aAA0B;;WAC7E;aAA8B;aAAuB;aAA0B;;WAC/E;aAA8B;aAA2B;aAA4B;;;WAErF;;YAGC;WAEG;WACA;WACA;WACA,UAAU;;WAGV;WACA;WACA;WACA;;WAGA;WACA;WACA;WACA,KAAK;WACL,UA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|
+
{"version":3,"file":"workflow.d.mts","names":["_$__hubChannel0.PoHubSessionUsage"],"sources":["../../../src/schemas/workflow.ts"],"mappings":";;;;qBAGa;qBACA;qBACA;qBACA;qBACA;qBACA;;qBAGA,+BAA6B,KAAA;;;;YAU9B,0BAA0B,cAAc;;qBAGvC,wBAAsB,KAAA;;;;;;YASvB,mBAAmB,cAAc;iBAE5B;WACN;WACA;WACA;WACA;WACA,SAAS,SAAS;WAClB,MAAM,SAAS;WACf;WACA;;WAEA;;;iBAIM;EACf,OAAO,YAAY,yBAAyB,YAAY,4BAA4B,QAAQ;;;iBAI7E;WACN;WACA;;;iBAIM;WACN;WACA;;iBAGM;WACN,aAAa;WACb,OAAO;;iBAGD;WACN,SAAS;WACT;WACA;WACA;;WAEA,MAAM;WACN,cAAc;;WAEd,QAAQ;;iBAGF;;WAEN,cAAc,SAAS;;;;;;;YAQtB,8BAA8B;iBAEzB;WACN,SAAS;WACT,KAAK;WACL,SAAS;WACT;WACA;WACA;;WAEA,QAAQ;;iBAGF;WACN;;;;;;WAMA,UAAU,SAAS,gCAAgC;;iBAG7C,qCAAqC;WAC3C,SAAS;;;;;WAKT;;iBAGM;WACN;;YAGC;WAEG;WACA,YAAY;WACZ,YAAY;;WAEZ;WAA0B,aAAa;WAA2B,UAAU;;iBAE1E;WACN;aAA4B;aAAuB;aAA0B;;WAC7E;aAA8B;aAAuB;aAA0B;;WAC/E;aAA8B;aAA2B;aAA4B;;;WAErF;;YAGC;WAEG;WACA;WACA;WACA,UAAU;;WAGV;WACA;WACA;WACA;;WAGA;WACA;WACA;WACA,KAAK;WACL,UAAU;;;iBAIR;EACf,SAAS,SAAS,6BAA6B,QAAQ;EACvD,OACE,mBACA,YAAY,yBACZ,YAAY,+BACX,QAAQ;EACX,QACE,mBACA,aAAa,kBACb,UAAU,4BACT,QAAQ;;EAEX,KAAK,oBAAoB,QAAQ;;;;;EAKjC,eACE,qBACA,kBAAkB,SAAS,qCAAqC,QAAQ,yCACxE,SAAS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wB;;;wBAIZ,4BAA4B,SAAS,UAAU;wBAI/C,uCACd,SAAS,UACR;wBAIa,0BAA0B,SAAS,UAAU;wBAI7C,6BAA6B,SAAS,UAAU;wBAIhD,gCAAgC,SAAS,UAAU;wBAInD,8BAA8B,SAAS,UAAU"}
|
|
@@ -5,6 +5,7 @@ const PO_WORKFLOW_DEFINITION_SOURCES_SERVICE = "po/workflow-definition-sources";
|
|
|
5
5
|
const PO_WORKFLOW_RUNS_SERVICE = "po/workflow-runs";
|
|
6
6
|
const PO_WORKFLOW_CONTEXT_SERVICE = "po/workflow-context";
|
|
7
7
|
const PO_WORKFLOW_ADMISSIONS_SERVICE = "po/workflow-admissions";
|
|
8
|
+
const PO_WORKFLOW_IDENTITY_SERVICE = "po/workflow-identity";
|
|
8
9
|
/** A source-relative definition, never an arbitrary host path. */
|
|
9
10
|
const PoWorkflowDefinitionRefSchema = Type.Object({
|
|
10
11
|
source: Type.String({ minLength: 1 }),
|
|
@@ -35,7 +36,10 @@ function readPoWorkflowContextService(context) {
|
|
|
35
36
|
function readPoWorkflowAdmissionsService(context) {
|
|
36
37
|
return context.get(PO_WORKFLOW_ADMISSIONS_SERVICE);
|
|
37
38
|
}
|
|
39
|
+
function readPoWorkflowIdentityService(context) {
|
|
40
|
+
return context.get(PO_WORKFLOW_IDENTITY_SERVICE);
|
|
41
|
+
}
|
|
38
42
|
//#endregion
|
|
39
|
-
export { PO_WORKFLOW_ADMISSIONS_SERVICE, PO_WORKFLOW_CONTEXT_SERVICE, PO_WORKFLOW_DEFINITION_SOURCES_SERVICE, PO_WORKFLOW_LAUNCH_SERVICE, PO_WORKFLOW_RUNS_SERVICE, PoWorkflowDefinitionRefSchema, PoWorkflowRunRefSchema, readPoWorkflowAdmissionsService, readPoWorkflowContextService, readPoWorkflowDefinitionSourcesService, readPoWorkflowLaunchService, readPoWorkflowRunsService };
|
|
43
|
+
export { PO_WORKFLOW_ADMISSIONS_SERVICE, PO_WORKFLOW_CONTEXT_SERVICE, PO_WORKFLOW_DEFINITION_SOURCES_SERVICE, PO_WORKFLOW_IDENTITY_SERVICE, PO_WORKFLOW_LAUNCH_SERVICE, PO_WORKFLOW_RUNS_SERVICE, PoWorkflowDefinitionRefSchema, PoWorkflowRunRefSchema, readPoWorkflowAdmissionsService, readPoWorkflowContextService, readPoWorkflowDefinitionSourcesService, readPoWorkflowIdentityService, readPoWorkflowLaunchService, readPoWorkflowRunsService };
|
|
40
44
|
|
|
41
45
|
//# sourceMappingURL=workflow.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.mjs","names":[],"sources":["../../../src/schemas/workflow.ts"],"sourcesContent":["import type { Context } from '@deepseek-ai/cordis';\nimport { type Static, Type } from 'typebox';\n\nexport const PO_WORKFLOW_LAUNCH_SERVICE = 'po/workflow-launch';\nexport const PO_WORKFLOW_DEFINITION_SOURCES_SERVICE = 'po/workflow-definition-sources';\nexport const PO_WORKFLOW_RUNS_SERVICE = 'po/workflow-runs';\nexport const PO_WORKFLOW_CONTEXT_SERVICE = 'po/workflow-context';\nexport const PO_WORKFLOW_ADMISSIONS_SERVICE = 'po/workflow-admissions';\n\n/** A source-relative definition, never an arbitrary host path. */\nexport const PoWorkflowDefinitionRefSchema = Type.Object(\n {\n source: Type.String({ minLength: 1 }),\n key: Type.String({\n minLength: 1,\n pattern: '^(?!/)(?!.*\\\\\\\\)(?!.*:)(?!.*[\\\\u0000-\\\\u001f\\\\u007f])(?!.*(?:^|/)\\\\.{1,2}(?:/|$))[^/]+(?:/[^/]+)*$',\n }),\n },\n { additionalProperties: false },\n);\nexport type PoWorkflowDefinitionRef = Static<typeof PoWorkflowDefinitionRefSchema>;\n\n/** Registration receipt. runId fences a runKey that can be reused later. */\nexport const PoWorkflowRunRefSchema = Type.Object(\n {\n runId: Type.String({ minLength: 1 }),\n ownerSessionId: Type.String({ minLength: 1 }),\n runKey: Type.String({ minLength: 1 }),\n registryWorkspace: Type.String({ minLength: 1 }),\n },\n { additionalProperties: false },\n);\nexport type PoWorkflowRunRef = Static<typeof PoWorkflowRunRefSchema>;\n\nexport interface PoWorkflowLaunchOverrides {\n readonly runner?: string;\n readonly command?: string;\n readonly choice?: string;\n readonly job?: string;\n readonly inputs?: Readonly<Record<string, string>>;\n readonly env?: Readonly<Record<string, string>>;\n readonly prompt?: string;\n readonly name?: string;\n}\n\n/** Session-owned. Rejection means no observable registration was accepted. */\nexport interface PoWorkflowLaunchService {\n launch(definition: PoWorkflowDefinitionRef, overrides?: PoWorkflowLaunchOverrides): Promise<PoWorkflowRunRef>;\n}\n\n/** Non-secret host association. Environment variables never establish this binding. */\nexport interface PoWorkflowPolicyAssociation {\n readonly coordinator: string;\n readonly key: string;\n}\n\n/** Independent of runId and executionGeneration, including continue-next resumes. */\nexport interface PoWorkflowOperationEpoch {\n readonly admissionId: string;\n readonly operationId: string;\n}\n\nexport interface PoWorkflowPolicyBinding {\n readonly association: PoWorkflowPolicyAssociation;\n readonly epoch: PoWorkflowOperationEpoch;\n}\n\nexport interface PoWorkflowExecutionPolicyRequest {\n readonly binding: PoWorkflowPolicyBinding;\n readonly reason: 'launch' | 'recover' | 'startup' | 'resume';\n readonly ownerSessionId: string;\n readonly launcherSessionId: string;\n /** The engine supplies the actual persisted run after createRun, including startup and recovery. */\n readonly run?: PoWorkflowRunRef;\n readonly previousRun?: PoWorkflowRunRef;\n /** Ephemeral host lifetime, never persisted. */\n readonly signal: AbortSignal;\n}\n\nexport interface PoWorkflowExecutionPolicyResult {\n /** Trusted non-secret context only. PO_* and WORKFLOW_* engine identity keys are forbidden. */\n readonly environment?: Readonly<Record<string, string>>;\n}\n\n/**\n * How a bound generation ended. `abandoned` is a person giving up a failed run: it is never recovered.\n * A coordinator releases what it holds for success, skipped and abandoned, and keeps it for failed and\n * interrupted so a recovery of the run reuses it.\n */\nexport type PoWorkflowSettlementOutcome = PoWorkflowOutcome | 'abandoned';\n\nexport interface PoWorkflowSettlementRequest {\n readonly binding: PoWorkflowPolicyBinding;\n readonly run: PoWorkflowRunRef;\n readonly outcome: PoWorkflowSettlementOutcome;\n readonly failedJob?: string;\n readonly ownerSessionId: string;\n readonly launcherSessionId: string;\n /** Ephemeral host lifetime, never persisted. */\n readonly signal: AbortSignal;\n}\n\nexport interface PoWorkflowPolicyOptions {\n readonly environmentKeys: readonly string[];\n /**\n * Called once a bound generation is terminal, and again with `abandoned` if a person abandons it.\n * Delivery is durable: the engine retries until this resolves, including after a restart or a\n * remount, so it must be idempotent. Throwing leaves the settlement pending.\n */\n readonly settle?: (request: PoWorkflowSettlementRequest) => Promise<void>;\n}\n\nexport interface PoWorkflowAdmissionOverrides extends PoWorkflowLaunchOverrides {\n readonly policy?: PoWorkflowPolicyAssociation;\n /**\n * Run the workflow as this same-workspace session instead of the caller, for example a session in an\n * isolated checkout. Trusted in-process launchers only: never accepted from tools, code mode or HTTP.\n */\n readonly targetSessionId?: string;\n}\n\nexport interface PoWorkflowRecoveryOptions {\n readonly runner?: string;\n}\n\nexport type PoWorkflowAdmissionRequest =\n | {\n readonly kind: 'launch';\n readonly definition: PoWorkflowDefinitionRef;\n readonly overrides?: PoWorkflowAdmissionOverrides;\n }\n | { readonly kind: 'recover'; readonly previousRun: PoWorkflowRunRef; readonly options?: PoWorkflowRecoveryOptions };\n\nexport interface PoWorkflowValidationReport {\n readonly errors: readonly { readonly code: string; readonly message: string; readonly location?: string }[];\n readonly warnings: readonly { readonly code: string; readonly message: string; readonly location?: string }[];\n readonly deferred: readonly { readonly location: string; readonly reference: string; readonly reason: string }[];\n /** Declared by the definition and reported only: the engine never provisions a checkout itself. */\n readonly isolation?: 'checkout';\n}\n\nexport type PoWorkflowAdmission =\n | {\n readonly attemptId: string;\n readonly admissionId: string;\n readonly state: 'pending';\n readonly binding?: PoWorkflowPolicyBinding;\n }\n | {\n readonly attemptId: string;\n readonly admissionId: string;\n readonly state: 'rejected';\n readonly errors: readonly string[];\n }\n | {\n readonly attemptId: string;\n readonly admissionId: string;\n readonly state: 'registered';\n readonly run: PoWorkflowRunRef;\n readonly binding?: PoWorkflowPolicyBinding;\n };\n\n/** Trusted, session-bound opt-in capability, never exposed as a tool or code-mode namespace. */\nexport interface PoWorkflowAdmissionsService {\n validate(request: PoWorkflowAdmissionRequest): Promise<PoWorkflowValidationReport>;\n launch(\n attemptId: string,\n definition: PoWorkflowDefinitionRef,\n overrides?: PoWorkflowAdmissionOverrides,\n ): Promise<PoWorkflowAdmission>;\n recover(\n attemptId: string,\n previousRun: PoWorkflowRunRef,\n options?: PoWorkflowRecoveryOptions,\n ): Promise<PoWorkflowAdmission>;\n /** Undefined is unknown or unauthorized, never proof that an executor did not start. */\n read(attemptId: string): Promise<PoWorkflowAdmission | undefined>;\n /** Session-owned registration. Duplicate (source session, coordinator) is rejected.\n * Disposal is generation-fenced. Remounting only reattaches; other sessions never supply this callback.\n * The engine persists the source launcher identity and never falls back to another session's policy.\n */\n registerPolicy(\n coordinator: string,\n beforeExecution: (request: PoWorkflowExecutionPolicyRequest) => Promise<PoWorkflowExecutionPolicyResult | void>,\n options: PoWorkflowPolicyOptions,\n ): { dispose(): void };\n}\nexport interface PoWorkflowDefinitionSource {\n readonly source: string;\n /** An admitted, materialized absolute directory. Registration does not fetch it. */\n readonly directory: string;\n}\n\nexport interface PoWorkflowDefinitionSourceHandle {\n readonly source: string;\n readonly generation: string;\n dispose(): void;\n}\n\n/** Workspace-owned registry. Disposal withdraws only the handle's registration. */\nexport interface PoWorkflowDefinitionSourcesService {\n register(contribution: PoWorkflowDefinitionSource): PoWorkflowDefinitionSourceHandle;\n list(): readonly PoWorkflowDefinitionSource[];\n subscribe(listener: (sources: readonly PoWorkflowDefinitionSource[]) => void): () => void;\n}\n\nexport type PoWorkflowStage = 'running' | 'completed' | 'error';\nexport type PoWorkflowOutcome = 'success' | 'skipped' | 'failed' | 'interrupted';\nexport type PoWorkflowProgressState =\n | 'pending'\n | 'running'\n | 'completed'\n | 'skipped'\n | 'failed'\n | 'pause_requested'\n | 'paused'\n | 'resumed';\n\nexport interface PoWorkflowStepState {\n readonly name: string;\n readonly status: PoWorkflowProgressState;\n readonly ref?: { readonly kind: string; readonly id: string; readonly label?: string };\n readonly reason?: string;\n}\n\nexport interface PoWorkflowJobState {\n readonly name: string;\n readonly phase: 'pre' | 'job' | 'post';\n readonly status: PoWorkflowProgressState;\n readonly steps: readonly PoWorkflowStepState[];\n}\n\nexport interface PoWorkflowRunState {\n readonly run: PoWorkflowRunRef;\n readonly stage: PoWorkflowStage;\n readonly outcome?: PoWorkflowOutcome;\n /** From the same persisted snapshot as stage/outcome, never a newer cached operation. */\n readonly binding?: PoWorkflowPolicyBinding;\n readonly jobs: readonly PoWorkflowJobState[];\n readonly children?: readonly PoWorkflowChildrenStatus[];\n}\n\n/** The parsed definition actually used, not a re-read of mutable YAML on disk. */\nexport interface PoWorkflowConfig {\n readonly definition: PoWorkflowDefinitionRef;\n readonly revision: string;\n /** Engine-owned YAML vocabulary. Core does not import or implement the parser. */\n readonly workflow: Readonly<Record<string, unknown>>;\n}\n\n/** Owner-authoritative views, or an authorized projection for a launcher. */\nexport interface PoWorkflowRunsService {\n readConfig(runId: string): Promise<PoWorkflowConfig | undefined>;\n readState(runId: string): Promise<PoWorkflowRunState | undefined>;\n /** Replays the latest state, including terminal state, before subsequent updates. */\n subscribe(runId: string, listener: (state: PoWorkflowRunState) => void): () => void;\n}\n\nexport interface PoWorkflowChildInvocation {\n readonly invocationId: string;\n readonly job: string;\n readonly state: 'running' | 'completed' | 'failed' | 'interrupted';\n readonly sessionIds: readonly string[];\n readonly startedAt: string;\n readonly endedAt?: string;\n readonly error?: string;\n readonly usage?: import('./hubChannel').PoHubSessionUsage;\n}\n\nexport interface PoWorkflowCriterionState {\n readonly key: string;\n readonly description: string;\n readonly verifiedBy: string;\n readonly status: 'unchecked' | 'checked' | 'not-met';\n readonly feedback?: string;\n readonly invocationId?: string;\n}\n\nexport interface PoWorkflowChildrenStatus {\n readonly lead: string;\n readonly continuations: number;\n readonly maxContinuations: number;\n readonly criteria: readonly PoWorkflowCriterionState[];\n readonly invocations: readonly PoWorkflowChildInvocation[];\n}\n\n/** In-process, caller-bound capability. Never accepted from a tool or serialized. */\nexport interface PoWorkflowChildrenSession {\n readonly role: 'lead' | 'child' | 'consumer';\n spawnChild?(input: {\n job: string;\n prompt: string;\n inputs?: Record<string, string | number | boolean>;\n }): Promise<PoWorkflowChildInvocation>;\n childStatus?(input: { invocationId: string }): Promise<PoWorkflowChildInvocation>;\n children?(): Promise<PoWorkflowChildrenStatus>;\n reportCriteria?(input: {\n results: Record<string, { status: 'checked' | 'not-met'; feedback?: string }>;\n }): Promise<void>;\n /** Immutable pre-review snapshot selected by the runtime, not mutable paths. */\n reviewArtifacts?(): Promise<{ revision: string; artifacts: Readonly<Record<string, string>> }>;\n /** Returns exactly the accepted bytes, after a fresh authoritative ledger/revision check. */\n acceptedArtifacts?(input: {\n job: string;\n }): Promise<{ revision: string; artifacts: Readonly<Record<string, string>> }>;\n}\n\n/** Bound only in the trusted step-session bootstrap, before packages mount. */\nexport interface PoWorkflowContextService {\n readonly run: PoWorkflowRunRef;\n readonly job: string;\n readonly step: string;\n readonly attempt: number;\n readonly config: PoWorkflowConfig;\n readonly jobEnvironment: Readonly<Record<string, string>>;\n readonly stepEnvironment: Readonly<Record<string, string>>;\n readonly traceparent?: string;\n /** Absolute path of the workflow's instructions file, read in place of the discovered AGENTS.md files. */\n readonly instructions?: string;\n readonly state: PoWorkflowRunsService;\n readonly children?: PoWorkflowChildrenSession;\n}\n\n// These are in-process capabilities, not remote session-create fields or durable records.\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n 'po/workflow-launch': PoWorkflowLaunchService;\n 'po/workflow-definition-sources': PoWorkflowDefinitionSourcesService;\n 'po/workflow-runs': PoWorkflowRunsService;\n 'po/workflow-context': PoWorkflowContextService;\n 'po/workflow-admissions': PoWorkflowAdmissionsService;\n }\n}\n\nexport function readPoWorkflowLaunchService(context: Context): PoWorkflowLaunchService | undefined {\n return context.get(PO_WORKFLOW_LAUNCH_SERVICE) as PoWorkflowLaunchService | undefined;\n}\n\nexport function readPoWorkflowDefinitionSourcesService(\n context: Context,\n): PoWorkflowDefinitionSourcesService | undefined {\n return context.get(PO_WORKFLOW_DEFINITION_SOURCES_SERVICE) as PoWorkflowDefinitionSourcesService | undefined;\n}\n\nexport function readPoWorkflowRunsService(context: Context): PoWorkflowRunsService | undefined {\n return context.get(PO_WORKFLOW_RUNS_SERVICE) as PoWorkflowRunsService | undefined;\n}\n\nexport function readPoWorkflowContextService(context: Context): PoWorkflowContextService | undefined {\n return context.get(PO_WORKFLOW_CONTEXT_SERVICE) as PoWorkflowContextService | undefined;\n}\n\nexport function readPoWorkflowAdmissionsService(context: Context): PoWorkflowAdmissionsService | undefined {\n return context.get(PO_WORKFLOW_ADMISSIONS_SERVICE) as PoWorkflowAdmissionsService | undefined;\n}\n"],"mappings":";;AAGA,MAAa,6BAA6B;AAC1C,MAAa,yCAAyC;AACtD,MAAa,2BAA2B;AACxC,MAAa,8BAA8B;AAC3C,MAAa,iCAAiC;;AAG9C,MAAa,gCAAgC,KAAK,OAChD;CACE,QAAQ,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CACpC,KAAK,KAAK,OAAO;EACf,WAAW;EACX,SAAS;CACX,CAAC;AACH,GACA,EAAE,sBAAsB,MAAM,CAChC;;AAIA,MAAa,yBAAyB,KAAK,OACzC;CACE,OAAO,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CACnC,gBAAgB,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CAC5C,QAAQ,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CACpC,mBAAmB,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;AACjD,GACA,EAAE,sBAAsB,MAAM,CAChC;AA+SA,SAAgB,4BAA4B,SAAuD;CACjG,OAAO,QAAQ,IAAI,0BAA0B;AAC/C;AAEA,SAAgB,uCACd,SACgD;CAChD,OAAO,QAAQ,IAAI,sCAAsC;AAC3D;AAEA,SAAgB,0BAA0B,SAAqD;CAC7F,OAAO,QAAQ,IAAI,wBAAwB;AAC7C;AAEA,SAAgB,6BAA6B,SAAwD;CACnG,OAAO,QAAQ,IAAI,2BAA2B;AAChD;AAEA,SAAgB,gCAAgC,SAA2D;CACzG,OAAO,QAAQ,IAAI,8BAA8B;AACnD"}
|
|
1
|
+
{"version":3,"file":"workflow.mjs","names":[],"sources":["../../../src/schemas/workflow.ts"],"sourcesContent":["import type { Context } from '@deepseek-ai/cordis';\nimport { type Static, Type } from 'typebox';\n\nexport const PO_WORKFLOW_LAUNCH_SERVICE = 'po/workflow-launch';\nexport const PO_WORKFLOW_DEFINITION_SOURCES_SERVICE = 'po/workflow-definition-sources';\nexport const PO_WORKFLOW_RUNS_SERVICE = 'po/workflow-runs';\nexport const PO_WORKFLOW_CONTEXT_SERVICE = 'po/workflow-context';\nexport const PO_WORKFLOW_ADMISSIONS_SERVICE = 'po/workflow-admissions';\nexport const PO_WORKFLOW_IDENTITY_SERVICE = 'po/workflow-identity';\n\n/** A source-relative definition, never an arbitrary host path. */\nexport const PoWorkflowDefinitionRefSchema = Type.Object(\n {\n source: Type.String({ minLength: 1 }),\n key: Type.String({\n minLength: 1,\n pattern: '^(?!/)(?!.*\\\\\\\\)(?!.*:)(?!.*[\\\\u0000-\\\\u001f\\\\u007f])(?!.*(?:^|/)\\\\.{1,2}(?:/|$))[^/]+(?:/[^/]+)*$',\n }),\n },\n { additionalProperties: false },\n);\nexport type PoWorkflowDefinitionRef = Static<typeof PoWorkflowDefinitionRefSchema>;\n\n/** Registration receipt. runId fences a runKey that can be reused later. */\nexport const PoWorkflowRunRefSchema = Type.Object(\n {\n runId: Type.String({ minLength: 1 }),\n ownerSessionId: Type.String({ minLength: 1 }),\n runKey: Type.String({ minLength: 1 }),\n registryWorkspace: Type.String({ minLength: 1 }),\n },\n { additionalProperties: false },\n);\nexport type PoWorkflowRunRef = Static<typeof PoWorkflowRunRefSchema>;\n\nexport interface PoWorkflowLaunchOverrides {\n readonly runner?: string;\n readonly command?: string;\n readonly choice?: string;\n readonly job?: string;\n readonly inputs?: Readonly<Record<string, string>>;\n readonly env?: Readonly<Record<string, string>>;\n readonly prompt?: string;\n readonly name?: string;\n /** Team whose members role-bound jobs resolve to, instead of the workflow's default team. */\n readonly team?: string;\n}\n\n/** Session-owned. Rejection means no observable registration was accepted. */\nexport interface PoWorkflowLaunchService {\n launch(definition: PoWorkflowDefinitionRef, overrides?: PoWorkflowLaunchOverrides): Promise<PoWorkflowRunRef>;\n}\n\n/** Non-secret host association. Environment variables never establish this binding. */\nexport interface PoWorkflowPolicyAssociation {\n readonly coordinator: string;\n readonly key: string;\n}\n\n/** Independent of runId and executionGeneration, including continue-next resumes. */\nexport interface PoWorkflowOperationEpoch {\n readonly admissionId: string;\n readonly operationId: string;\n}\n\nexport interface PoWorkflowPolicyBinding {\n readonly association: PoWorkflowPolicyAssociation;\n readonly epoch: PoWorkflowOperationEpoch;\n}\n\nexport interface PoWorkflowExecutionPolicyRequest {\n readonly binding: PoWorkflowPolicyBinding;\n readonly reason: 'launch' | 'recover' | 'startup' | 'resume';\n readonly ownerSessionId: string;\n readonly launcherSessionId: string;\n /** The engine supplies the actual persisted run after createRun, including startup and recovery. */\n readonly run?: PoWorkflowRunRef;\n readonly previousRun?: PoWorkflowRunRef;\n /** Ephemeral host lifetime, never persisted. */\n readonly signal: AbortSignal;\n}\n\nexport interface PoWorkflowExecutionPolicyResult {\n /** Trusted non-secret context only. PO_* and WORKFLOW_* engine identity keys are forbidden. */\n readonly environment?: Readonly<Record<string, string>>;\n}\n\n/**\n * How a bound generation ended. `abandoned` is a person giving up a failed run: it is never recovered.\n * A coordinator releases what it holds for success, skipped and abandoned, and keeps it for failed and\n * interrupted so a recovery of the run reuses it.\n */\nexport type PoWorkflowSettlementOutcome = PoWorkflowOutcome | 'abandoned';\n\nexport interface PoWorkflowSettlementRequest {\n readonly binding: PoWorkflowPolicyBinding;\n readonly run: PoWorkflowRunRef;\n readonly outcome: PoWorkflowSettlementOutcome;\n readonly failedJob?: string;\n readonly ownerSessionId: string;\n readonly launcherSessionId: string;\n /** Ephemeral host lifetime, never persisted. */\n readonly signal: AbortSignal;\n}\n\nexport interface PoWorkflowPolicyOptions {\n readonly environmentKeys: readonly string[];\n /**\n * Called once a bound generation is terminal, and again with `abandoned` if a person abandons it.\n * Delivery is durable: the engine retries until this resolves, including after a restart or a\n * remount, so it must be idempotent. Throwing leaves the settlement pending.\n */\n readonly settle?: (request: PoWorkflowSettlementRequest) => Promise<void>;\n}\n\nexport interface PoWorkflowAdmissionOverrides extends PoWorkflowLaunchOverrides {\n readonly policy?: PoWorkflowPolicyAssociation;\n /**\n * Run the workflow as this same-workspace session instead of the caller, for example a session in an\n * isolated checkout. Trusted in-process launchers only: never accepted from tools, code mode or HTTP.\n */\n readonly targetSessionId?: string;\n}\n\nexport interface PoWorkflowRecoveryOptions {\n readonly runner?: string;\n}\n\nexport type PoWorkflowAdmissionRequest =\n | {\n readonly kind: 'launch';\n readonly definition: PoWorkflowDefinitionRef;\n readonly overrides?: PoWorkflowAdmissionOverrides;\n }\n | { readonly kind: 'recover'; readonly previousRun: PoWorkflowRunRef; readonly options?: PoWorkflowRecoveryOptions };\n\nexport interface PoWorkflowValidationReport {\n readonly errors: readonly { readonly code: string; readonly message: string; readonly location?: string }[];\n readonly warnings: readonly { readonly code: string; readonly message: string; readonly location?: string }[];\n readonly deferred: readonly { readonly location: string; readonly reference: string; readonly reason: string }[];\n /** Declared by the definition and reported only: the engine never provisions a checkout itself. */\n readonly isolation?: 'checkout';\n}\n\nexport type PoWorkflowAdmission =\n | {\n readonly attemptId: string;\n readonly admissionId: string;\n readonly state: 'pending';\n readonly binding?: PoWorkflowPolicyBinding;\n }\n | {\n readonly attemptId: string;\n readonly admissionId: string;\n readonly state: 'rejected';\n readonly errors: readonly string[];\n }\n | {\n readonly attemptId: string;\n readonly admissionId: string;\n readonly state: 'registered';\n readonly run: PoWorkflowRunRef;\n readonly binding?: PoWorkflowPolicyBinding;\n };\n\n/** Trusted, session-bound opt-in capability, never exposed as a tool or code-mode namespace. */\nexport interface PoWorkflowAdmissionsService {\n validate(request: PoWorkflowAdmissionRequest): Promise<PoWorkflowValidationReport>;\n launch(\n attemptId: string,\n definition: PoWorkflowDefinitionRef,\n overrides?: PoWorkflowAdmissionOverrides,\n ): Promise<PoWorkflowAdmission>;\n recover(\n attemptId: string,\n previousRun: PoWorkflowRunRef,\n options?: PoWorkflowRecoveryOptions,\n ): Promise<PoWorkflowAdmission>;\n /** Undefined is unknown or unauthorized, never proof that an executor did not start. */\n read(attemptId: string): Promise<PoWorkflowAdmission | undefined>;\n /** Session-owned registration. Duplicate (source session, coordinator) is rejected.\n * Disposal is generation-fenced. Remounting only reattaches; other sessions never supply this callback.\n * The engine persists the source launcher identity and never falls back to another session's policy.\n */\n registerPolicy(\n coordinator: string,\n beforeExecution: (request: PoWorkflowExecutionPolicyRequest) => Promise<PoWorkflowExecutionPolicyResult | void>,\n options: PoWorkflowPolicyOptions,\n ): { dispose(): void };\n}\nexport interface PoWorkflowDefinitionSource {\n readonly source: string;\n /** An admitted, materialized absolute directory. Registration does not fetch it. */\n readonly directory: string;\n}\n\nexport interface PoWorkflowDefinitionSourceHandle {\n readonly source: string;\n readonly generation: string;\n dispose(): void;\n}\n\n/** Workspace-owned registry. Disposal withdraws only the handle's registration. */\nexport interface PoWorkflowDefinitionSourcesService {\n register(contribution: PoWorkflowDefinitionSource): PoWorkflowDefinitionSourceHandle;\n list(): readonly PoWorkflowDefinitionSource[];\n subscribe(listener: (sources: readonly PoWorkflowDefinitionSource[]) => void): () => void;\n}\n\nexport type PoWorkflowStage = 'running' | 'completed' | 'error';\nexport type PoWorkflowOutcome = 'success' | 'skipped' | 'failed' | 'interrupted';\nexport type PoWorkflowProgressState =\n | 'pending'\n | 'running'\n | 'completed'\n | 'skipped'\n | 'failed'\n | 'pause_requested'\n | 'paused'\n | 'resumed';\n\nexport interface PoWorkflowStepState {\n readonly name: string;\n readonly status: PoWorkflowProgressState;\n readonly ref?: { readonly kind: string; readonly id: string; readonly label?: string };\n readonly reason?: string;\n}\n\nexport interface PoWorkflowJobState {\n readonly name: string;\n readonly phase: 'pre' | 'job' | 'post';\n readonly status: PoWorkflowProgressState;\n readonly steps: readonly PoWorkflowStepState[];\n}\n\nexport interface PoWorkflowRunState {\n readonly run: PoWorkflowRunRef;\n readonly stage: PoWorkflowStage;\n readonly outcome?: PoWorkflowOutcome;\n /** From the same persisted snapshot as stage/outcome, never a newer cached operation. */\n readonly binding?: PoWorkflowPolicyBinding;\n readonly jobs: readonly PoWorkflowJobState[];\n readonly children?: readonly PoWorkflowChildrenStatus[];\n}\n\n/** The parsed definition actually used, not a re-read of mutable YAML on disk. */\nexport interface PoWorkflowConfig {\n readonly definition: PoWorkflowDefinitionRef;\n readonly revision: string;\n /** Engine-owned YAML vocabulary. Core does not import or implement the parser. */\n readonly workflow: Readonly<Record<string, unknown>>;\n}\n\n/** Owner-authoritative views, or an authorized projection for a launcher. */\nexport interface PoWorkflowRunsService {\n readConfig(runId: string): Promise<PoWorkflowConfig | undefined>;\n readState(runId: string): Promise<PoWorkflowRunState | undefined>;\n /** Replays the latest state, including terminal state, before subsequent updates. */\n subscribe(runId: string, listener: (state: PoWorkflowRunState) => void): () => void;\n}\n\nexport interface PoWorkflowChildInvocation {\n readonly invocationId: string;\n readonly job: string;\n readonly state: 'running' | 'completed' | 'failed' | 'interrupted';\n readonly sessionIds: readonly string[];\n readonly startedAt: string;\n readonly endedAt?: string;\n readonly error?: string;\n readonly usage?: import('./hubChannel').PoHubSessionUsage;\n}\n\nexport interface PoWorkflowCriterionState {\n readonly key: string;\n readonly description: string;\n readonly verifiedBy: string;\n readonly status: 'unchecked' | 'checked' | 'not-met';\n readonly feedback?: string;\n readonly invocationId?: string;\n}\n\nexport interface PoWorkflowChildrenStatus {\n readonly lead: string;\n readonly continuations: number;\n readonly maxContinuations: number;\n readonly criteria: readonly PoWorkflowCriterionState[];\n readonly invocations: readonly PoWorkflowChildInvocation[];\n}\n\n/** In-process, caller-bound capability. Never accepted from a tool or serialized. */\nexport interface PoWorkflowChildrenSession {\n readonly role: 'lead' | 'child' | 'consumer';\n spawnChild?(input: {\n job: string;\n prompt: string;\n inputs?: Record<string, string | number | boolean>;\n }): Promise<PoWorkflowChildInvocation>;\n childStatus?(input: { invocationId: string }): Promise<PoWorkflowChildInvocation>;\n children?(): Promise<PoWorkflowChildrenStatus>;\n reportCriteria?(input: {\n results: Record<string, { status: 'checked' | 'not-met'; feedback?: string }>;\n }): Promise<void>;\n /** Immutable pre-review snapshot selected by the runtime, not mutable paths. */\n reviewArtifacts?(): Promise<{ revision: string; artifacts: Readonly<Record<string, string>> }>;\n /** Returns exactly the accepted bytes, after a fresh authoritative ledger/revision check. */\n acceptedArtifacts?(input: {\n job: string;\n }): Promise<{ revision: string; artifacts: Readonly<Record<string, string>> }>;\n}\n\n/** Bound only in the trusted step-session bootstrap, before packages mount. */\nexport interface PoWorkflowContextService {\n readonly run: PoWorkflowRunRef;\n readonly job: string;\n readonly step: string;\n readonly attempt: number;\n readonly config: PoWorkflowConfig;\n readonly jobEnvironment: Readonly<Record<string, string>>;\n readonly stepEnvironment: Readonly<Record<string, string>>;\n readonly traceparent?: string;\n /** Absolute path of the workflow's instructions file, read in place of the discovered AGENTS.md files. */\n readonly instructions?: string;\n readonly state: PoWorkflowRunsService;\n readonly children?: PoWorkflowChildrenSession;\n}\n\nexport interface PoWorkflowIdentityRequest {\n readonly team: string;\n /** Every role the job declares; all of them must belong to one member. */\n readonly roles: readonly string[];\n}\n\n/** One member a job was admitted as. Kept in run state, so it carries names and digests, never secrets. */\nexport interface PoWorkflowIdentityBinding {\n readonly team: string;\n readonly teamRevision: string;\n readonly product?: string;\n readonly roles: readonly string[];\n /** Stable across machines; the local profile name may differ between them. */\n readonly ref: string;\n readonly profile: string;\n readonly contentDigest: string;\n readonly policyDigest: string;\n}\n\n/**\n * Resolves role-bound workflow jobs to team members. Bound per workspace by the package that owns\n * profiles and teams; the workspace comes from that scope, never from workflow input. Both calls\n * throw, without naming secrets, when no single authorized member qualifies.\n */\nexport interface PoWorkflowIdentityService {\n resolve(request: PoWorkflowIdentityRequest): Promise<PoWorkflowIdentityBinding>;\n /** Rechecks a saved binding against the current team and authorization, returning it as it stands now. */\n revalidate(binding: PoWorkflowIdentityBinding): Promise<PoWorkflowIdentityBinding>;\n}\n\n// These are in-process capabilities, not remote session-create fields or durable records.\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n 'po/workflow-launch': PoWorkflowLaunchService;\n 'po/workflow-definition-sources': PoWorkflowDefinitionSourcesService;\n 'po/workflow-runs': PoWorkflowRunsService;\n 'po/workflow-context': PoWorkflowContextService;\n 'po/workflow-admissions': PoWorkflowAdmissionsService;\n 'po/workflow-identity': PoWorkflowIdentityService;\n }\n}\n\nexport function readPoWorkflowLaunchService(context: Context): PoWorkflowLaunchService | undefined {\n return context.get(PO_WORKFLOW_LAUNCH_SERVICE) as PoWorkflowLaunchService | undefined;\n}\n\nexport function readPoWorkflowDefinitionSourcesService(\n context: Context,\n): PoWorkflowDefinitionSourcesService | undefined {\n return context.get(PO_WORKFLOW_DEFINITION_SOURCES_SERVICE) as PoWorkflowDefinitionSourcesService | undefined;\n}\n\nexport function readPoWorkflowRunsService(context: Context): PoWorkflowRunsService | undefined {\n return context.get(PO_WORKFLOW_RUNS_SERVICE) as PoWorkflowRunsService | undefined;\n}\n\nexport function readPoWorkflowContextService(context: Context): PoWorkflowContextService | undefined {\n return context.get(PO_WORKFLOW_CONTEXT_SERVICE) as PoWorkflowContextService | undefined;\n}\n\nexport function readPoWorkflowAdmissionsService(context: Context): PoWorkflowAdmissionsService | undefined {\n return context.get(PO_WORKFLOW_ADMISSIONS_SERVICE) as PoWorkflowAdmissionsService | undefined;\n}\n\nexport function readPoWorkflowIdentityService(context: Context): PoWorkflowIdentityService | undefined {\n return context.get(PO_WORKFLOW_IDENTITY_SERVICE) as PoWorkflowIdentityService | undefined;\n}\n"],"mappings":";;AAGA,MAAa,6BAA6B;AAC1C,MAAa,yCAAyC;AACtD,MAAa,2BAA2B;AACxC,MAAa,8BAA8B;AAC3C,MAAa,iCAAiC;AAC9C,MAAa,+BAA+B;;AAG5C,MAAa,gCAAgC,KAAK,OAChD;CACE,QAAQ,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CACpC,KAAK,KAAK,OAAO;EACf,WAAW;EACX,SAAS;CACX,CAAC;AACH,GACA,EAAE,sBAAsB,MAAM,CAChC;;AAIA,MAAa,yBAAyB,KAAK,OACzC;CACE,OAAO,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CACnC,gBAAgB,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CAC5C,QAAQ,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;CACpC,mBAAmB,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;AACjD,GACA,EAAE,sBAAsB,MAAM,CAChC;AAgVA,SAAgB,4BAA4B,SAAuD;CACjG,OAAO,QAAQ,IAAI,0BAA0B;AAC/C;AAEA,SAAgB,uCACd,SACgD;CAChD,OAAO,QAAQ,IAAI,sCAAsC;AAC3D;AAEA,SAAgB,0BAA0B,SAAqD;CAC7F,OAAO,QAAQ,IAAI,wBAAwB;AAC7C;AAEA,SAAgB,6BAA6B,SAAwD;CACnG,OAAO,QAAQ,IAAI,2BAA2B;AAChD;AAEA,SAAgB,gCAAgC,SAA2D;CACzG,OAAO,QAAQ,IAAI,8BAA8B;AACnD;AAEA,SAAgB,8BAA8B,SAAyD;CACrG,OAAO,QAAQ,IAAI,4BAA4B;AACjD"}
|
package/dist/workflow.cjs
CHANGED
|
@@ -3,6 +3,7 @@ const require_workflow = require("./src/schemas/workflow.cjs");
|
|
|
3
3
|
exports.PO_WORKFLOW_ADMISSIONS_SERVICE = require_workflow.PO_WORKFLOW_ADMISSIONS_SERVICE;
|
|
4
4
|
exports.PO_WORKFLOW_CONTEXT_SERVICE = require_workflow.PO_WORKFLOW_CONTEXT_SERVICE;
|
|
5
5
|
exports.PO_WORKFLOW_DEFINITION_SOURCES_SERVICE = require_workflow.PO_WORKFLOW_DEFINITION_SOURCES_SERVICE;
|
|
6
|
+
exports.PO_WORKFLOW_IDENTITY_SERVICE = require_workflow.PO_WORKFLOW_IDENTITY_SERVICE;
|
|
6
7
|
exports.PO_WORKFLOW_LAUNCH_SERVICE = require_workflow.PO_WORKFLOW_LAUNCH_SERVICE;
|
|
7
8
|
exports.PO_WORKFLOW_RUNS_SERVICE = require_workflow.PO_WORKFLOW_RUNS_SERVICE;
|
|
8
9
|
exports.PoWorkflowDefinitionRefSchema = require_workflow.PoWorkflowDefinitionRefSchema;
|
|
@@ -10,5 +11,6 @@ exports.PoWorkflowRunRefSchema = require_workflow.PoWorkflowRunRefSchema;
|
|
|
10
11
|
exports.readPoWorkflowAdmissionsService = require_workflow.readPoWorkflowAdmissionsService;
|
|
11
12
|
exports.readPoWorkflowContextService = require_workflow.readPoWorkflowContextService;
|
|
12
13
|
exports.readPoWorkflowDefinitionSourcesService = require_workflow.readPoWorkflowDefinitionSourcesService;
|
|
14
|
+
exports.readPoWorkflowIdentityService = require_workflow.readPoWorkflowIdentityService;
|
|
13
15
|
exports.readPoWorkflowLaunchService = require_workflow.readPoWorkflowLaunchService;
|
|
14
16
|
exports.readPoWorkflowRunsService = require_workflow.readPoWorkflowRunsService;
|
package/dist/workflow.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PO_WORKFLOW_ADMISSIONS_SERVICE, PO_WORKFLOW_CONTEXT_SERVICE, PO_WORKFLOW_DEFINITION_SOURCES_SERVICE, PO_WORKFLOW_LAUNCH_SERVICE, PO_WORKFLOW_RUNS_SERVICE, PoWorkflowAdmission, PoWorkflowAdmissionOverrides, PoWorkflowAdmissionRequest, PoWorkflowAdmissionsService, PoWorkflowChildInvocation, PoWorkflowChildrenSession, PoWorkflowChildrenStatus, PoWorkflowConfig, PoWorkflowContextService, PoWorkflowCriterionState, PoWorkflowDefinitionRef, PoWorkflowDefinitionRefSchema, PoWorkflowDefinitionSource, PoWorkflowDefinitionSourceHandle, PoWorkflowDefinitionSourcesService, PoWorkflowExecutionPolicyRequest, PoWorkflowExecutionPolicyResult, PoWorkflowJobState, PoWorkflowLaunchOverrides, PoWorkflowLaunchService, PoWorkflowOperationEpoch, PoWorkflowOutcome, PoWorkflowPolicyAssociation, PoWorkflowPolicyBinding, PoWorkflowPolicyOptions, PoWorkflowProgressState, PoWorkflowRecoveryOptions, PoWorkflowRunRef, PoWorkflowRunRefSchema, PoWorkflowRunState, PoWorkflowRunsService, PoWorkflowSettlementOutcome, PoWorkflowSettlementRequest, PoWorkflowStage, PoWorkflowStepState, PoWorkflowValidationReport, readPoWorkflowAdmissionsService, readPoWorkflowContextService, readPoWorkflowDefinitionSourcesService, readPoWorkflowLaunchService, readPoWorkflowRunsService } from "./src/schemas/workflow.mjs";
|
|
2
|
-
export { PO_WORKFLOW_ADMISSIONS_SERVICE, PO_WORKFLOW_CONTEXT_SERVICE, PO_WORKFLOW_DEFINITION_SOURCES_SERVICE, PO_WORKFLOW_LAUNCH_SERVICE, PO_WORKFLOW_RUNS_SERVICE, type PoWorkflowAdmission, type PoWorkflowAdmissionOverrides, type PoWorkflowAdmissionRequest, type PoWorkflowAdmissionsService, type PoWorkflowChildInvocation, type PoWorkflowChildrenSession, type PoWorkflowChildrenStatus, type PoWorkflowConfig, type PoWorkflowContextService, type PoWorkflowCriterionState, type PoWorkflowDefinitionRef, PoWorkflowDefinitionRefSchema, type PoWorkflowDefinitionSource, type PoWorkflowDefinitionSourceHandle, type PoWorkflowDefinitionSourcesService, type PoWorkflowExecutionPolicyRequest, type PoWorkflowExecutionPolicyResult, type PoWorkflowJobState, type PoWorkflowLaunchOverrides, type PoWorkflowLaunchService, type PoWorkflowOperationEpoch, type PoWorkflowOutcome, type PoWorkflowPolicyAssociation, type PoWorkflowPolicyBinding, type PoWorkflowPolicyOptions, type PoWorkflowProgressState, type PoWorkflowRecoveryOptions, type PoWorkflowRunRef, PoWorkflowRunRefSchema, type PoWorkflowRunState, type PoWorkflowRunsService, type PoWorkflowSettlementOutcome, type PoWorkflowSettlementRequest, type PoWorkflowStage, type PoWorkflowStepState, type PoWorkflowValidationReport, readPoWorkflowAdmissionsService, readPoWorkflowContextService, readPoWorkflowDefinitionSourcesService, readPoWorkflowLaunchService, readPoWorkflowRunsService };
|
|
1
|
+
import { PO_WORKFLOW_ADMISSIONS_SERVICE, PO_WORKFLOW_CONTEXT_SERVICE, PO_WORKFLOW_DEFINITION_SOURCES_SERVICE, PO_WORKFLOW_IDENTITY_SERVICE, PO_WORKFLOW_LAUNCH_SERVICE, PO_WORKFLOW_RUNS_SERVICE, PoWorkflowAdmission, PoWorkflowAdmissionOverrides, PoWorkflowAdmissionRequest, PoWorkflowAdmissionsService, PoWorkflowChildInvocation, PoWorkflowChildrenSession, PoWorkflowChildrenStatus, PoWorkflowConfig, PoWorkflowContextService, PoWorkflowCriterionState, PoWorkflowDefinitionRef, PoWorkflowDefinitionRefSchema, PoWorkflowDefinitionSource, PoWorkflowDefinitionSourceHandle, PoWorkflowDefinitionSourcesService, PoWorkflowExecutionPolicyRequest, PoWorkflowExecutionPolicyResult, PoWorkflowIdentityBinding, PoWorkflowIdentityRequest, PoWorkflowIdentityService, PoWorkflowJobState, PoWorkflowLaunchOverrides, PoWorkflowLaunchService, PoWorkflowOperationEpoch, PoWorkflowOutcome, PoWorkflowPolicyAssociation, PoWorkflowPolicyBinding, PoWorkflowPolicyOptions, PoWorkflowProgressState, PoWorkflowRecoveryOptions, PoWorkflowRunRef, PoWorkflowRunRefSchema, PoWorkflowRunState, PoWorkflowRunsService, PoWorkflowSettlementOutcome, PoWorkflowSettlementRequest, PoWorkflowStage, PoWorkflowStepState, PoWorkflowValidationReport, readPoWorkflowAdmissionsService, readPoWorkflowContextService, readPoWorkflowDefinitionSourcesService, readPoWorkflowIdentityService, readPoWorkflowLaunchService, readPoWorkflowRunsService } from "./src/schemas/workflow.mjs";
|
|
2
|
+
export { PO_WORKFLOW_ADMISSIONS_SERVICE, PO_WORKFLOW_CONTEXT_SERVICE, PO_WORKFLOW_DEFINITION_SOURCES_SERVICE, PO_WORKFLOW_IDENTITY_SERVICE, PO_WORKFLOW_LAUNCH_SERVICE, PO_WORKFLOW_RUNS_SERVICE, type PoWorkflowAdmission, type PoWorkflowAdmissionOverrides, type PoWorkflowAdmissionRequest, type PoWorkflowAdmissionsService, type PoWorkflowChildInvocation, type PoWorkflowChildrenSession, type PoWorkflowChildrenStatus, type PoWorkflowConfig, type PoWorkflowContextService, type PoWorkflowCriterionState, type PoWorkflowDefinitionRef, PoWorkflowDefinitionRefSchema, type PoWorkflowDefinitionSource, type PoWorkflowDefinitionSourceHandle, type PoWorkflowDefinitionSourcesService, type PoWorkflowExecutionPolicyRequest, type PoWorkflowExecutionPolicyResult, type PoWorkflowIdentityBinding, type PoWorkflowIdentityRequest, type PoWorkflowIdentityService, type PoWorkflowJobState, type PoWorkflowLaunchOverrides, type PoWorkflowLaunchService, type PoWorkflowOperationEpoch, type PoWorkflowOutcome, type PoWorkflowPolicyAssociation, type PoWorkflowPolicyBinding, type PoWorkflowPolicyOptions, type PoWorkflowProgressState, type PoWorkflowRecoveryOptions, type PoWorkflowRunRef, PoWorkflowRunRefSchema, type PoWorkflowRunState, type PoWorkflowRunsService, type PoWorkflowSettlementOutcome, type PoWorkflowSettlementRequest, type PoWorkflowStage, type PoWorkflowStepState, type PoWorkflowValidationReport, readPoWorkflowAdmissionsService, readPoWorkflowContextService, readPoWorkflowDefinitionSourcesService, readPoWorkflowIdentityService, readPoWorkflowLaunchService, readPoWorkflowRunsService };
|
package/dist/workflow.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { PO_WORKFLOW_ADMISSIONS_SERVICE, PO_WORKFLOW_CONTEXT_SERVICE, PO_WORKFLOW_DEFINITION_SOURCES_SERVICE, PO_WORKFLOW_LAUNCH_SERVICE, PO_WORKFLOW_RUNS_SERVICE, PoWorkflowDefinitionRefSchema, PoWorkflowRunRefSchema, readPoWorkflowAdmissionsService, readPoWorkflowContextService, readPoWorkflowDefinitionSourcesService, readPoWorkflowLaunchService, readPoWorkflowRunsService } from "./src/schemas/workflow.mjs";
|
|
1
|
+
export { PO_WORKFLOW_ADMISSIONS_SERVICE, PO_WORKFLOW_CONTEXT_SERVICE, PO_WORKFLOW_DEFINITION_SOURCES_SERVICE, PO_WORKFLOW_IDENTITY_SERVICE, PO_WORKFLOW_LAUNCH_SERVICE, PO_WORKFLOW_RUNS_SERVICE, PoWorkflowDefinitionRefSchema, PoWorkflowRunRefSchema, readPoWorkflowAdmissionsService, readPoWorkflowContextService, readPoWorkflowDefinitionSourcesService, readPoWorkflowIdentityService, readPoWorkflowLaunchService, readPoWorkflowRunsService } from "./src/schemas/workflow.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/po-core",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.120",
|
|
4
4
|
"description": "Po runtime systems and reusable core services.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -609,8 +609,8 @@
|
|
|
609
609
|
"registry": "https://registry.npmjs.org/"
|
|
610
610
|
},
|
|
611
611
|
"dependencies": {
|
|
612
|
-
"@agimon-ai/po-logsink": "0.0.1-alpha.
|
|
613
|
-
"@agimon-ai/po-web-security": "0.0.0-alpha.
|
|
612
|
+
"@agimon-ai/po-logsink": "0.0.1-alpha.102",
|
|
613
|
+
"@agimon-ai/po-web-security": "0.0.0-alpha.120",
|
|
614
614
|
"@deepseek-ai/cordis": "4.0.5",
|
|
615
615
|
"@earendil-works/chord": "1.5.0",
|
|
616
616
|
"@earendil-works/pi-agent-core": "1.5.0",
|
|
@@ -636,7 +636,7 @@
|
|
|
636
636
|
"yaml": "2.9.1"
|
|
637
637
|
},
|
|
638
638
|
"devDependencies": {
|
|
639
|
-
"@agimon-ai/vibe-lint-plugin-po-core": "0.0.0-alpha.
|
|
639
|
+
"@agimon-ai/vibe-lint-plugin-po-core": "0.0.0-alpha.120",
|
|
640
640
|
"@apidevtools/swagger-parser": "^13.1.0",
|
|
641
641
|
"@asyncapi/parser": "^3.6.4",
|
|
642
642
|
"@earendil-works/pi-ai": "1.5.0",
|