@interf/compiler 0.3.2 → 0.3.4

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.
Files changed (139) hide show
  1. package/README.md +124 -173
  2. package/dist/commands/compile.d.ts +2 -0
  3. package/dist/commands/compile.d.ts.map +1 -1
  4. package/dist/commands/compile.js +42 -10
  5. package/dist/commands/compile.js.map +1 -1
  6. package/dist/commands/create.d.ts.map +1 -1
  7. package/dist/commands/create.js +5 -5
  8. package/dist/commands/create.js.map +1 -1
  9. package/dist/commands/default.js +2 -2
  10. package/dist/commands/default.js.map +1 -1
  11. package/dist/commands/doctor.js +7 -7
  12. package/dist/commands/doctor.js.map +1 -1
  13. package/dist/commands/init.js +19 -23
  14. package/dist/commands/init.js.map +1 -1
  15. package/dist/commands/source-config-wizard.d.ts +2 -1
  16. package/dist/commands/source-config-wizard.d.ts.map +1 -1
  17. package/dist/commands/source-config-wizard.js +29 -27
  18. package/dist/commands/source-config-wizard.js.map +1 -1
  19. package/dist/commands/test-flow.d.ts +4 -0
  20. package/dist/commands/test-flow.d.ts.map +1 -1
  21. package/dist/commands/test-flow.js +24 -13
  22. package/dist/commands/test-flow.js.map +1 -1
  23. package/dist/commands/test.d.ts.map +1 -1
  24. package/dist/commands/test.js +16 -5
  25. package/dist/commands/test.js.map +1 -1
  26. package/dist/commands/workspace-flow.d.ts +2 -0
  27. package/dist/commands/workspace-flow.d.ts.map +1 -1
  28. package/dist/commands/workspace-flow.js +3 -2
  29. package/dist/commands/workspace-flow.js.map +1 -1
  30. package/dist/lib/agent-shells.d.ts +17 -0
  31. package/dist/lib/agent-shells.d.ts.map +1 -0
  32. package/dist/lib/agent-shells.js +295 -0
  33. package/dist/lib/agent-shells.js.map +1 -0
  34. package/dist/lib/benchmark-execution.d.ts +5 -1
  35. package/dist/lib/benchmark-execution.d.ts.map +1 -1
  36. package/dist/lib/benchmark-execution.js +34 -12
  37. package/dist/lib/benchmark-execution.js.map +1 -1
  38. package/dist/lib/benchmark-paths.d.ts +2 -0
  39. package/dist/lib/benchmark-paths.d.ts.map +1 -1
  40. package/dist/lib/benchmark-paths.js +6 -0
  41. package/dist/lib/benchmark-paths.js.map +1 -1
  42. package/dist/lib/benchmark-sandbox.d.ts +2 -0
  43. package/dist/lib/benchmark-sandbox.d.ts.map +1 -1
  44. package/dist/lib/benchmark-sandbox.js +68 -37
  45. package/dist/lib/benchmark-sandbox.js.map +1 -1
  46. package/dist/lib/benchmark-targets.js +1 -1
  47. package/dist/lib/benchmark-targets.js.map +1 -1
  48. package/dist/lib/interf-bootstrap.d.ts +2 -13
  49. package/dist/lib/interf-bootstrap.d.ts.map +1 -1
  50. package/dist/lib/interf-bootstrap.js +7 -164
  51. package/dist/lib/interf-bootstrap.js.map +1 -1
  52. package/dist/lib/interf-detect.d.ts +1 -0
  53. package/dist/lib/interf-detect.d.ts.map +1 -1
  54. package/dist/lib/interf-detect.js +5 -18
  55. package/dist/lib/interf-detect.js.map +1 -1
  56. package/dist/lib/interf-scaffold.d.ts.map +1 -1
  57. package/dist/lib/interf-scaffold.js +7 -71
  58. package/dist/lib/interf-scaffold.js.map +1 -1
  59. package/dist/lib/interf-workflow-package.d.ts.map +1 -1
  60. package/dist/lib/interf-workflow-package.js +21 -26
  61. package/dist/lib/interf-workflow-package.js.map +1 -1
  62. package/dist/lib/interf.d.ts +3 -2
  63. package/dist/lib/interf.d.ts.map +1 -1
  64. package/dist/lib/interf.js +3 -2
  65. package/dist/lib/interf.js.map +1 -1
  66. package/dist/lib/local-workflows.d.ts +6 -1
  67. package/dist/lib/local-workflows.d.ts.map +1 -1
  68. package/dist/lib/local-workflows.js +143 -2
  69. package/dist/lib/local-workflows.js.map +1 -1
  70. package/dist/lib/runtime-contracts.d.ts.map +1 -1
  71. package/dist/lib/runtime-contracts.js +10 -4
  72. package/dist/lib/runtime-contracts.js.map +1 -1
  73. package/dist/lib/runtime-prompt.d.ts.map +1 -1
  74. package/dist/lib/runtime-prompt.js +1 -0
  75. package/dist/lib/runtime-prompt.js.map +1 -1
  76. package/dist/lib/runtime-runs.d.ts.map +1 -1
  77. package/dist/lib/runtime-runs.js +6 -2
  78. package/dist/lib/runtime-runs.js.map +1 -1
  79. package/dist/lib/runtime-types.d.ts +1 -0
  80. package/dist/lib/runtime-types.d.ts.map +1 -1
  81. package/dist/lib/schema.d.ts +88 -23
  82. package/dist/lib/schema.d.ts.map +1 -1
  83. package/dist/lib/schema.js +66 -37
  84. package/dist/lib/schema.js.map +1 -1
  85. package/dist/lib/source-config.d.ts +3 -3
  86. package/dist/lib/source-config.d.ts.map +1 -1
  87. package/dist/lib/source-config.js +8 -6
  88. package/dist/lib/source-config.js.map +1 -1
  89. package/dist/lib/state-artifacts.d.ts +2 -2
  90. package/dist/lib/state-artifacts.d.ts.map +1 -1
  91. package/dist/lib/state-artifacts.js +3 -3
  92. package/dist/lib/state-artifacts.js.map +1 -1
  93. package/dist/lib/state-io.d.ts +2 -2
  94. package/dist/lib/state-io.d.ts.map +1 -1
  95. package/dist/lib/state-io.js +5 -5
  96. package/dist/lib/state-io.js.map +1 -1
  97. package/dist/lib/state-paths.d.ts +1 -1
  98. package/dist/lib/state-paths.d.ts.map +1 -1
  99. package/dist/lib/state-paths.js +3 -3
  100. package/dist/lib/state-paths.js.map +1 -1
  101. package/dist/lib/state-view.d.ts +2 -2
  102. package/dist/lib/state-view.d.ts.map +1 -1
  103. package/dist/lib/state-view.js +6 -7
  104. package/dist/lib/state-view.js.map +1 -1
  105. package/dist/lib/state.d.ts +4 -4
  106. package/dist/lib/state.d.ts.map +1 -1
  107. package/dist/lib/state.js +3 -3
  108. package/dist/lib/state.js.map +1 -1
  109. package/dist/lib/workflow-definitions.d.ts +4 -1
  110. package/dist/lib/workflow-definitions.d.ts.map +1 -1
  111. package/dist/lib/workflow-definitions.js +41 -6
  112. package/dist/lib/workflow-definitions.js.map +1 -1
  113. package/dist/lib/workflow-stage-runner.d.ts +1 -0
  114. package/dist/lib/workflow-stage-runner.d.ts.map +1 -1
  115. package/dist/lib/workflow-stage-runner.js +2 -0
  116. package/dist/lib/workflow-stage-runner.js.map +1 -1
  117. package/dist/lib/workflows.d.ts +1 -1
  118. package/dist/lib/workflows.d.ts.map +1 -1
  119. package/dist/lib/workspace-compile.d.ts +4 -0
  120. package/dist/lib/workspace-compile.d.ts.map +1 -1
  121. package/dist/lib/workspace-compile.js +108 -66
  122. package/dist/lib/workspace-compile.js.map +1 -1
  123. package/dist/lib/workspace-docs.d.ts +3 -0
  124. package/dist/lib/workspace-docs.d.ts.map +1 -0
  125. package/dist/lib/workspace-docs.js +82 -0
  126. package/dist/lib/workspace-docs.js.map +1 -0
  127. package/dist/lib/workspace-raw.d.ts +30 -0
  128. package/dist/lib/workspace-raw.d.ts.map +1 -0
  129. package/dist/lib/workspace-raw.js +102 -0
  130. package/dist/lib/workspace-raw.js.map +1 -0
  131. package/dist/lib/workspace-schema.d.ts +26 -0
  132. package/dist/lib/workspace-schema.d.ts.map +1 -0
  133. package/dist/lib/workspace-schema.js +132 -0
  134. package/dist/lib/workspace-schema.js.map +1 -0
  135. package/package.json +2 -2
  136. package/skills/benchmark/SKILL.md +4 -4
  137. package/skills/workflow/create/SKILL.md +23 -4
  138. package/skills/workspace/shape/SKILL.md +1 -1
  139. package/templates/workspace/README.md +4 -3
