@xemahq/kernel-contracts 0.5.1 → 0.7.0
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/agent-composition/lib/capability-layer.d.ts +6 -6
- package/dist/agent-composition/lib/capability-layer.d.ts.map +1 -1
- package/dist/agent-composition/lib/capability-layer.js +3 -3
- package/dist/agent-composition/lib/capability-layer.js.map +1 -1
- package/dist/agent-composition/lib/composition-limits-schema.d.ts +2 -2
- package/dist/agent-composition/lib/composition-limits-schema.d.ts.map +1 -1
- package/dist/agent-composition/lib/composition-limits-schema.js +2 -2
- package/dist/agent-composition/lib/composition-limits-schema.js.map +1 -1
- package/dist/agent-composition/lib/composition-workspace.d.ts +9 -9
- package/dist/agent-composition/lib/composition-workspace.d.ts.map +1 -1
- package/dist/agent-composition/lib/composition-workspace.js +6 -6
- package/dist/agent-composition/lib/composition-workspace.js.map +1 -1
- package/dist/agent-composition/lib/composition.d.ts +22 -22
- package/dist/agent-composition/lib/composition.d.ts.map +1 -1
- package/dist/agent-composition/lib/composition.js +15 -15
- package/dist/agent-composition/lib/composition.js.map +1 -1
- package/dist/agent-composition/lib/invocation-overlay.d.ts.map +1 -1
- package/dist/agent-workspace/awp-spec.json +1 -1
- package/dist/contribution/lib/contribution-kind.d.ts +1 -1
- package/dist/contribution/lib/contribution-kind.d.ts.map +1 -1
- package/dist/contribution/lib/contribution-kind.js +1 -1
- package/dist/contribution/lib/contribution-kind.js.map +1 -1
- package/dist/invocation/lib/invocation-record.d.ts +1 -1
- package/dist/invocation/lib/invocation-record.d.ts.map +1 -1
- package/dist/invocation/lib/invocation-record.js +1 -1
- package/dist/invocation/lib/invocation-record.js.map +1 -1
- package/dist/invocation/lib/invoke-request.d.ts +3 -3
- package/dist/invocation/lib/invoke-request.d.ts.map +1 -1
- package/dist/invocation/lib/invoke-request.js +3 -3
- package/dist/invocation/lib/invoke-request.js.map +1 -1
- package/dist/invocation/lib/invoke-response.d.ts +2 -2
- package/dist/invocation/lib/invoke-response.d.ts.map +1 -1
- package/dist/invocation/lib/invoke-response.js +2 -2
- package/dist/invocation/lib/invoke-response.js.map +1 -1
- package/dist/object/lib/xema-object-kind.d.ts +1 -1
- package/dist/object/lib/xema-object-kind.d.ts.map +1 -1
- package/dist/object/lib/xema-object-kind.js +1 -1
- package/dist/object/lib/xema-object-kind.js.map +1 -1
- package/dist/workflow/lib/compiled-run.d.ts +0 -4
- package/dist/workflow/lib/compiled-run.d.ts.map +1 -1
- package/dist/workflow/lib/mount-plan.d.ts +1 -1
- package/dist/workflow/lib/mount-plan.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/agent-composition/index.ts +2 -2
- package/src/agent-composition/lib/capability-layer.ts +9 -9
- package/src/agent-composition/lib/composition-limits-schema.ts +4 -4
- package/src/agent-composition/lib/composition-workspace.ts +18 -18
- package/src/agent-composition/lib/composition.ts +28 -28
- package/src/agent-composition/lib/invocation-overlay.ts +2 -3
- package/src/agent-workspace/lib/working-file.ts +1 -1
- package/src/agent-workspace/lib/workspace-spec.ts +3 -3
- package/src/biome-availability/lib/biome-availability.ts +3 -3
- package/src/contribution/lib/contribution-kind.ts +1 -1
- package/src/contribution/lib/contribution-source.ts +1 -1
- package/src/distribution/lib/distribution.ts +1 -1
- package/src/document-templates/lib/document-template.ts +1 -1
- package/src/invocation/lib/execution-requirements.ts +1 -1
- package/src/invocation/lib/invocation-mode.ts +1 -1
- package/src/invocation/lib/invocation-record.ts +2 -2
- package/src/invocation/lib/invoke-request.ts +7 -7
- package/src/invocation/lib/invoke-response.ts +3 -3
- package/src/object/lib/object-lifecycle.ts +1 -1
- package/src/object/lib/xema-object-kind.ts +2 -2
- package/src/object/lib/xema-object.ts +2 -2
- package/src/workflow/lib/compiled-run.ts +9 -17
- package/src/workflow/lib/compiled-workspace-manifest.ts +1 -1
- package/src/workflow/lib/errors.ts +2 -2
- package/src/workflow/lib/model-ref.ts +1 -1
- package/src/workflow/lib/mount-plan.ts +1 -1
|
@@ -19,9 +19,9 @@ export enum XemaObjectKind {
|
|
|
19
19
|
ExternalSubject = 'external-subject',
|
|
20
20
|
DelegatedSession = 'delegated-session',
|
|
21
21
|
|
|
22
|
-
// Agent runtime primitives
|
|
22
|
+
// Agent runtime primitives — a base kernel armed into an Agent
|
|
23
|
+
AgentKernel = 'agent-kernel',
|
|
23
24
|
Agent = 'agent',
|
|
24
|
-
AgentComposition = 'agent-composition',
|
|
25
25
|
Skill = 'skill',
|
|
26
26
|
Tool = 'tool',
|
|
27
27
|
Model = 'model',
|
|
@@ -35,11 +35,11 @@ export const SubjectRefSchema = z.object({
|
|
|
35
35
|
* - `ref` is the wire-stable address (`XemaObjectRef`).
|
|
36
36
|
* - `kind` is the closed `XemaObjectKind` enum value.
|
|
37
37
|
* - `scope` is the 5-tier ownership reference (single ownership model
|
|
38
|
-
* shared with `SkillSpace` / `
|
|
38
|
+
* shared with `SkillSpace` / `AgentSpace`).
|
|
39
39
|
* - `owner` is the subject that owns the object.
|
|
40
40
|
* - `version` is a semver string. Resolution serves only `Published`
|
|
41
41
|
* versions per `ObjectLifecycle` semantics.
|
|
42
|
-
* - `lifecycle` mirrors `
|
|
42
|
+
* - `lifecycle` mirrors `AgentLifecycle` (draft/published/archived).
|
|
43
43
|
* - `payload` is kind-specific; the resolved schema is supplied by the
|
|
44
44
|
* owning domain contract package.
|
|
45
45
|
*/
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { CompiledWorkspaceManifest } from './compiled-workspace-manifest';
|
|
2
|
-
|
|
3
1
|
import type { BiomeAvailabilityScoped } from '../../biome-availability';
|
|
4
2
|
import type { ActionRef } from './action-ref';
|
|
5
3
|
import type { Briefcase } from './briefcase';
|
|
@@ -11,30 +9,24 @@ import type { TriggerPayload } from './trigger-payload';
|
|
|
11
9
|
import type { WorkflowVariableRequirement } from './variable-requirement';
|
|
12
10
|
|
|
13
11
|
/**
|
|
14
|
-
* Pre-resolved manifest source for `xema/agent`-shaped jobs.
|
|
15
|
-
*
|
|
12
|
+
* Pre-resolved manifest source for `xema/agent`-shaped jobs. `agentRef`
|
|
13
|
+
* is the SOLE way a workflow names its agent — the workflow-dsl compiler
|
|
14
|
+
* emits exactly one variant per agent step:
|
|
16
15
|
*
|
|
17
|
-
* • `ref` —
|
|
16
|
+
* • `ref` — `with.agentRef` is a literal `<slug>` (or
|
|
18
17
|
* `<slug>@<version>`) that the activity resolves at boot via
|
|
19
|
-
* llm-registry-api's Agent
|
|
18
|
+
* llm-registry-api's Agent `GET /compositions/resolve/
|
|
20
19
|
* :ref`, reconstructing the compiled workspace manifest from the
|
|
21
20
|
* resolved composition's `workspace.mountLayout` block.
|
|
22
|
-
* • `inline` —
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* `compileManifest()` once and embeds the result so the worker
|
|
26
|
-
* skips both the DB round-trip and the runtime synthesis step.
|
|
27
|
-
* • `inline-deferred` — short-form whose agent metadata still
|
|
28
|
-
* contains `${{ … }}` expressions; the worker synthesizes the
|
|
29
|
-
* inline manifest after expression evaluation.
|
|
21
|
+
* • `inline-deferred` — `with.agentRef` is a `${{ … }}` expression
|
|
22
|
+
* that resolves per dispatch; the worker resolves the named Agent
|
|
23
|
+
* after expression evaluation.
|
|
30
24
|
*
|
|
31
25
|
* `null` for non-agent actions (compileManifestSource short-circuits
|
|
32
|
-
* when the action manifest's `inputs.properties` lacks
|
|
33
|
-
* `compositionRef` and `mounts`).
|
|
26
|
+
* when the action manifest's `inputs.properties` lacks `agentRef`).
|
|
34
27
|
*/
|
|
35
28
|
export type CompiledManifestSource =
|
|
36
29
|
| { readonly kind: 'ref'; readonly ref: string }
|
|
37
|
-
| { readonly kind: 'inline'; readonly compiled: CompiledWorkspaceManifest }
|
|
38
30
|
| { readonly kind: 'inline-deferred' };
|
|
39
31
|
|
|
40
32
|
/**
|
|
@@ -80,7 +80,7 @@ export interface CompiledManifestAgent {
|
|
|
80
80
|
* manifest's `spec.agent.instructions` (WS5 Phase B: author a migrated
|
|
81
81
|
* agent as `base agent slug + instructions`). A prompt fragment the
|
|
82
82
|
* runtime layers ONTO the referenced base agent's intrinsic system
|
|
83
|
-
* prompt — semantically the same as `
|
|
83
|
+
* prompt — semantically the same as `AgentNode.instructions`.
|
|
84
84
|
* Absent = the base agent's prompt passes through unchanged.
|
|
85
85
|
*/
|
|
86
86
|
readonly instructions?: string;
|
|
@@ -18,9 +18,9 @@ export enum WorkflowErrorCode {
|
|
|
18
18
|
DSL_UNKNOWN_ACTION = 'DSL_UNKNOWN_ACTION',
|
|
19
19
|
DSL_UNKNOWN_REUSABLE_WORKFLOW = 'DSL_UNKNOWN_REUSABLE_WORKFLOW',
|
|
20
20
|
/**
|
|
21
|
-
* A literal `with.
|
|
21
|
+
* A literal `with.agentRef` (or `with.reviewers[].agentRef`) value
|
|
22
22
|
* does not appear in the resolvedAgents map the engine passed to the
|
|
23
|
-
* compiler. Indicates a typo, a stale
|
|
23
|
+
* compiler. Indicates a typo, a stale ref, or a new agent that was
|
|
24
24
|
* never seeded into llm-registry.
|
|
25
25
|
*/
|
|
26
26
|
DSL_UNKNOWN_AGENT = 'DSL_UNKNOWN_AGENT',
|
|
@@ -148,7 +148,7 @@ export function isStrategyModelRef(ref: ModelRef): ref is StrategyModelRef {
|
|
|
148
148
|
* The INVOCATION-overlay fragment shared by EVERY "agent node" shape — the
|
|
149
149
|
* genuinely-identical trio that specializes a referenced agent WITHOUT
|
|
150
150
|
* authoring a new definition. Single declaration site (the
|
|
151
|
-
* `ModelRef`/`PermissionMap` reuse pattern): `
|
|
151
|
+
* `ModelRef`/`PermissionMap` reuse pattern): `AgentNode`,
|
|
152
152
|
* `SubAgentBinding`, the compiled manifest agent block, and the typed
|
|
153
153
|
* workflow/session invocation overlays all `extends` this — the trio is
|
|
154
154
|
* never restated per shape.
|
|
@@ -113,7 +113,7 @@ export type MountSource =
|
|
|
113
113
|
| { readonly kind: 'static-literal'; readonly pathWithinWorkspace: string; readonly bytes: string }
|
|
114
114
|
// Platform-rendered (PR 1 of unified-workspace-image refactor):
|
|
115
115
|
| {
|
|
116
|
-
readonly kind: 'agent-
|
|
116
|
+
readonly kind: 'agent-kernel';
|
|
117
117
|
readonly orgId: string;
|
|
118
118
|
readonly agentSlug: string;
|
|
119
119
|
readonly stageKey: string;
|