@xemahq/dsl 0.1.7 → 0.2.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.
@@ -26,11 +26,11 @@ function compileManifestSource(jobKey, withBlock, actionManifest) {
26
26
  return Object.freeze({ kind: 'inline-deferred' });
27
27
  }
28
28
  const agentSlug = block['agentSlug'];
29
- const phaseKey = block['phaseKey'];
29
+ const stageKey = block['stageKey'];
30
30
  const deliverableSpecRef = block['deliverableSpecRef'];
31
31
  const roleRaw = block['role'];
32
32
  if (!isLiteralString(agentSlug) ||
33
- !isLiteralStringOrUndefined(phaseKey) ||
33
+ !isLiteralStringOrUndefined(stageKey) ||
34
34
  !isLiteralStringOrNullOrUndefined(deliverableSpecRef) ||
35
35
  !isLiteralStringOrUndefined(roleRaw)) {
36
36
  return Object.freeze({ kind: 'inline-deferred' });
@@ -42,7 +42,7 @@ function compileManifestSource(jobKey, withBlock, actionManifest) {
42
42
  const role = roleRaw;
43
43
  const envelope = synthesizeInlineManifestEnvelope({
44
44
  agentSlug,
45
- phaseKey: typeof phaseKey === 'string' ? phaseKey : null,
45
+ stageKey: typeof stageKey === 'string' ? stageKey : null,
46
46
  role,
47
47
  deliverableSpecRef: typeof deliverableSpecRef === 'string' ? deliverableSpecRef : null,
48
48
  mounts: mounts,
@@ -68,7 +68,7 @@ function synthesizeInlineManifestEnvelope(args) {
68
68
  spec: {
69
69
  agent: {
70
70
  slug: args.agentSlug,
71
- phase: args.phaseKey ?? 'default',
71
+ stage: args.stageKey ?? 'default',
72
72
  role: args.role,
73
73
  ...(args.deliverableSpecRef === null
74
74
  ? {}
@@ -50,7 +50,7 @@ function compileManifest(input, bindInputs = {}, options = {}) {
50
50
  display: compileDisplay(manifest.metadata.display),
51
51
  agent: {
52
52
  slug: resolvedSpec.agent.slug,
53
- groupKey: resolvedSpec.agent.phase,
53
+ stageKey: resolvedSpec.agent.stage,
54
54
  role: resolvedSpec.agent.role,
55
55
  ...(resolvedSpec.agent.deliverableSpecRef === undefined
56
56
  ? {}
@@ -88,7 +88,7 @@ export declare const ManifestSubAgentSchema: z.ZodObject<{
88
88
  }, z.core.$strict>;
89
89
  export declare const ManifestAgentBlockSchema: z.ZodObject<{
90
90
  slug: z.ZodString;
91
- phase: z.ZodString;
91
+ stage: z.ZodString;
92
92
  role: z.ZodEnum<{
93
93
  "agent-session": "agent-session";
94
94
  "unit-worker": "unit-worker";
@@ -328,7 +328,7 @@ export declare const WorkspaceManifestSpecSchema: z.ZodObject<{
328
328
  }, z.core.$strict>]>>>;
329
329
  agent: z.ZodObject<{
330
330
  slug: z.ZodString;
331
- phase: z.ZodString;
331
+ stage: z.ZodString;
332
332
  role: z.ZodEnum<{
333
333
  "agent-session": "agent-session";
334
334
  "unit-worker": "unit-worker";
@@ -592,7 +592,7 @@ export declare const WorkspaceManifestSchema: z.ZodObject<{
592
592
  }, z.core.$strict>]>>>;
593
593
  agent: z.ZodObject<{
594
594
  slug: z.ZodString;
595
- phase: z.ZodString;
595
+ stage: z.ZodString;
596
596
  role: z.ZodEnum<{
597
597
  "agent-session": "agent-session";
598
598
  "unit-worker": "unit-worker";
@@ -80,7 +80,7 @@ exports.ManifestSubAgentSchema = zod_1.z
80
80
  exports.ManifestAgentBlockSchema = zod_1.z
81
81
  .object({
82
82
  slug: zod_1.z.string().min(1),
83
- phase: zod_1.z.string().min(1),
83
+ stage: zod_1.z.string().min(1),
84
84
  role: AgentRunRoleEnumSchema,
85
85
  deliverableSpecRef: zod_1.z.string().optional(),
86
86
  defaultModel: exports.ManifestModelRefSchema.optional(),
@@ -104,7 +104,7 @@ export type ManifestMountDeclaration = boolean | {
104
104
  };
105
105
  export interface ManifestAgentBlock {
106
106
  readonly slug: string;
107
- readonly phase: string;
107
+ readonly stage: string;
108
108
  readonly role: AgentRunRole;
109
109
  readonly deliverableSpecRef?: string;
110
110
  readonly defaultModel?: ManifestModelRef;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xemahq/dsl",
3
- "version": "0.1.7",
3
+ "version": "0.2.0",
4
4
  "description": "Consolidated Xema OS DSL bundle — pure compilers/codecs for the workflow DSL, workspace-manifest DSL, deliverable-spec DSL, and the Temporal payload codec. One package, per-surface subpath exports. No framework/runtime deps.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -29,7 +29,7 @@
29
29
  "ajv-formats": "^3.0.1",
30
30
  "js-yaml": "^4.1.0",
31
31
  "zod": "^4.3.6",
32
- "@xemahq/kernel-contracts": "0.3.7"
32
+ "@xemahq/kernel-contracts": "0.4.0"
33
33
  },
34
34
  "exports": {
35
35
  "./*": {
@@ -27,8 +27,8 @@ const INLINE_MANIFEST_VERSION = '0.0.0';
27
27
  * • `{ kind: 'ref', ref }` — long-form ref is a literal string. The
28
28
  * activity resolves the Agent Composition it names at boot.
29
29
  * • `{ kind: 'inline', compiled }` — short-form mounts and every
30
- * value the inline manifest depends on (`agentSlug`, `phaseKey`
31
- * (YAML field — mapped onto kernel `groupKey`), `deliverableSpecRef`,
30
+ * value the inline manifest depends on (`agentSlug`, `stageKey`
31
+ * (YAML field — mapped onto kernel `stageKey`), `deliverableSpecRef`,
32
32
  * every entry of `mounts`) are YAML literals.
33
33
  * We synthesize a `WorkspaceManifest` envelope and feed it through
34
34
  * `compileManifest()` once at workflow compile so the worker skips
@@ -70,12 +70,12 @@ export function compileManifestSource(
70
70
  }
71
71
 
72
72
  const agentSlug = block['agentSlug'];
73
- const phaseKey = block['phaseKey'];
73
+ const stageKey = block['stageKey'];
74
74
  const deliverableSpecRef = block['deliverableSpecRef'];
75
75
  const roleRaw = block['role'];
76
76
  if (
77
77
  !isLiteralString(agentSlug) ||
78
- !isLiteralStringOrUndefined(phaseKey) ||
78
+ !isLiteralStringOrUndefined(stageKey) ||
79
79
  !isLiteralStringOrNullOrUndefined(deliverableSpecRef) ||
80
80
  !isLiteralStringOrUndefined(roleRaw)
81
81
  ) {
@@ -93,7 +93,7 @@ export function compileManifestSource(
93
93
  const role = roleRaw;
94
94
  const envelope = synthesizeInlineManifestEnvelope({
95
95
  agentSlug,
96
- phaseKey: typeof phaseKey === 'string' ? phaseKey : null,
96
+ stageKey: typeof stageKey === 'string' ? stageKey : null,
97
97
  role,
98
98
  deliverableSpecRef:
99
99
  typeof deliverableSpecRef === 'string' ? deliverableSpecRef : null,
@@ -115,7 +115,7 @@ export function compileManifestSource(
115
115
 
116
116
  interface SynthesizeArgs {
117
117
  readonly agentSlug: string;
118
- readonly phaseKey: string | null;
118
+ readonly stageKey: string | null;
119
119
  readonly role: string;
120
120
  readonly deliverableSpecRef: string | null;
121
121
  readonly mounts: Readonly<Record<string, unknown>>;
@@ -143,7 +143,7 @@ function synthesizeInlineManifestEnvelope(args: SynthesizeArgs): unknown {
143
143
  spec: {
144
144
  agent: {
145
145
  slug: args.agentSlug,
146
- phase: args.phaseKey ?? 'default',
146
+ stage: args.stageKey ?? 'default',
147
147
  role: args.role,
148
148
  ...(args.deliverableSpecRef === null
149
149
  ? {}
@@ -119,7 +119,7 @@ export function compileManifest(
119
119
  display: compileDisplay(manifest.metadata.display),
120
120
  agent: {
121
121
  slug: resolvedSpec.agent.slug,
122
- groupKey: resolvedSpec.agent.phase,
122
+ stageKey: resolvedSpec.agent.stage,
123
123
  role: resolvedSpec.agent.role,
124
124
  ...(resolvedSpec.agent.deliverableSpecRef === undefined
125
125
  ? {}
@@ -194,7 +194,7 @@ export const ManifestSubAgentSchema = z
194
194
  export const ManifestAgentBlockSchema = z
195
195
  .object({
196
196
  slug: z.string().min(1),
197
- phase: z.string().min(1),
197
+ stage: z.string().min(1),
198
198
  /**
199
199
  * The agent's role on the surface this manifest provisions. Closed
200
200
  * enum — the canonical list lives in `@xemahq/kernel-contracts/workflow`'s
@@ -291,8 +291,8 @@ export type ManifestMountDeclaration =
291
291
  export interface ManifestAgentBlock {
292
292
  /** Agent slug to compose. May reference `${input.x}`. */
293
293
  readonly slug: string;
294
- /** Phase key (e.g. `engineering`, `interactive`). */
295
- readonly phase: string;
294
+ /** Stage key (e.g. `engineering`, `interactive`). */
295
+ readonly stage: string;
296
296
  /**
297
297
  * Worker role — drives AGENTS.md rendering and the system-overlay
298
298
  * `authority` block surfaced to the agent.