@@ -0,0 +1,30 @@
1
+ import type { InterfConfig } from "./schema.js";
2
+ export interface WorkspaceRawSyncResult {
3
+ sourceTotal: number;
4
+ copied: number;
5
+ removed: number;
6
+ }
7
+ type RawSnapshotMaterializeMode = "copy" | "link-or-copy";
8
+ export declare function resolveWorkspaceRawPath(workspacePath: string, config?: {
9
+ [x: string]: unknown;
10
+ type: "workspace";
11
+ name: string;
12
+ source: {
13
+ path: string;
14
+ };
15
+ about?: string | undefined;
16
+ workflow?: string | undefined;
17
+ } | null): string;
18
+ export declare function resolveSourceControlPath(workspacePath: string): string;
19
+ export declare function syncWorkspaceRawSnapshot(workspacePath: string, sourcePath?: string): WorkspaceRawSyncResult;
20
+ export declare function ensureWorkspaceRawBinding(workspacePath: string): InterfConfig | null;
21
+ export declare function projectRawSnapshot(options: {
22
+ sourcePath: string;
23
+ destinationPath: string;
24
+ workspacePath: string;
25
+ mode?: RawSnapshotMaterializeMode;
26
+ prune?: boolean;
27
+ preserveTimestamps?: boolean;
28
+ }): WorkspaceRawSyncResult;
29
+ export {};
30
+ //# sourceMappingURL=workspace-raw.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-raw.d.ts","sourceRoot":"","sources":["../../src/lib/workspace-raw.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,KAAK,0BAA0B,GAAG,MAAM,GAAG,cAAc,CAAC;AAE1D,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,MAAM,EACrB,MAAM;;;;;;;;;QAAkC,GACvC,MAAM,CAKR;AAED,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,MAAM,EACrB,UAAU,SAA0C,GACnD,sBAAsB,CAWxB;AAED,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAepF;AAqCD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,0BAA0B,CAAC;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,GAAG,sBAAsB,CAqCzB"}
@@ -0,0 +1,102 @@
1
+ import { cpSync, existsSync, linkSync, mkdirSync, rmSync, statSync, writeFileSync, } from "node:fs";
2
+ import { dirname, join, relative, resolve } from "node:path";
3
+ import { listFilesRecursive } from "./filesystem.js";
4
+ import { discoverSourceFiles } from "./discovery.js";
5
+ import { readInterfConfig } from "./interf-detect.js";
6
+ export function resolveWorkspaceRawPath(workspacePath, config = readInterfConfig(workspacePath)) {
7
+ const configuredPath = typeof config?.source?.path === "string" && config.source.path.length > 0
8
+ ? config.source.path
9
+ : "raw";
10
+ return resolve(workspacePath, configuredPath);
11
+ }
12
+ export function resolveSourceControlPath(workspacePath) {
13
+ return resolve(workspacePath, "..", "..", "..");
14
+ }
15
+ export function syncWorkspaceRawSnapshot(workspacePath, sourcePath = resolveSourceControlPath(workspacePath)) {
16
+ ensureWorkspaceRawBinding(workspacePath);
17
+ const rawPath = resolveWorkspaceRawPath(workspacePath);
18
+ return projectRawSnapshot({
19
+ sourcePath,
20
+ destinationPath: rawPath,
21
+ workspacePath,
22
+ mode: "copy",
23
+ prune: true,
24
+ preserveTimestamps: true,
25
+ });
26
+ }
27
+ export function ensureWorkspaceRawBinding(workspacePath) {
28
+ const config = readInterfConfig(workspacePath);
29
+ if (!config)
30
+ return null;
31
+ if (config.source?.path === "./raw")
32
+ return config;
33
+ const nextConfig = {
34
+ ...config,
35
+ source: {
36
+ ...(config.source ?? {}),
37
+ path: "./raw",
38
+ },
39
+ };
40
+ writeFileSync(join(workspacePath, "interf.json"), `${JSON.stringify(nextConfig, null, 2)}\n`);
41
+ return nextConfig;
42
+ }
43
+ function filesMatch(sourcePath, targetPath) {
44
+ if (!existsSync(targetPath))
45
+ return false;
46
+ try {
47
+ const sourceStat = statSync(sourcePath);
48
+ const targetStat = statSync(targetPath);
49
+ return sourceStat.size === targetStat.size && sourceStat.mtimeMs === targetStat.mtimeMs;
50
+ }
51
+ catch {
52
+ return false;
53
+ }
54
+ }
55
+ function materializeRawSnapshotFile(sourcePath, targetPath, options) {
56
+ mkdirSync(dirname(targetPath), { recursive: true });
57
+ rmSync(targetPath, { force: true });
58
+ if (options.mode === "link-or-copy") {
59
+ try {
60
+ linkSync(sourcePath, targetPath);
61
+ return;
62
+ }
63
+ catch {
64
+ // fall through to copy
65
+ }
66
+ }
67
+ cpSync(sourcePath, targetPath, { preserveTimestamps: options.preserveTimestamps });
68
+ }
69
+ export function projectRawSnapshot(options) {
70
+ const discovery = discoverSourceFiles(options.sourcePath, options.workspacePath);
71
+ const expectedFiles = new Set(discovery.sourceFiles);
72
+ mkdirSync(options.destinationPath, { recursive: true });
73
+ let removed = 0;
74
+ if (options.prune !== false) {
75
+ for (const existingPath of listFilesRecursive(options.destinationPath)) {
76
+ const relativePath = relative(options.destinationPath, existingPath);
77
+ if (expectedFiles.has(relativePath))
78
+ continue;
79
+ rmSync(existingPath, { force: true });
80
+ removed += 1;
81
+ }
82
+ }
83
+ let copied = 0;
84
+ for (const relativePath of discovery.sourceFiles) {
85
+ const sourceFilePath = join(options.sourcePath, relativePath);
86
+ const targetFilePath = join(options.destinationPath, relativePath);
87
+ if (filesMatch(sourceFilePath, targetFilePath)) {
88
+ continue;
89
+ }
90
+ materializeRawSnapshotFile(sourceFilePath, targetFilePath, {
91
+ mode: options.mode ?? "copy",
92
+ preserveTimestamps: options.preserveTimestamps ?? true,
93
+ });
94
+ copied += 1;
95
+ }
96
+ return {
97
+ sourceTotal: discovery.totalCount,
98
+ copied,
99
+ removed,
100
+ };
101
+ }
102
+ //# sourceMappingURL=workspace-raw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-raw.js","sourceRoot":"","sources":["../../src/lib/workspace-raw.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,QAAQ,EACR,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EA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SACvD,CAAC,CAAC;QACH,MAAM,IAAI,CAAC,CAAC;IACd,CAAC;IAED,OAAO;QACL,WAAW,EAAE,SAAS,CAAC,UAAU;QACjC,MAAM;QACN,OAAO;KACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type RuntimeContractType, type WorkflowWorkspaceSchema, type WorkflowWorkspaceZone, type WorkflowZoneId } from "./schema.js";
2
+ export interface WorkflowSchemaStageLike {
3
+ id: string;
4
+ contractType?: RuntimeContractType;
5
+ contract_type?: RuntimeContractType;
6
+ }
7
+ export declare const BUILTIN_WORKSPACE_ZONE_IDS: {
8
+ readonly RAW: "raw";
9
+ readonly SUMMARIES: "summaries";
10
+ readonly KNOWLEDGE_ENTITIES: "knowledge-entities";
11
+ readonly KNOWLEDGE_CLAIMS: "knowledge-claims";
12
+ readonly KNOWLEDGE_INDEXES: "knowledge-indexes";
13
+ readonly HOME: "home";
14
+ readonly RUNTIME: "runtime";
15
+ };
16
+ export declare const WORKSPACE_SCHEMA_FILE = "workspace.schema.json";
17
+ export declare function workspaceSchemaFilePath(rootPath: string): string;
18
+ export declare function workspaceSchemaRelativePath(): string;
19
+ export declare function listWorkspaceSchemaZones(schema: WorkflowWorkspaceSchema): WorkflowWorkspaceZone[];
20
+ export declare function findWorkspaceSchemaZone(schema: WorkflowWorkspaceSchema, zoneId: WorkflowZoneId): WorkflowWorkspaceZone | null;
21
+ export declare function workspaceZoneAbsolutePath(workspacePath: string, zone: Pick<WorkflowWorkspaceZone, "path">): string;
22
+ export declare function ensureWorkspaceZoneTargets(workspacePath: string, schema: WorkflowWorkspaceSchema): void;
23
+ export declare function buildWorkspaceSchema(stages: WorkflowSchemaStageLike[], label?: string): WorkflowWorkspaceSchema;
24
+ export declare function writeWorkspaceSchemaFile(rootPath: string, stages: WorkflowSchemaStageLike[], label?: string): WorkflowWorkspaceSchema;
25
+ export declare function readWorkspaceSchemaFile(rootPath: string): WorkflowWorkspaceSchema | null;
26
+ //# sourceMappingURL=workspace-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-schema.d.ts","sourceRoot":"","sources":["../../src/lib/workspace-schema.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC;AAED,eAAO,MAAM,0BAA0B;;;;;;;;CAQ7B,CAAC;AAEX,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED,wBAAgB,2BAA2B,IAAI,MAAM,CAEpD;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,uBAAuB,GAC9B,qBAAqB,EAAE,CAEzB;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,cAAc,GACrB,qBAAqB,GAAG,IAAI,CAE9B;AAED,wBAAgB,yBAAyB,CACvC,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,GACxC,MAAM,CAER;AAED,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,uBAAuB,GAC9B,IAAI,CASN;AAuBD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,uBAAuB,EAAE,EACjC,KAAK,SAA8B,GAClC,uBAAuB,CAuEzB;AAED,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,uBAAuB,EAAE,EACjC,KAAK,CAAC,EAAE,MAAM,GACb,uBAAuB,CAIzB;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,uBAAuB,GAAG,IAAI,CAIxF"}
@@ -0,0 +1,132 @@
1
+ import { existsSync, mkdirSync, writeFileSync } from "node:fs";
2
+ import { dirname, join } from "node:path";
3
+ import { readJsonFileWithSchema } from "./parse.js";
4
+ import { WorkflowWorkspaceSchemaSchema, } from "./schema.js";
5
+ export const BUILTIN_WORKSPACE_ZONE_IDS = {
6
+ RAW: "raw",
7
+ SUMMARIES: "summaries",
8
+ KNOWLEDGE_ENTITIES: "knowledge-entities",
9
+ KNOWLEDGE_CLAIMS: "knowledge-claims",
10
+ KNOWLEDGE_INDEXES: "knowledge-indexes",
11
+ HOME: "home",
12
+ RUNTIME: "runtime",
13
+ };
14
+ export const WORKSPACE_SCHEMA_FILE = "workspace.schema.json";
15
+ export function workspaceSchemaFilePath(rootPath) {
16
+ return join(rootPath, WORKSPACE_SCHEMA_FILE);
17
+ }
18
+ export function workspaceSchemaRelativePath() {
19
+ return `workflow/${WORKSPACE_SCHEMA_FILE}`;
20
+ }
21
+ export function listWorkspaceSchemaZones(schema) {
22
+ return [...schema.zones];
23
+ }
24
+ export function findWorkspaceSchemaZone(schema, zoneId) {
25
+ return schema.zones.find((zone) => zone.id === zoneId) ?? null;
26
+ }
27
+ export function workspaceZoneAbsolutePath(workspacePath, zone) {
28
+ return join(workspacePath, zone.path);
29
+ }
30
+ export function ensureWorkspaceZoneTargets(workspacePath, schema) {
31
+ for (const zone of schema.zones) {
32
+ if (zone.kind === "directory" || zone.kind === "runtime") {
33
+ mkdirSync(workspaceZoneAbsolutePath(workspacePath, zone), { recursive: true });
34
+ continue;
35
+ }
36
+ mkdirSync(dirname(workspaceZoneAbsolutePath(workspacePath, zone)), { recursive: true });
37
+ }
38
+ }
39
+ function stageContractType(stage) {
40
+ return (stage.contractType ?? stage.contract_type);
41
+ }
42
+ function stageIdsFor(stages, contractType) {
43
+ return stages
44
+ .filter((stage) => stageContractType(stage) === contractType)
45
+ .map((stage) => stage.id);
46
+ }
47
+ function pushZone(zones, zone) {
48
+ if (zones.some((existing) => existing.path === zone.path))
49
+ return;
50
+ zones.push(zone);
51
+ }
52
+ export function buildWorkspaceSchema(stages, label = "Compiled workspace schema") {
53
+ const summarizeStages = stageIdsFor(stages, "workspace-file-evidence");
54
+ const structureStages = stageIdsFor(stages, "workspace-knowledge-structure");
55
+ const shapeStages = stageIdsFor(stages, "workspace-query-shape");
56
+ const zones = [];
57
+ pushZone(zones, {
58
+ id: BUILTIN_WORKSPACE_ZONE_IDS.RAW,
59
+ path: "raw",
60
+ kind: "directory",
61
+ required: true,
62
+ owned_by: [],
63
+ description: "Workspace-local raw snapshot copied from the dataset for direct evidence and verification.",
64
+ });
65
+ pushZone(zones, {
66
+ id: BUILTIN_WORKSPACE_ZONE_IDS.SUMMARIES,
67
+ path: "summaries",
68
+ kind: "directory",
69
+ required: true,
70
+ owned_by: summarizeStages,
71
+ description: "Per-file evidence notes produced by file-evidence stages.",
72
+ });
73
+ pushZone(zones, {
74
+ id: BUILTIN_WORKSPACE_ZONE_IDS.KNOWLEDGE_ENTITIES,
75
+ path: "knowledge/entities",
76
+ kind: "directory",
77
+ required: true,
78
+ owned_by: structureStages,
79
+ description: "Canonical entity notes produced by knowledge-structure stages.",
80
+ });
81
+ pushZone(zones, {
82
+ id: BUILTIN_WORKSPACE_ZONE_IDS.KNOWLEDGE_CLAIMS,
83
+ path: "knowledge/claims",
84
+ kind: "directory",
85
+ required: true,
86
+ owned_by: structureStages,
87
+ description: "Claim notes produced by knowledge-structure stages.",
88
+ });
89
+ pushZone(zones, {
90
+ id: BUILTIN_WORKSPACE_ZONE_IDS.KNOWLEDGE_INDEXES,
91
+ path: "knowledge/indexes",
92
+ kind: "directory",
93
+ required: true,
94
+ owned_by: Array.from(new Set([...structureStages, ...shapeStages])),
95
+ description: "Retrieval indexes and navigation notes produced by structure and shape stages.",
96
+ });
97
+ pushZone(zones, {
98
+ id: BUILTIN_WORKSPACE_ZONE_IDS.HOME,
99
+ path: "home.md",
100
+ kind: "file",
101
+ required: true,
102
+ owned_by: shapeStages,
103
+ description: "Primary entrypoint note for agents using the compiled workspace.",
104
+ });
105
+ pushZone(zones, {
106
+ id: BUILTIN_WORKSPACE_ZONE_IDS.RUNTIME,
107
+ path: ".interf",
108
+ kind: "runtime",
109
+ required: true,
110
+ owned_by: [],
111
+ description: "CLI-owned runtime state, health, stage contracts, and proof artifacts.",
112
+ });
113
+ return {
114
+ kind: "workspace-schema",
115
+ version: 1,
116
+ target_type: "workspace",
117
+ label,
118
+ zones,
119
+ };
120
+ }
121
+ export function writeWorkspaceSchemaFile(rootPath, stages, label) {
122
+ const schema = buildWorkspaceSchema(stages, label);
123
+ writeFileSync(workspaceSchemaFilePath(rootPath), `${JSON.stringify(schema, null, 2)}\n`);
124
+ return schema;
125
+ }
126
+ export function readWorkspaceSchemaFile(rootPath) {
127
+ const path = workspaceSchemaFilePath(rootPath);
128
+ if (!existsSync(path))
129
+ return null;
130
+ return readJsonFileWithSchema(path, "workspace schema", WorkflowWorkspaceSchemaSchema);
131
+ }
132
+ //# sourceMappingURL=workspace-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-schema.js","sourceRoot":"","sources":["../../src/lib/workspace-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EACL,6BAA6B,GAK9B,MAAM,aAAa,CAAC;AAQrB,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,GAAG,EAAE,KAAK;IACV,SAAS,EAAE,WAAW;IACtB,kBAAkB,EAAE,oBAAoB;IACxC,gBAAgB,EAAE,kBAAkB;IACpC,iBAAiB,EAAE,mBAAmB;IACtC,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;CACV,CAA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,CAAC;QACV,WAAW,EAAE,WAAW;QACxB,KAAK;QACL,KAAK;KACN,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,QAAgB,EAChB,MAAiC,EACjC,KAAc;IAEd,MAAM,MAAM,GAAG,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACnD,aAAa,CAAC,uBAAuB,CAAC,QAAQ,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IACzF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,QAAgB;IACtD,MAAM,IAAI,GAAG,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAC/C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACnC,OAAO,sBAAsB,CAAC,IAAI,EAAE,kBAAkB,EAAE,6BAA6B,CAAC,CAAC;AACzF,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@interf/compiler",
3
- "version": "0.3.2",
4
- "description": "Open-source knowledge compiler that measures local-agent accuracy on your files and builds compiled workspaces on top of them.",
3
+ "version": "0.3.4",
4
+ "description": "Interf Compiler is a local runtime for data-processing workflows that turn datasets into compiled workspaces for local agents.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "interf": "dist/bin.js"
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  {
3
3
  "name": "benchmark",
4
- "description": "Compare compiled workspaces with Interf's file-based benchmark specs. Use when asked to benchmark, compare workflows, compare compiled workspaces, or run checks on already-compiled Interf targets."
4
+ "description": "Compare compiled workspaces with Interf Compiler's file-based benchmark specs. Use when asked to benchmark, compare workflows, compare compiled workspaces, or run checks on already-compiled Interf Compiler targets."
5
5
  }
