@xemahq/kernel-contracts 0.13.3 → 0.14.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/composition-limits-schema.d.ts +4 -0
- package/dist/agent-composition/lib/composition-limits-schema.d.ts.map +1 -0
- package/dist/agent-composition/lib/composition-limits-schema.js +13 -0
- package/dist/agent-composition/lib/composition-limits-schema.js.map +1 -0
- package/dist/agent-composition/lib/composition-workspace.d.ts +37 -0
- package/dist/agent-composition/lib/composition-workspace.d.ts.map +1 -0
- package/dist/agent-composition/lib/composition-workspace.js +9 -0
- package/dist/agent-composition/lib/composition-workspace.js.map +1 -0
- package/dist/agent-composition/lib/composition.d.ts +65 -0
- package/dist/agent-composition/lib/composition.d.ts.map +1 -0
- package/dist/agent-composition/lib/composition.js +18 -0
- package/dist/agent-composition/lib/composition.js.map +1 -0
- package/dist/agent-workspace/awp-spec.json +1 -1
- package/dist/agent-workspace/lib/awp-v1.d.ts +15 -0
- package/dist/agent-workspace/lib/awp-v1.d.ts.map +1 -0
- package/dist/agent-workspace/lib/awp-v1.js +197 -0
- package/dist/agent-workspace/lib/awp-v1.js.map +1 -0
- package/dist/contribution/index.d.ts +1 -0
- package/dist/contribution/index.d.ts.map +1 -1
- package/dist/contribution/index.js +1 -0
- package/dist/contribution/index.js.map +1 -1
- package/dist/contribution/lib/sync.d.ts +75 -0
- package/dist/contribution/lib/sync.d.ts.map +1 -0
- package/dist/contribution/lib/sync.js +45 -0
- package/dist/contribution/lib/sync.js.map +1 -0
- package/dist/resource/lib/resource-managed-by.d.ts +2 -0
- package/dist/resource/lib/resource-managed-by.d.ts.map +1 -1
- package/dist/resource/lib/resource-managed-by.js +2 -0
- package/dist/resource/lib/resource-managed-by.js.map +1 -1
- package/dist/space/index.d.ts +1 -0
- package/dist/space/index.d.ts.map +1 -1
- package/dist/space/index.js +1 -0
- package/dist/space/index.js.map +1 -1
- package/dist/space/lib/skill-mirror-path.d.ts +4 -0
- package/dist/space/lib/skill-mirror-path.d.ts.map +1 -0
- package/dist/space/lib/skill-mirror-path.js +37 -0
- package/dist/space/lib/skill-mirror-path.js.map +1 -0
- package/package.json +1 -1
- package/src/biome/lib/biome-manifest.ts +1 -1
- package/src/contribution/index.ts +1 -0
- package/src/contribution/lib/sync.ts +132 -0
- package/src/resource/lib/resource-managed-by.ts +15 -2
- package/src/space/index.ts +1 -0
- package/src/space/lib/skill-mirror-path.ts +82 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition-limits-schema.d.ts","sourceRoot":"","sources":["../../../src/agent-composition/lib/composition-limits-schema.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AASjD,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAO1C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgentLimitsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.AgentLimitsSchema = zod_1.z
|
|
6
|
+
.object({
|
|
7
|
+
maxDepth: zod_1.z.number().int().positive(),
|
|
8
|
+
maxFanout: zod_1.z.number().int().positive(),
|
|
9
|
+
maxSpawns: zod_1.z.number().int().positive(),
|
|
10
|
+
tokenBudget: zod_1.z.number().int().positive().optional(),
|
|
11
|
+
})
|
|
12
|
+
.strict();
|
|
13
|
+
//# sourceMappingURL=composition-limits-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition-limits-schema.js","sourceRoot":"","sources":["../../../src/agent-composition/lib/composition-limits-schema.ts"],"names":[],"mappings":";;;AAmBA,6BAAwB;AAWX,QAAA,iBAAiB,GAA2B,OAAC;KACvD,MAAM,CAAC;IACN,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACrC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACtC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACtC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACpD,CAAC;KACD,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { WorkingFileBinding, WorkspaceEnvVar, WorkspacePersistenceSpec } from '../../agent-workspace';
|
|
2
|
+
import type { AgentRunRole, CompiledManifestCredential, CompiledManifestPermissions, OutputSurfaceKind } from '../../workflow';
|
|
3
|
+
export type { WorkingFileBinding, WorkspaceEnvVar, WorkspacePersistenceSpec, } from '../../agent-workspace';
|
|
4
|
+
export declare enum AgentOutputSurfaceMode {
|
|
5
|
+
Single = "single",
|
|
6
|
+
Multi = "multi"
|
|
7
|
+
}
|
|
8
|
+
export interface AgentOutputSurface {
|
|
9
|
+
readonly kind: OutputSurfaceKind;
|
|
10
|
+
readonly port?: number;
|
|
11
|
+
readonly healthPath?: string;
|
|
12
|
+
readonly autoOpen?: boolean;
|
|
13
|
+
readonly mode?: AgentOutputSurfaceMode;
|
|
14
|
+
readonly root?: string;
|
|
15
|
+
readonly defaultDocument?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface AgentRunConfig {
|
|
18
|
+
readonly stage: string;
|
|
19
|
+
readonly role: AgentRunRole;
|
|
20
|
+
readonly deliverableSpecRef?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface AgentMountLayout {
|
|
23
|
+
readonly mounts: Readonly<Record<string, unknown>>;
|
|
24
|
+
readonly agentRunConfig: AgentRunConfig;
|
|
25
|
+
readonly seedFiles: readonly Readonly<Record<string, unknown>>[];
|
|
26
|
+
readonly inputs: Readonly<Record<string, unknown>>;
|
|
27
|
+
}
|
|
28
|
+
export interface AgentWorkspaceConfig {
|
|
29
|
+
readonly persistence?: WorkspacePersistenceSpec;
|
|
30
|
+
readonly env?: readonly WorkspaceEnvVar[];
|
|
31
|
+
readonly outputSurface?: AgentOutputSurface;
|
|
32
|
+
readonly mountLayout?: AgentMountLayout;
|
|
33
|
+
readonly workingFiles?: readonly WorkingFileBinding[];
|
|
34
|
+
readonly credentials?: readonly CompiledManifestCredential[];
|
|
35
|
+
readonly permissions?: CompiledManifestPermissions;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=composition-workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition-workspace.d.ts","sourceRoot":"","sources":["../../../src/agent-composition/lib/composition-workspace.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,YAAY,EACZ,0BAA0B,EAC1B,2BAA2B,EAC3B,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAQ/B,oBAAY,sBAAsB;IAChC,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAsBD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAE7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAE5B,QAAQ,CAAC,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAMvC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAMvB,QAAQ,CAAC,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urfaceMode["Single"] = "single";
|
|
7
|
+
AgentOutputSurfaceMode["Multi"] = "multi";
|
|
8
|
+
})(AgentOutputSurfaceMode || (exports.AgentOutputSurfaceMode = AgentOutputSurfaceMode = {}));
|
|
9
|
+
//# sourceMappingURL=composition-workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition-workspace.js","sourceRoot":"","sources":["../../../src/agent-composition/lib/composition-workspace.ts"],"names":[],"mappings":";;;AA6CA,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,2CAAiB,CAAA;IACjB,yCAAe,CAAA;AACjB,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { ToolSelectionEntry } from '../../mcp-tool';
|
|
2
|
+
import type { NodeOverlayFragment } from '../../workflow';
|
|
3
|
+
import type { SkillRef } from '../../skill';
|
|
4
|
+
import type { BiomeAvailabilityScoped } from '../../biome-availability';
|
|
5
|
+
import type { CapabilityLayer } from './capability-layer';
|
|
6
|
+
import type { AgentWorkspaceConfig } from './composition-workspace';
|
|
7
|
+
export interface AgentKernelRef {
|
|
8
|
+
readonly slug: string;
|
|
9
|
+
readonly version?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare enum AgentSpace {
|
|
12
|
+
System = "system",
|
|
13
|
+
Biome = "biome",
|
|
14
|
+
Org = "org",
|
|
15
|
+
Project = "project",
|
|
16
|
+
User = "user"
|
|
17
|
+
}
|
|
18
|
+
export declare enum AgentLifecycle {
|
|
19
|
+
Draft = "draft",
|
|
20
|
+
Published = "published",
|
|
21
|
+
Archived = "archived"
|
|
22
|
+
}
|
|
23
|
+
export interface AgentLimits {
|
|
24
|
+
readonly maxDepth: number;
|
|
25
|
+
readonly maxFanout: number;
|
|
26
|
+
readonly maxSpawns: number;
|
|
27
|
+
readonly tokenBudget?: number | undefined;
|
|
28
|
+
}
|
|
29
|
+
export interface AgentNode extends NodeOverlayFragment, BiomeAvailabilityScoped {
|
|
30
|
+
readonly kernel: AgentKernelRef;
|
|
31
|
+
readonly alias?: string;
|
|
32
|
+
readonly skills: readonly SkillRef[];
|
|
33
|
+
readonly tools: readonly ToolSelectionEntry[];
|
|
34
|
+
readonly children: readonly AgentNode[];
|
|
35
|
+
readonly limits?: AgentLimits;
|
|
36
|
+
}
|
|
37
|
+
export interface Agent {
|
|
38
|
+
readonly slug: string;
|
|
39
|
+
readonly version: string;
|
|
40
|
+
readonly displayName: string;
|
|
41
|
+
readonly description?: string;
|
|
42
|
+
readonly scope: AgentSpace;
|
|
43
|
+
readonly lifecycle: AgentLifecycle;
|
|
44
|
+
readonly root: AgentNode;
|
|
45
|
+
readonly capability?: CapabilityLayer;
|
|
46
|
+
readonly workspace?: AgentWorkspaceConfig;
|
|
47
|
+
}
|
|
48
|
+
export interface ResolvedAgentNode extends NodeOverlayFragment, BiomeAvailabilityScoped {
|
|
49
|
+
readonly kernel: Required<AgentKernelRef>;
|
|
50
|
+
readonly alias?: string;
|
|
51
|
+
readonly skills: readonly SkillRef[];
|
|
52
|
+
readonly tools: readonly ToolSelectionEntry[];
|
|
53
|
+
readonly children: readonly ResolvedAgentNode[];
|
|
54
|
+
readonly limits?: AgentLimits;
|
|
55
|
+
}
|
|
56
|
+
export interface ResolvedAgent {
|
|
57
|
+
readonly slug: string;
|
|
58
|
+
readonly version: string;
|
|
59
|
+
readonly displayName: string;
|
|
60
|
+
readonly scope: AgentSpace;
|
|
61
|
+
readonly root: ResolvedAgentNode;
|
|
62
|
+
readonly capability: CapabilityLayer;
|
|
63
|
+
readonly workspace?: AgentWorkspaceConfig;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=composition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition.d.ts","sourceRoot":"","sources":["../../../src/agent-composition/lib/composition.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAA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"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgentLifecycle = exports.AgentSpace = void 0;
|
|
4
|
+
var AgentSpace;
|
|
5
|
+
(function (AgentSpace) {
|
|
6
|
+
AgentSpace["System"] = "system";
|
|
7
|
+
AgentSpace["Biome"] = "biome";
|
|
8
|
+
AgentSpace["Org"] = "org";
|
|
9
|
+
AgentSpace["Project"] = "project";
|
|
10
|
+
AgentSpace["User"] = "user";
|
|
11
|
+
})(AgentSpace || (exports.AgentSpace = AgentSpace = {}));
|
|
12
|
+
var AgentLifecycle;
|
|
13
|
+
(function (AgentLifecycle) {
|
|
14
|
+
AgentLifecycle["Draft"] = "draft";
|
|
15
|
+
AgentLifecycle["Published"] = "published";
|
|
16
|
+
AgentLifecycle["Archived"] = "archived";
|
|
17
|
+
})(AgentLifecycle || (exports.AgentLifecycle = AgentLifecycle = {}));
|
|
18
|
+
//# sourceMappingURL=composition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition.js","sourceRoot":"","sources":["../../../src/agent-composition/lib/composition.ts"],"names":[],"mappings":";;;AAoCA,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,6BAAe,CAAA;IACf,yBAAW,CAAA;IACX,iCAAmB,CAAA;IACnB,2BAAa,CAAA;AACf,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB;AAQD,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,yCAAuB,CAAA;IACvB,uCAAqB,CAAA;AACvB,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GitPushBranchSuffix, GitPushConcurrencyMode, type WorkspaceSpec } from './workspace-spec';
|
|
2
|
+
export declare const AWP_V1_SPEC: WorkspaceSpec;
|
|
3
|
+
export declare function findSlot(spec: WorkspaceSpec, key: string): import("./workspace-spec").SlotDefinition | undefined;
|
|
4
|
+
export declare function isKnownSlotKey(spec: WorkspaceSpec, key: string): boolean;
|
|
5
|
+
export declare function listAlwaysOnSlotKeys(spec: WorkspaceSpec): readonly string[];
|
|
6
|
+
export declare function listTarballPersistedRelPaths(spec: WorkspaceSpec): readonly string[];
|
|
7
|
+
export interface ResolvedGitPushSlot {
|
|
8
|
+
readonly key: string;
|
|
9
|
+
readonly path: string;
|
|
10
|
+
readonly branchPrefix: string;
|
|
11
|
+
readonly branchSuffix: GitPushBranchSuffix;
|
|
12
|
+
readonly concurrencyMode: GitPushConcurrencyMode;
|
|
13
|
+
}
|
|
14
|
+
export declare function listGitPushPersistedSlots(spec: WorkspaceSpec): readonly ResolvedGitPushSlot[];
|
|
15
|
+
//# sourceMappingURL=awp-v1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"awp-v1.d.ts","sourceRoot":"","sources":["../../../src/agent-workspace/lib/awp-v1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EAEtB,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAC;AAgB1B,eAAO,MAAM,WAAW,EAAE,aAwMzB,CAAC;AAMF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,yDAExD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAExE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,MAAM,EAAE,CAE3E;AAQD,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,MAAM,EAAE,CAInF;AAQD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,QAAQ,CAAC,eAAe,EAAE,sBAAsB,CAAC;CAClD;AAOD,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,aAAa,GAClB,SAAS,mBAAmB,EAAE,CAgBhC"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AWP_V1_SPEC = void 0;
|
|
4
|
+
exports.findSlot = findSlot;
|
|
5
|
+
exports.isKnownSlotKey = isKnownSlotKey;
|
|
6
|
+
exports.listAlwaysOnSlotKeys = listAlwaysOnSlotKeys;
|
|
7
|
+
exports.listTarballPersistedRelPaths = listTarballPersistedRelPaths;
|
|
8
|
+
exports.listGitPushPersistedSlots = listGitPushPersistedSlots;
|
|
9
|
+
const workspace_spec_1 = require("./workspace-spec");
|
|
10
|
+
exports.AWP_V1_SPEC = {
|
|
11
|
+
id: 'awp/v1',
|
|
12
|
+
version: '1.2.0',
|
|
13
|
+
slots: [
|
|
14
|
+
{
|
|
15
|
+
key: 'inputs',
|
|
16
|
+
path: '/workspace/inputs',
|
|
17
|
+
presence: 'always',
|
|
18
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly],
|
|
19
|
+
defaultMode: workspace_spec_1.SlotMode.ReadOnly,
|
|
20
|
+
ownership: 'user',
|
|
21
|
+
humanDescription: "Read-only inputs supplied at session/run start (the workflow's `with:` block or the session's customConfig). The DSL input bag lands at `inputs.json`.",
|
|
22
|
+
persistencePolicy: { kind: 'none' },
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
key: 'tmp',
|
|
26
|
+
path: '/workspace/tmp',
|
|
27
|
+
presence: 'always',
|
|
28
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadWrite],
|
|
29
|
+
defaultMode: workspace_spec_1.SlotMode.ReadWrite,
|
|
30
|
+
ownership: 'user',
|
|
31
|
+
humanDescription: 'Your scratch space — drafts, intermediate computation, working notes. Snapshot-persisted so retries see prior state. Never harvested.',
|
|
32
|
+
persistencePolicy: { kind: 'tarball' },
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
key: 'uploads',
|
|
36
|
+
path: '/workspace/uploads',
|
|
37
|
+
presence: 'optional',
|
|
38
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly],
|
|
39
|
+
defaultMode: workspace_spec_1.SlotMode.ReadOnly,
|
|
40
|
+
ownership: 'user',
|
|
41
|
+
humanDescription: 'User-uploaded files (briefs, screenshots, sketches). Read-only — never write here.',
|
|
42
|
+
persistencePolicy: { kind: 'tarball' },
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
key: 'references',
|
|
46
|
+
path: '/workspace/references',
|
|
47
|
+
presence: 'optional',
|
|
48
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly],
|
|
49
|
+
defaultMode: workspace_spec_1.SlotMode.ReadOnly,
|
|
50
|
+
ownership: 'user',
|
|
51
|
+
humanDescription: 'Curated evidence library (knowledge-base spaces, prior artifacts, external project mounts). Read-only.',
|
|
52
|
+
persistencePolicy: { kind: 'none' },
|
|
53
|
+
subSlots: [
|
|
54
|
+
{
|
|
55
|
+
key: 'kb',
|
|
56
|
+
path: '/workspace/references/kb',
|
|
57
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly],
|
|
58
|
+
defaultMode: workspace_spec_1.SlotMode.ReadOnly,
|
|
59
|
+
ownership: 'user',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: 'external-projects',
|
|
63
|
+
path: '/workspace/references/external-projects',
|
|
64
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly],
|
|
65
|
+
defaultMode: workspace_spec_1.SlotMode.ReadOnly,
|
|
66
|
+
ownership: 'user',
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: 'deliverable-specs',
|
|
72
|
+
path: '/workspace/deliverable-specs',
|
|
73
|
+
presence: 'optional',
|
|
74
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly],
|
|
75
|
+
defaultMode: workspace_spec_1.SlotMode.ReadOnly,
|
|
76
|
+
ownership: 'user',
|
|
77
|
+
humanDescription: 'Schemas + metadata for the deliverable spec(s) this run targets. Read-only — consult before writing under deliverables/.',
|
|
78
|
+
persistencePolicy: { kind: 'none' },
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
key: 'deliverables',
|
|
82
|
+
path: '/workspace/deliverables',
|
|
83
|
+
presence: 'optional',
|
|
84
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly, workspace_spec_1.SlotMode.ReadWrite],
|
|
85
|
+
defaultMode: workspace_spec_1.SlotMode.ReadWrite,
|
|
86
|
+
ownership: 'user',
|
|
87
|
+
humanDescription: "Your writable output area. Files written here are harvested by the runtime per the deliverable spec's contract.",
|
|
88
|
+
persistencePolicy: { kind: 'tarball' },
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
key: 'repos',
|
|
92
|
+
path: '/workspace/repos',
|
|
93
|
+
presence: 'optional',
|
|
94
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly, workspace_spec_1.SlotMode.ReadWrite],
|
|
95
|
+
defaultMode: workspace_spec_1.SlotMode.ReadOnly,
|
|
96
|
+
ownership: 'user',
|
|
97
|
+
humanDescription: 'Project repositories. Read-only unless the workflow explicitly granted write authority (engineer roles only).',
|
|
98
|
+
persistencePolicy: { kind: 'git-push', branchPrefix: 'xema/session/' },
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: 'agents-md',
|
|
102
|
+
path: '/workspace/AGENTS.md',
|
|
103
|
+
presence: 'always',
|
|
104
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly],
|
|
105
|
+
defaultMode: workspace_spec_1.SlotMode.ReadOnly,
|
|
106
|
+
singleFile: true,
|
|
107
|
+
ownership: 'platform',
|
|
108
|
+
persistencePolicy: { kind: 'none' },
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
key: 'context-json',
|
|
112
|
+
path: '/workspace/context.json',
|
|
113
|
+
presence: 'always',
|
|
114
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly],
|
|
115
|
+
defaultMode: workspace_spec_1.SlotMode.ReadOnly,
|
|
116
|
+
singleFile: true,
|
|
117
|
+
ownership: 'platform',
|
|
118
|
+
persistencePolicy: { kind: 'none' },
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
key: 'system-overlay',
|
|
122
|
+
path: '/workspace/.xema/system-overlay.md',
|
|
123
|
+
presence: 'always',
|
|
124
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly],
|
|
125
|
+
defaultMode: workspace_spec_1.SlotMode.ReadOnly,
|
|
126
|
+
singleFile: true,
|
|
127
|
+
ownership: 'platform',
|
|
128
|
+
persistencePolicy: { kind: 'none' },
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
key: 'agent-bundles',
|
|
132
|
+
path: '/workspace/.opencode/agents',
|
|
133
|
+
presence: 'always',
|
|
134
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly],
|
|
135
|
+
defaultMode: workspace_spec_1.SlotMode.ReadOnly,
|
|
136
|
+
ownership: 'platform',
|
|
137
|
+
persistencePolicy: { kind: 'none' },
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
key: 'skill-bundles',
|
|
141
|
+
path: '/workspace/.opencode/skills',
|
|
142
|
+
presence: 'optional',
|
|
143
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly],
|
|
144
|
+
defaultMode: workspace_spec_1.SlotMode.ReadOnly,
|
|
145
|
+
ownership: 'platform',
|
|
146
|
+
persistencePolicy: { kind: 'none' },
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
key: 'commands',
|
|
150
|
+
path: '/workspace/.opencode/command',
|
|
151
|
+
presence: 'optional',
|
|
152
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly],
|
|
153
|
+
defaultMode: workspace_spec_1.SlotMode.ReadOnly,
|
|
154
|
+
ownership: 'platform',
|
|
155
|
+
persistencePolicy: { kind: 'none' },
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
key: 'instructions',
|
|
159
|
+
path: '/workspace/.xema/instructions',
|
|
160
|
+
presence: 'optional',
|
|
161
|
+
allowedModes: [workspace_spec_1.SlotMode.ReadOnly],
|
|
162
|
+
defaultMode: workspace_spec_1.SlotMode.ReadOnly,
|
|
163
|
+
ownership: 'platform',
|
|
164
|
+
persistencePolicy: { kind: 'none' },
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
};
|
|
168
|
+
function findSlot(spec, key) {
|
|
169
|
+
return spec.slots.find((s) => s.key === key);
|
|
170
|
+
}
|
|
171
|
+
function isKnownSlotKey(spec, key) {
|
|
172
|
+
return spec.slots.some((s) => s.key === key);
|
|
173
|
+
}
|
|
174
|
+
function listAlwaysOnSlotKeys(spec) {
|
|
175
|
+
return spec.slots.filter((s) => s.presence === 'always').map((s) => s.key);
|
|
176
|
+
}
|
|
177
|
+
function listTarballPersistedRelPaths(spec) {
|
|
178
|
+
return spec.slots
|
|
179
|
+
.filter((s) => s.persistencePolicy?.kind === 'tarball')
|
|
180
|
+
.map((s) => s.path.replace(/^\/workspace\//, ''));
|
|
181
|
+
}
|
|
182
|
+
function listGitPushPersistedSlots(spec) {
|
|
183
|
+
const out = [];
|
|
184
|
+
for (const slot of spec.slots) {
|
|
185
|
+
if (slot.persistencePolicy?.kind === 'git-push') {
|
|
186
|
+
out.push({
|
|
187
|
+
key: slot.key,
|
|
188
|
+
path: slot.path,
|
|
189
|
+
branchPrefix: slot.persistencePolicy.branchPrefix,
|
|
190
|
+
branchSuffix: slot.persistencePolicy.branchSuffix ?? workspace_spec_1.GitPushBranchSuffix.SessionId,
|
|
191
|
+
concurrencyMode: slot.persistencePolicy.concurrencyMode ?? workspace_spec_1.GitPushConcurrencyMode.Force,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return out;
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=awp-v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"awp-v1.js","sourceRoot":"","sources":["../../../src/agent-workspace/lib/awp-v1.ts"],"names":[],"mappings":";;;AAmOA,4BAEC;AAED,wCAEC;AAED,oDAEC;AAQD,oEAIC;AAqBD,8DAkBC;AAhSD,qDAK0B;AAgBb,QAAA,WAAW,GAAkB;IACxC,EAAE,EAAE,QAAQ;IACZ,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE;QACL;YACE,GAAG,EAAE,QAAQ;YACb,IAAI,EAAE,mBAAmB;YACzB,QAAQ,EAAE,QAAQ;YAClB,YAAY,EAAE,CAAC,yBAAQ,CAAC,QAAQ,CAAC;YACjC,WAAW,EAAE,yBAAQ,CAAC,QAAQ;YAC9B,SAAS,EAAE,MAAM;YACjB,gBAAgB,EACd,wJAAwJ;YAC1J,iBAAiB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SACpC;QACD;YAIE,GAAG,EAAE,KAAK;YACV,IAAI,EAAE,gBAAgB;YACtB,QAAQ,EAAE,QAAQ;YAClB,YAAY,EAAE,CAAC,yBAAQ,CAAC,SAAS,CAAC;YAClC,WAAW,EAAE,yBAAQ,CAAC,SAAS;YAC/B,SAAS,EAAE,MAAM;YACjB,gBAAgB,EACd,uIAAuI;YACzI,iBAAiB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SACvC;QACD;YACE,GAAG,EAAE,SAAS;YACd,IAAI,EAAE,oBAAoB;YAC1B,QAAQ,EAAE,UAAU;YACpB,YAAY,EAAE,CAAC,yBAAQ,CAAC,QAAQ,CAAC;YACjC,WAAW,EAAE,yBAAQ,CAAC,QAAQ;YAC9B,SAAS,EAAE,MAAM;YACjB,gBAAgB,EACd,oFAAoF;YACtF,iBAAiB,EAAE,EAAE,IAAI,EAAE,S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;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contribution/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contribution/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC"}
|
|
@@ -18,4 +18,5 @@ __exportStar(require("./lib/contribution-kind"), exports);
|
|
|
18
18
|
__exportStar(require("./lib/contribution-source"), exports);
|
|
19
19
|
__exportStar(require("./lib/contribution"), exports);
|
|
20
20
|
__exportStar(require("./lib/registry"), exports);
|
|
21
|
+
__exportStar(require("./lib/sync"), exports);
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contribution/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,4DAA0C;AAC1C,qDAAmC;AACnC,iDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contribution/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,4DAA0C;AAC1C,qDAAmC;AACnC,iDAA+B;AAC/B,6CAA2B"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ContributionKind } from './contribution-kind';
|
|
3
|
+
import { AnyContributionEnvelopeSchema } from './contribution';
|
|
4
|
+
export declare enum ContributionOwnerKind {
|
|
5
|
+
Biome = "biome",
|
|
6
|
+
RuntimeService = "runtime_service",
|
|
7
|
+
SystemSeed = "system_seed"
|
|
8
|
+
}
|
|
9
|
+
export declare const ContributionOwnerKindSchema: z.ZodEnum<typeof ContributionOwnerKind>;
|
|
10
|
+
export interface ContributionOwner {
|
|
11
|
+
readonly type: ContributionOwnerKind;
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly version?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const ContributionOwnerSchema: z.ZodObject<{
|
|
16
|
+
type: z.ZodEnum<typeof ContributionOwnerKind>;
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
version: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export declare enum ContributionSyncStatus {
|
|
21
|
+
NotSynced = "not_synced",
|
|
22
|
+
Syncing = "syncing",
|
|
23
|
+
Synced = "synced",
|
|
24
|
+
SyncFailed = "sync_failed",
|
|
25
|
+
PendingRetry = "pending_retry",
|
|
26
|
+
Partial = "partial"
|
|
27
|
+
}
|
|
28
|
+
export declare const ContributionSyncStatusSchema: z.ZodEnum<typeof ContributionSyncStatus>;
|
|
29
|
+
export interface ContributionSyncRequest {
|
|
30
|
+
readonly owner: ContributionOwner;
|
|
31
|
+
readonly kind: ContributionKind;
|
|
32
|
+
readonly items: readonly z.infer<typeof AnyContributionEnvelopeSchema>[];
|
|
33
|
+
readonly contentHash: string;
|
|
34
|
+
readonly syncToken: string;
|
|
35
|
+
}
|
|
36
|
+
export declare const ContributionSyncRequestSchema: z.ZodObject<{
|
|
37
|
+
owner: z.ZodObject<{
|
|
38
|
+
type: z.ZodEnum<typeof ContributionOwnerKind>;
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
version: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
kind: z.ZodEnum<typeof ContributionKind>;
|
|
43
|
+
items: z.ZodArray<z.ZodObject<{
|
|
44
|
+
kind: z.ZodEnum<typeof ContributionKind>;
|
|
45
|
+
slug: z.ZodString;
|
|
46
|
+
source: z.ZodEnum<typeof import("./contribution-source").ContributionSource>;
|
|
47
|
+
version: z.ZodString;
|
|
48
|
+
manifest: z.ZodUnknown;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
contentHash: z.ZodString;
|
|
51
|
+
syncToken: z.ZodString;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export interface ContributionSyncResult {
|
|
54
|
+
readonly owner: ContributionOwner;
|
|
55
|
+
readonly kind: ContributionKind;
|
|
56
|
+
readonly upserted: number;
|
|
57
|
+
readonly pruned: number;
|
|
58
|
+
readonly unchanged: number;
|
|
59
|
+
readonly skippedNoOp: boolean;
|
|
60
|
+
readonly status: ContributionSyncStatus;
|
|
61
|
+
}
|
|
62
|
+
export declare const ContributionSyncResultSchema: z.ZodObject<{
|
|
63
|
+
owner: z.ZodObject<{
|
|
64
|
+
type: z.ZodEnum<typeof ContributionOwnerKind>;
|
|
65
|
+
id: z.ZodString;
|
|
66
|
+
version: z.ZodOptional<z.ZodString>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
kind: z.ZodEnum<typeof ContributionKind>;
|
|
69
|
+
upserted: z.ZodNumber;
|
|
70
|
+
pruned: z.ZodNumber;
|
|
71
|
+
unchanged: z.ZodNumber;
|
|
72
|
+
skippedNoOp: z.ZodBoolean;
|
|
73
|
+
status: z.ZodEnum<typeof ContributionSyncStatus>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../src/contribution/lib/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAA0B,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AAqC/D,o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zC;AAED,eAAO,MAAM,4BAA4B;;;;;;;;;;;;iBAQvC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContributionSyncResultSchema = exports.ContributionSyncRequestSchema = exports.ContributionSyncStatusSchema = exports.ContributionSyncStatus = exports.ContributionOwnerSchema = exports.ContributionOwnerKindSchema = exports.ContributionOwnerKind = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const contribution_kind_1 = require("./contribution-kind");
|
|
6
|
+
const contribution_1 = require("./contribution");
|
|
7
|
+
var ContributionOwnerKind;
|
|
8
|
+
(function (ContributionOwnerKind) {
|
|
9
|
+
ContributionOwnerKind["Biome"] = "biome";
|
|
10
|
+
ContributionOwnerKind["RuntimeService"] = "runtime_service";
|
|
11
|
+
ContributionOwnerKind["SystemSeed"] = "system_seed";
|
|
12
|
+
})(ContributionOwnerKind || (exports.ContributionOwnerKind = ContributionOwnerKind = {}));
|
|
13
|
+
exports.ContributionOwnerKindSchema = zod_1.z.nativeEnum(ContributionOwnerKind);
|
|
14
|
+
exports.ContributionOwnerSchema = zod_1.z.object({
|
|
15
|
+
type: exports.ContributionOwnerKindSchema,
|
|
16
|
+
id: zod_1.z.string().min(1),
|
|
17
|
+
version: zod_1.z.string().min(1).optional(),
|
|
18
|
+
});
|
|
19
|
+
var ContributionSyncStatus;
|
|
20
|
+
(function (ContributionSyncStatus) {
|
|
21
|
+
ContributionSyncStatus["NotSynced"] = "not_synced";
|
|
22
|
+
ContributionSyncStatus["Syncing"] = "syncing";
|
|
23
|
+
ContributionSyncStatus["Synced"] = "synced";
|
|
24
|
+
ContributionSyncStatus["SyncFailed"] = "sync_failed";
|
|
25
|
+
ContributionSyncStatus["PendingRetry"] = "pending_retry";
|
|
26
|
+
ContributionSyncStatus["Partial"] = "partial";
|
|
27
|
+
})(ContributionSyncStatus || (exports.ContributionSyncStatus = ContributionSyncStatus = {}));
|
|
28
|
+
exports.ContributionSyncStatusSchema = zod_1.z.nativeEnum(ContributionSyncStatus);
|
|
29
|
+
exports.ContributionSyncRequestSchema = zod_1.z.object({
|
|
30
|
+
owner: exports.ContributionOwnerSchema,
|
|
31
|
+
kind: contribution_kind_1.ContributionKindSchema,
|
|
32
|
+
items: zod_1.z.array(contribution_1.AnyContributionEnvelopeSchema),
|
|
33
|
+
contentHash: zod_1.z.string().min(1),
|
|
34
|
+
syncToken: zod_1.z.string().min(1),
|
|
35
|
+
});
|
|
36
|
+
exports.ContributionSyncResultSchema = zod_1.z.object({
|
|
37
|
+
owner: exports.ContributionOwnerSchema,
|
|
38
|
+
kind: contribution_kind_1.ContributionKindSchema,
|
|
39
|
+
upserted: zod_1.z.number().int().nonnegative(),
|
|
40
|
+
pruned: zod_1.z.number().int().nonnegative(),
|
|
41
|
+
unchanged: zod_1.z.number().int().nonnegative(),
|
|
42
|
+
skippedNoOp: zod_1.z.boolean(),
|
|
43
|
+
status: exports.ContributionSyncStatusSchema,
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../../src/contribution/lib/sync.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,2DAA+E;AAC/E,iDAA+D;AAqC/D,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,wCAAe,CAAA;IACf,2DAAkC,CAAA;IAClC,mDAA0B,CAAA;AAC5B,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AAEY,QAAA,2BAA2B,GAAG,OAAC,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;AAWlE,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,mCAA2B;IACjC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,OAAO,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"iac",
|
|
5
5
|
Seeder = "seeder",
|
|
6
|
+
BiomeContributed = "biome_contributed",
|
|
7
|
+
RuntimeRegistered = "runtime_registered",
|
|
6
8
|
System = "system"
|
|
7
9
|
}
|
|
8
10
|
export declare const ResourceManagedBySchema: z.ZodEnum<typeof ResourceManagedBy>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-managed-by.d.ts","sourceRoot":"","sources":["../../../src/resource/lib/resource-managed-by.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"resource-managed-by.d.ts","sourceRoot":"","sources":["../../../src/resource/lib/resource-managed-by.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgCxB,oBAAY,iBAAiB;IAC3B,EAAE,OAAO;IACT,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,gBAAgB,sBAAsB;IACtC,iBAAiB,uBAAuB;IACxC,MAAM,WAAW;CAClB;AAED,eAAO,MAAM,uBAAuB,qCAAkC,CAAC"}
|
|
@@ -7,6 +7,8 @@ var ResourceManagedBy;
|
|
|
7
7
|
ResourceManagedBy["Ui"] = "ui";
|
|
8
8
|
ResourceManagedBy["Iac"] = "iac";
|
|
9
9
|
ResourceManagedBy["Seeder"] = "seeder";
|
|
10
|
+
ResourceManagedBy["BiomeContributed"] = "biome_contributed";
|
|
11
|
+
ResourceManagedBy["RuntimeRegistered"] = "runtime_registered";
|
|
10
12
|
ResourceManagedBy["System"] = "system";
|
|
11
13
|
})(ResourceManagedBy || (exports.ResourceManagedBy = ResourceManagedBy = {}));
|
|
12
14
|
exports.ResourceManagedBySchema = zod_1.z.nativeEnum(ResourceManagedBy);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-managed-by.js","sourceRoot":"","sources":["../../../src/resource/lib/resource-managed-by.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;
|
|
1
|
+
{"version":3,"file":"resource-managed-by.js","sourceRoot":"","sources":["../../../src/resource/lib/resource-managed-by.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAgCxB,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,8BAAS,CAAA;IACT,gCAAW,CAAA;IACX,sCAAiB,CAAA;IACjB,2DAAsC,CAAA;IACtC,6DAAwC,CAAA;IACxC,sCAAiB,CAAA;AACnB,CAAC,EAPW,iBAAiB,iCAAjB,iBAAiB,QAO5B;AAEY,QAAA,uBAAuB,GAAG,OAAC,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC"}
|
package/dist/space/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/space/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/space/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC"}
|
package/dist/space/index.js
CHANGED
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./lib/space"), exports);
|
|
18
18
|
__exportStar(require("./lib/space-ref-parser"), exports);
|
|
19
19
|
__exportStar(require("./lib/space-traversal"), exports);
|
|
20
|
+
__exportStar(require("./lib/skill-mirror-path"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
package/dist/space/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/space/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,yDAAuC;AACvC,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/space/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,yDAAuC;AACvC,wDAAsC;AACtC,0DAAwC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type SpaceRef } from './space';
|
|
2
|
+
export declare function skillMirrorAllocationSubPath(scope: SpaceRef): string | null;
|
|
3
|
+
export declare function skillMirrorBundleDir(scope: SpaceRef, slug: string, contentHash: string): string | null;
|
|
4
|
+
//# sourceMappingURL=skill-mirror-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-mirror-path.d.ts","sourceRoot":"","sources":["../../../src/space/lib/skill-mirror-path.ts"],"names":[],"mappings":"AAcA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AA6BnD,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAqB3E;AAQD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,QAAQ,EACf,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GAClB,MAAM,GAAG,IAAI,CAKf"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.skillMirrorAllocationSubPath = skillMirrorAllocationSubPath;
|
|
4
|
+
exports.skillMirrorBundleDir = skillMirrorBundleDir;
|
|
5
|
+
const space_1 = require("./space");
|
|
6
|
+
const TEMPLATES_SYSTEM_SUBPATH = 'templates/system';
|
|
7
|
+
const TEMPLATES_ORG_SUBPATH_PREFIX = 'templates/orgs';
|
|
8
|
+
const MIRROR_SUBPATH = 'mirror/skills';
|
|
9
|
+
const SKILL_KIND_SEGMENT = 'skill';
|
|
10
|
+
function skillMirrorAllocationSubPath(scope) {
|
|
11
|
+
switch (scope.tier) {
|
|
12
|
+
case space_1.SpaceKind.System:
|
|
13
|
+
return `${TEMPLATES_SYSTEM_SUBPATH}/${MIRROR_SUBPATH}/system`;
|
|
14
|
+
case space_1.SpaceKind.Biome:
|
|
15
|
+
return scope.biomeId
|
|
16
|
+
? `${TEMPLATES_SYSTEM_SUBPATH}/${MIRROR_SUBPATH}/biome/${scope.biomeId}`
|
|
17
|
+
: null;
|
|
18
|
+
case space_1.SpaceKind.Org:
|
|
19
|
+
return scope.orgId
|
|
20
|
+
? `${TEMPLATES_ORG_SUBPATH_PREFIX}/${scope.orgId}/${MIRROR_SUBPATH}/org`
|
|
21
|
+
: null;
|
|
22
|
+
case space_1.SpaceKind.Project:
|
|
23
|
+
return scope.orgId && scope.projectId
|
|
24
|
+
? `${TEMPLATES_ORG_SUBPATH_PREFIX}/${scope.orgId}/${MIRROR_SUBPATH}/` +
|
|
25
|
+
`project/${scope.projectId}`
|
|
26
|
+
: null;
|
|
27
|
+
default:
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function skillMirrorBundleDir(scope, slug, contentHash) {
|
|
32
|
+
const base = skillMirrorAllocationSubPath(scope);
|
|
33
|
+
return base === null
|
|
34
|
+
? null
|
|
35
|
+
: `${base}/${SKILL_KIND_SEGMENT}/${slug}/${contentHash}`;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=skill-mirror-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-mirror-path.js","sourceRoot":"","sources":["../../../src/space/lib/skill-mirror-path.ts"],"names":[],"mappings":";;AA2CA,oEAqBC;AAQD,oDASC;AAnED,mCAAmD;AAGnD,MAAM,wBAAwB,GAAG,kBAAkB,CAAC;AAEpD,MAAM,4BAA4B,GAAG,gBAAgB,CAAC;AAEtD,MAAM,cAAc,GAAG,eAAe,CAAC;AAEvC,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAoBnC,SAAgB,4BAA4B,CAAC,KAAe;IAC1D,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,iBAAS,CAAC,MAAM;YACnB,OAAO,GAAG,wBAAwB,IAAI,cAAc,SAAS,CAAC;QAChE,KAAK,iBAAS,CAAC,KAAK;YAClB,OAAO,KAAK,CAAC,OAAO;gBAClB,CAAC,CAAC,GAAG,wBAAwB,IAAI,cAAc,UAAU,KAAK,CAAC,OAAO,EAAE;gBACxE,CAAC,CAAC,IAAI,CAAC;QACX,KAAK,iBAAS,CAAC,GAAG;YAChB,OAAO,KAAK,CAAC,KAAK;gBAChB,CAAC,CAAC,GAAG,4BAA4B,IAAI,KAAK,CAAC,KAAK,IAAI,cAAc,MAAM;gBACxE,CAAC,CAAC,IAAI,CAAC;QACX,KAAK,iBAAS,CAAC,OAAO;YACpB,OAAO,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,SAAS;gBACnC,CAAC,CAAC,GAAG,4BAA4B,IAAI,KAAK,CAAC,KAAK,IAAI,cAAc,GAAG;oBACjE,WAAW,KAAK,CAAC,SAAS,EAAE;gBAChC,CAAC,CAAC,IAAI,CAAC;QACX;YAEE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC;AAQD,SAAgB,oBAAoB,CAClC,KAAe,EACf,IAAY,EACZ,WAAmB;IAEnB,MAAM,IAAI,GAAG,4BAA4B,CAAC,KAAK,CAAC,CAAC;IACjD,OAAO,IAAI,KAAK,IAAI;QAClB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,GAAG,IAAI,IAAI,kBAAkB,IAAI,IAAI,IAAI,WAAW,EAAE,CAAC;AAC7D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xemahq/kernel-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Consolidated Xema OS kernel wire contracts — pure types + zod schemas for the 32 kernel protocol surfaces. One package, one npm scope, wildcard per-surface subpath exports. No framework/runtime deps.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -187,7 +187,7 @@ export type BiomeDatabaseDeclaration = z.infer<typeof BiomeDatabaseDeclarationSc
|
|
|
187
187
|
/**
|
|
188
188
|
* Per-API declaration shipped under `xema.ships.apis[]` (Phase 9).
|
|
189
189
|
* Each entry becomes one subdomain (`<name>.api.<base-domain>`)
|
|
190
|
-
* served by a biome-shipped
|
|
190
|
+
* served by a biome-shipped API service. biome-host-api applies
|
|
191
191
|
* the Helm sub-chart at install time and writes a route-registry
|
|
192
192
|
* entry the ingress shim consults. Validated structurally here;
|
|
193
193
|
* detailed contract semantics live in `@xemahq/biome-api-sdk`.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ContributionKind, ContributionKindSchema } from './contribution-kind';
|
|
3
|
+
import { AnyContributionEnvelopeSchema } from './contribution';
|
|
4
|
+
|
|
5
|
+
// NOTE: the `contribution` subpath is a DAG leaf and MUST NOT import the
|
|
6
|
+
// `resource` subpath (enforced by check-subpath-dag.mjs). The mapping from
|
|
7
|
+
// `ContributionOwnerKind` to `ResourceManagedBy` therefore lives in the
|
|
8
|
+
// consuming SDK (`@xemahq/contribution-sync-nest`), which legally depends on
|
|
9
|
+
// both subpaths. Keep that mapping the single source of truth there.
|
|
10
|
+
|
|
11
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
12
|
+
// Contribution sync — the declarative, owner-scoped push contract.
|
|
13
|
+
//
|
|
14
|
+
// biome-host (and a runtime service self-registering its own capabilities)
|
|
15
|
+
// pushes the COMPLETE desired set of contributions for one `(owner, kind)`
|
|
16
|
+
// to the owning registry over HTTP. The registry upserts every item and
|
|
17
|
+
// prunes anything it owns for that `(owner, kind)` that is no longer present.
|
|
18
|
+
//
|
|
19
|
+
// This replaces the boot-time local-directory scan: registries no longer read
|
|
20
|
+
// biome trees off disk; they receive their content. Pruning is owner-scoped
|
|
21
|
+
// (NEVER installation-scoped — biome content is platform-global and shared
|
|
22
|
+
// across org/project installs), so a per-tenant enable/disable never deletes
|
|
23
|
+
// shared content.
|
|
24
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Who owns a pushed set of contributions. The typed owner keeps three
|
|
28
|
+
* lifecycles cleanly separated while sharing ONE engine + wire shape:
|
|
29
|
+
*
|
|
30
|
+
* - `Biome` — a biome bundle's contributions, pushed by biome-host.
|
|
31
|
+
* `id` is the biome id, `version` the biome version. Maps to
|
|
32
|
+
* `ResourceManagedBy.BiomeContributed`.
|
|
33
|
+
* - `RuntimeService` — a service self-registering its OWN capabilities (the
|
|
34
|
+
* `@XemaCapability` auto-register path). `id` is the service name. Maps to
|
|
35
|
+
* `ResourceManagedBy.RuntimeRegistered`.
|
|
36
|
+
* - `SystemSeed` — a genuine package/in-service seed that is neither a
|
|
37
|
+
* biome push nor runtime self-registration (`@xemahq/system-skills`,
|
|
38
|
+
* `INITIAL_CAPABILITY_SEED`). Maps to `ResourceManagedBy.Seeder`.
|
|
39
|
+
*/
|
|
40
|
+
export enum ContributionOwnerKind {
|
|
41
|
+
Biome = 'biome',
|
|
42
|
+
RuntimeService = 'runtime_service',
|
|
43
|
+
SystemSeed = 'system_seed',
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const ContributionOwnerKindSchema = z.nativeEnum(ContributionOwnerKind);
|
|
47
|
+
|
|
48
|
+
/** The typed owner of a pushed contribution set. */
|
|
49
|
+
export interface ContributionOwner {
|
|
50
|
+
readonly type: ContributionOwnerKind;
|
|
51
|
+
/** Biome id, service name, or seed id depending on `type`. */
|
|
52
|
+
readonly id: string;
|
|
53
|
+
/** Biome/bundle version for `Biome` owners; optional otherwise. */
|
|
54
|
+
readonly version?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const ContributionOwnerSchema = z.object({
|
|
58
|
+
type: ContributionOwnerKindSchema,
|
|
59
|
+
id: z.string().min(1),
|
|
60
|
+
version: z.string().min(1).optional(),
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Lifecycle/availability status of a registry's content for one `(owner, kind)`.
|
|
65
|
+
* Persisted by the registry and aggregated by biome-host for the UI AND used by
|
|
66
|
+
* the registry to gate consumption (a not-fully-synced set is not served).
|
|
67
|
+
*
|
|
68
|
+
* - `NOT_SYNCED` — never synced; no rows exist yet (structural empty).
|
|
69
|
+
* - `SYNCING` — a sync is in flight.
|
|
70
|
+
* - `SYNCED` — desired === active; content is the current good set.
|
|
71
|
+
* - `SYNC_FAILED` — last attempt failed (e.g. referential-integrity reject);
|
|
72
|
+
* the prior `active` set is preserved and still served.
|
|
73
|
+
* - `PENDING_RETRY`— transient failure queued for retry (outbox).
|
|
74
|
+
* - `PARTIAL` — synced, but a cross-service dependency is unsatisfied;
|
|
75
|
+
* affected items are not launchable until it resolves.
|
|
76
|
+
*/
|
|
77
|
+
export enum ContributionSyncStatus {
|
|
78
|
+
NotSynced = 'not_synced',
|
|
79
|
+
Syncing = 'syncing',
|
|
80
|
+
Synced = 'synced',
|
|
81
|
+
SyncFailed = 'sync_failed',
|
|
82
|
+
PendingRetry = 'pending_retry',
|
|
83
|
+
Partial = 'partial',
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const ContributionSyncStatusSchema = z.nativeEnum(ContributionSyncStatus);
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The push request. `items` is the COMPLETE desired set for `(owner, kind)`
|
|
90
|
+
* after the pusher's cross-biome `extends`-dedup — never a delta.
|
|
91
|
+
*
|
|
92
|
+
* `contentHash` is a stable sha256 over the canonicalized `items` (idempotent
|
|
93
|
+
* no-op detection). `syncToken` is a MONOTONIC lifecycle-attempt token (ULID /
|
|
94
|
+
* sequence / transition counter) — deliberately NOT derived from the version,
|
|
95
|
+
* so a downgrade still carries a higher token than the upgrade it reverts.
|
|
96
|
+
*/
|
|
97
|
+
export interface ContributionSyncRequest {
|
|
98
|
+
readonly owner: ContributionOwner;
|
|
99
|
+
readonly kind: ContributionKind;
|
|
100
|
+
readonly items: readonly z.infer<typeof AnyContributionEnvelopeSchema>[];
|
|
101
|
+
readonly contentHash: string;
|
|
102
|
+
readonly syncToken: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export const ContributionSyncRequestSchema = z.object({
|
|
106
|
+
owner: ContributionOwnerSchema,
|
|
107
|
+
kind: ContributionKindSchema,
|
|
108
|
+
items: z.array(AnyContributionEnvelopeSchema),
|
|
109
|
+
contentHash: z.string().min(1),
|
|
110
|
+
syncToken: z.string().min(1),
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
/** The registry's response to a sync push. */
|
|
114
|
+
export interface ContributionSyncResult {
|
|
115
|
+
readonly owner: ContributionOwner;
|
|
116
|
+
readonly kind: ContributionKind;
|
|
117
|
+
readonly upserted: number;
|
|
118
|
+
readonly pruned: number;
|
|
119
|
+
readonly unchanged: number;
|
|
120
|
+
readonly skippedNoOp: boolean;
|
|
121
|
+
readonly status: ContributionSyncStatus;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export const ContributionSyncResultSchema = z.object({
|
|
125
|
+
owner: ContributionOwnerSchema,
|
|
126
|
+
kind: ContributionKindSchema,
|
|
127
|
+
upserted: z.number().int().nonnegative(),
|
|
128
|
+
pruned: z.number().int().nonnegative(),
|
|
129
|
+
unchanged: z.number().int().nonnegative(),
|
|
130
|
+
skippedNoOp: z.boolean(),
|
|
131
|
+
status: ContributionSyncStatusSchema,
|
|
132
|
+
});
|
|
@@ -4,10 +4,21 @@ import { z } from 'zod';
|
|
|
4
4
|
* `ResourceManagedBy` — the ownership marker stamped on every provisionable
|
|
5
5
|
* resource row. This single concept powers three behaviors with one switch:
|
|
6
6
|
*
|
|
7
|
-
* - `Seeder` — owned by a boot/event reconciler
|
|
8
|
-
* installed web biomes
|
|
7
|
+
* - `Seeder` — owned by a boot/event reconciler that is NOT a biome-bundle
|
|
8
|
+
* push (e.g. portals derived from installed web biomes, or genuine
|
|
9
|
+
* package/in-service seeds such as `@xemahq/system-skills` and
|
|
10
|
+
* `INITIAL_CAPABILITY_SEED`). The reconciler may create/update/retire these.
|
|
9
11
|
* Retire-removed deletes ONLY `Seeder`-owned rows whose `managedKey` no
|
|
10
12
|
* longer appears in the desired set.
|
|
13
|
+
* - `BiomeContributed` — owned by the biome-host contribution-sync push: a
|
|
14
|
+
* biome bundle's contributions (agents, skills, specs, …) materialized into
|
|
15
|
+
* an owning registry over HTTP at biome lifecycle time. Pruned biome-scoped
|
|
16
|
+
* (`owner.type=biome`, `owner.id=biomeId`) when a biome upgrade drops an item
|
|
17
|
+
* or the biome leaves the platform — NEVER on per-org/project enable/disable.
|
|
18
|
+
* - `RuntimeRegistered` — self-registered by a runtime service at boot (the
|
|
19
|
+
* `@XemaCapability` auto-register path: a service publishing its OWN
|
|
20
|
+
* capabilities). Owner is `owner.type=runtime_service`, `owner.id=serviceName`;
|
|
21
|
+
* its prune scope is the service, never a biome's content.
|
|
11
22
|
* - `Iac` — owned by a declarative source (Terraform / `xema.yaml`).
|
|
12
23
|
* Declared-state-wins: `plan` surfaces drift, `apply` reconciles back. No
|
|
13
24
|
* reconciler touches a row it does not own.
|
|
@@ -23,6 +34,8 @@ export enum ResourceManagedBy {
|
|
|
23
34
|
Ui = 'ui',
|
|
24
35
|
Iac = 'iac',
|
|
25
36
|
Seeder = 'seeder',
|
|
37
|
+
BiomeContributed = 'biome_contributed',
|
|
38
|
+
RuntimeRegistered = 'runtime_registered',
|
|
26
39
|
System = 'system',
|
|
27
40
|
}
|
|
28
41
|
|
package/src/space/index.ts
CHANGED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
2
|
+
// Skill mirror path convention — SHARED by the orchestrator (writes the
|
|
3
|
+
// content-addressed skill mirror) and the worker (reads it at launch). Keeping
|
|
4
|
+
// it here, in kernel-contracts, means the path convention has EXACTLY ONE
|
|
5
|
+
// source of truth across both repos — the orchestrator and worker can never
|
|
6
|
+
// drift apart on where a mirrored skill bundle lives.
|
|
7
|
+
//
|
|
8
|
+
// Runtime-NEUTRAL: a skill bundle (SKILL.md + resources) is identical across
|
|
9
|
+
// every runtime; only WHERE it is finally placed inside the workspace differs
|
|
10
|
+
// (each runtime mounts skills under its own per-runtime skills subtree), and
|
|
11
|
+
// that placement is owned by the worker's RuntimeLayout — NOT by this path.
|
|
12
|
+
// This module describes the STORAGE location of the pre-staged bytes only, so
|
|
13
|
+
// it works for every runtime adapter alike, present and future.
|
|
14
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
15
|
+
import { SpaceKind, type SpaceRef } from './space';
|
|
16
|
+
|
|
17
|
+
/** Templates subtree a worker mounts RO for system + biome (platform-wide) skills. */
|
|
18
|
+
const TEMPLATES_SYSTEM_SUBPATH = 'templates/system';
|
|
19
|
+
/** Per-org templates subtree prefix — `<prefix>/<orgId>` is mounted RO per worker. */
|
|
20
|
+
const TEMPLATES_ORG_SUBPATH_PREFIX = 'templates/orgs';
|
|
21
|
+
/** Mirror segment appended under the chosen templates subtree. */
|
|
22
|
+
const MIRROR_SUBPATH = 'mirror/skills';
|
|
23
|
+
/** Kind segment under the allocation subPath (matches the materializer's `<kind>`). */
|
|
24
|
+
const SKILL_KIND_SEGMENT = 'skill';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Pool-relative allocation subPath under which a skill's content-addressed
|
|
28
|
+
* mirror is written/read, keyed by the skill's scope — the parent of
|
|
29
|
+
* `<kind>/<slug>/<contentHash>`:
|
|
30
|
+
*
|
|
31
|
+
* • System / Biome → `templates/system/mirror/skills/<seg>`
|
|
32
|
+
* platform-wide; EVERY worker mounts `templates/system` RO.
|
|
33
|
+
* • Org / Project → `templates/orgs/<orgId>/mirror/skills/<seg>`
|
|
34
|
+
* the org's own RO mount; another org's worker never mounts it.
|
|
35
|
+
*
|
|
36
|
+
* Returns `null` when the scope is not mirrorable from the ref alone:
|
|
37
|
+
* • User — the ref is org-less (`xema://user/<userId>`), so it can't be
|
|
38
|
+
* placed under any org's templates subtree.
|
|
39
|
+
* • App / Session — runtime spaces, never own a skill bundle.
|
|
40
|
+
* • a mirrorable tier whose required id segment is absent (malformed ref).
|
|
41
|
+
* A `null` result means "not pre-staged" — the caller resolves it via the live
|
|
42
|
+
* fetch (an explicit, logged miss; never silently-stale content).
|
|
43
|
+
*/
|
|
44
|
+
export function skillMirrorAllocationSubPath(scope: SpaceRef): string | null {
|
|
45
|
+
switch (scope.tier) {
|
|
46
|
+
case SpaceKind.System:
|
|
47
|
+
return `${TEMPLATES_SYSTEM_SUBPATH}/${MIRROR_SUBPATH}/system`;
|
|
48
|
+
case SpaceKind.Biome:
|
|
49
|
+
return scope.biomeId
|
|
50
|
+
? `${TEMPLATES_SYSTEM_SUBPATH}/${MIRROR_SUBPATH}/biome/${scope.biomeId}`
|
|
51
|
+
: null;
|
|
52
|
+
case SpaceKind.Org:
|
|
53
|
+
return scope.orgId
|
|
54
|
+
? `${TEMPLATES_ORG_SUBPATH_PREFIX}/${scope.orgId}/${MIRROR_SUBPATH}/org`
|
|
55
|
+
: null;
|
|
56
|
+
case SpaceKind.Project:
|
|
57
|
+
return scope.orgId && scope.projectId
|
|
58
|
+
? `${TEMPLATES_ORG_SUBPATH_PREFIX}/${scope.orgId}/${MIRROR_SUBPATH}/` +
|
|
59
|
+
`project/${scope.projectId}`
|
|
60
|
+
: null;
|
|
61
|
+
default:
|
|
62
|
+
// User / App / Session — not mirrorable (see doc comment).
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Full mirror BUNDLE dir relative to the pool root:
|
|
69
|
+
* `<allocationSubPath>/skill/<slug>/<contentHash>`. This is exactly where the
|
|
70
|
+
* materializer writes a skill bundle (SKILL.md + resources). Returns `null`
|
|
71
|
+
* when the scope is not mirrorable (see {@link skillMirrorAllocationSubPath}).
|
|
72
|
+
*/
|
|
73
|
+
export function skillMirrorBundleDir(
|
|
74
|
+
scope: SpaceRef,
|
|
75
|
+
slug: string,
|
|
76
|
+
contentHash: string,
|
|
77
|
+
): string | null {
|
|
78
|
+
const base = skillMirrorAllocationSubPath(scope);
|
|
79
|
+
return base === null
|
|
80
|
+
? null
|
|
81
|
+
: `${base}/${SKILL_KIND_SEGMENT}/${slug}/${contentHash}`;
|
|
82
|
+
}
|