6
6
  ---
7
7
 
8
8
  # Benchmark Compiled Workspaces
9
9
 
10
- Use this skill when the job is to compare compiled Interf outputs, not to build them from scratch.
10
+ Use this skill when the job is to compare compiled outputs built by Interf Compiler, not to build them from scratch.
11
11
 
12
12
  Prefer the CLI:
13
13
 
@@ -22,7 +22,7 @@ This skill is for:
22
22
 
23
23
  This skill is **not** for:
24
24
  - compiling a workspace
25
- - inventing a second benchmark system outside Interf's filesystem contract
25
+ - inventing a second benchmark system outside Interf Compiler's filesystem contract
26
26
 
27
27
  ## Source of truth
28
28
 
@@ -36,7 +36,7 @@ When this skill is used inside a generated workspace, do not try to open SDK rep
36
36
 
37
37
  ## Benchmark model
38
38
 
39
- Interf benchmark specs are file-first and deterministic by default.
39
+ Interf Compiler benchmark specs are file-first and deterministic by default.
40
40
 
41
41
  They live under `interf/benchmarks/`.
42
42
 
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  {
3
3
  "name": "workflow/create",
4
- "description": "Create or refine an Interf workflow package. Use when asked to define a workspace workflow, author workflow.json, shape compile stages, or add declarative stage acceptance criteria."
4
+ "description": "Create or refine an Interf Compiler workflow package. Use when asked to define a workspace workflow, author workflow.json, shape compile stages, or add declarative stage acceptance criteria."
5
5
  }
6
6
  ---
7
7
 
8
8
  # Create Workflow
9
9
 
10
- Use this skill when shaping a reusable Interf workflow package.
10
+ Use this skill when shaping a reusable Interf Compiler workflow package.
11
11
 
12
12
  Prefer the CLI first:
13
13
 
@@ -30,6 +30,7 @@ A workflow is a package, not just a JSON file.
30
30
  It has two layers:
31
31
 
32
32
  - `workflow.json` = machine-readable stage graph and contract mapping
33
+ - `workspace.schema.json` = deterministic compiled-workspace shape
33
34
  - local docs = human/agent method layer
34
35
 
35
36
  Typical shape:
@@ -37,6 +38,7 @@ Typical shape:
37
38
  ```text
38
39
  interf/workflows/<workflow-id>/
39
40
  workflow.json
41
+ workspace.schema.json
40
42
  README.md
41
43
  create/
42
44
  SKILL.md
@@ -80,6 +82,22 @@ Use the shipped workspace contract families only:
80
82
 
81
83
  Do not invent new engine contract kinds in a local workflow package.
82
84
 
85
+ ## Workspace schema
86
+
87
+ Every workflow package should also define `workspace.schema.json`.
88
+
89
+ It should describe the deterministic output zones Interf Compiler expects, including:
90
+
91
+ - `raw/`
92
+ - `summaries/`
93
+ - `knowledge/entities/`
94
+ - `knowledge/claims/`
95
+ - `knowledge/indexes/`
96
+ - `home.md`
97
+ - `.interf/`
98
+
99
+ Use `owned_by` to show which stage ids are responsible for each zone. This keeps the reusable workflow package aligned with the compiled workspace ABI.
100
+
83
101
  ## Declarative acceptance
84
102
 
85
103
  Use stage `acceptance` for deterministic stage checks that the CLI can compare against runtime state.
@@ -112,11 +130,12 @@ Avoid hardcoding fixed file counts unless the workflow really requires them.
112
130
 
113
131
  ## Outcome
114
132
 
115
- A good workflow package gives Interf:
133
+ A good workflow package gives Interf Compiler:
116
134
 
117
135
  - a compile pipeline
136
+ - a deterministic workspace schema
118
137
  - stage-to-contract mapping
119
138
  - readable local docs for executors
120
139
  - optional declarative acceptance checks
121
140
 
122
- The goal is not to write code inside the workflow. The goal is to define a stage pipeline that Interf can enforce.
141
+ The goal is not to write code inside the workflow. The goal is to define a stage pipeline that Interf Compiler can enforce.
@@ -1,6 +1,6 @@
1
1
  # Workspace Shape
2
2
 
3
- Shape the final workspace surface around the workspace focus and saved questions.
3
+ Shape the final workspace surface around the workspace focus and saved truth checks.
4
4
 
5
5
  Requirements:
6
6
  - read the shaping input named in the stage contract
@@ -2,7 +2,7 @@
2
2
 
3
3
  This directory contains bundled helper files for compiled workspaces.
4
4
 
5
- Interf creates compiled workspaces under:
5
+ Interf Compiler creates compiled workspaces under:
6
6
 
7
7
  ```text
8
8
  interf/workspaces/<name>/
@@ -10,14 +10,15 @@ interf/workspaces/<name>/
10
10
 
11
11
  The generated workspace is a file-based layer on top of your raw files.
12
12
 
13
- Interf scaffolds:
13
+ Interf Compiler scaffolds:
14
14
 
15
15
  - `interf.json`
16
16
  - `AGENTS.md`
17
17
  - `CLAUDE.md`
18
18
  - `home.md`
19
19
  - `workflow/`
20
+ - `workflow/workspace.schema.json`
20
21
  - `.interf/`
21
22
  - `.interfignore`
22
23
 
23
- The source folder remains the human control plane. The compiled workspace is the agent-facing surface.
24
+ The source folder remains the human control plane for the dataset. The compiled workspace is the agent-facing surface.