@interf/compiler 0.9.3 → 0.9.5

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 (103) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/README.md +2 -1
  3. package/agent-skills/interf-actions/SKILL.md +17 -11
  4. package/agent-skills/interf-actions/references/cli.md +8 -22
  5. package/dist/cli/commands/action-input-cli.d.ts +25 -0
  6. package/dist/cli/commands/action-input-cli.js +73 -0
  7. package/dist/cli/commands/compile.d.ts +3 -8
  8. package/dist/cli/commands/compile.js +13 -41
  9. package/dist/cli/commands/create-method-wizard.d.ts +0 -12
  10. package/dist/cli/commands/create-method-wizard.js +95 -126
  11. package/dist/cli/commands/create.d.ts +0 -2
  12. package/dist/cli/commands/create.js +16 -22
  13. package/dist/cli/commands/doctor.js +1 -1
  14. package/dist/cli/commands/executor-flow.js +1 -1
  15. package/dist/cli/commands/init.d.ts +16 -1
  16. package/dist/cli/commands/init.js +40 -53
  17. package/dist/cli/commands/list.js +1 -1
  18. package/dist/cli/commands/preparation-action.d.ts +8 -0
  19. package/dist/cli/commands/preparation-action.js +29 -0
  20. package/dist/cli/commands/preparation-picker.d.ts +5 -0
  21. package/dist/cli/commands/preparation-picker.js +36 -0
  22. package/dist/cli/commands/preparation-selection.js +2 -2
  23. package/dist/cli/commands/reset.js +15 -4
  24. package/dist/cli/commands/service-action-flow.d.ts +9 -0
  25. package/dist/cli/commands/service-action-flow.js +19 -0
  26. package/dist/cli/commands/source-config-wizard.d.ts +0 -1
  27. package/dist/cli/commands/source-config-wizard.js +43 -53
  28. package/dist/cli/commands/status.js +7 -123
  29. package/dist/cli/commands/test.d.ts +1 -2
  30. package/dist/cli/commands/test.js +40 -203
  31. package/dist/cli/commands/web.js +8 -262
  32. package/dist/compiler-ui/404.html +1 -1
  33. package/dist/compiler-ui/__next.__PAGE__.txt +2 -2
  34. package/dist/compiler-ui/__next._full.txt +3 -3
  35. package/dist/compiler-ui/__next._head.txt +1 -1
  36. package/dist/compiler-ui/__next._index.txt +2 -2
  37. package/dist/compiler-ui/__next._tree.txt +2 -2
  38. package/dist/compiler-ui/_next/static/chunks/177mvn4rse235.js +89 -0
  39. package/dist/compiler-ui/_next/static/chunks/18a8f2jkv3z.c.css +3 -0
  40. package/dist/compiler-ui/_not-found/__next._full.txt +2 -2
  41. package/dist/compiler-ui/_not-found/__next._head.txt +1 -1
  42. package/dist/compiler-ui/_not-found/__next._index.txt +2 -2
  43. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +1 -1
  44. package/dist/compiler-ui/_not-found/__next._not-found.txt +1 -1
  45. package/dist/compiler-ui/_not-found/__next._tree.txt +2 -2
  46. package/dist/compiler-ui/_not-found.html +1 -1
  47. package/dist/compiler-ui/_not-found.txt +2 -2
  48. package/dist/compiler-ui/index.html +1 -1
  49. package/dist/compiler-ui/index.txt +3 -3
  50. package/dist/index.d.ts +0 -23
  51. package/dist/index.js +0 -16
  52. package/dist/packages/agents/lib/shells.js +2 -2
  53. package/dist/packages/compiler/lib/schema.d.ts +1 -1
  54. package/dist/packages/compiler/lib/schema.js +1 -1
  55. package/dist/packages/contracts/lib/schema.d.ts +0 -1
  56. package/dist/packages/contracts/lib/schema.js +0 -1
  57. package/dist/packages/execution/lib/schema.d.ts +0 -7
  58. package/dist/packages/execution/lib/schema.js +0 -1
  59. package/dist/packages/local-service/action-definitions.d.ts +246 -0
  60. package/dist/packages/local-service/action-definitions.js +1148 -0
  61. package/dist/packages/local-service/action-planner.d.ts +9 -0
  62. package/dist/packages/local-service/action-planner.js +134 -0
  63. package/dist/packages/local-service/action-values.d.ts +1 -22
  64. package/dist/packages/local-service/action-values.js +1 -30
  65. package/dist/packages/local-service/client.d.ts +48 -17
  66. package/dist/packages/local-service/client.js +95 -52
  67. package/dist/packages/local-service/index.d.ts +8 -5
  68. package/dist/packages/local-service/index.js +5 -3
  69. package/dist/packages/local-service/lib/schema.d.ts +302 -292
  70. package/dist/packages/local-service/lib/schema.js +115 -39
  71. package/dist/packages/local-service/native-run-handlers.d.ts +23 -0
  72. package/dist/{cli/commands/compile-controller.js → packages/local-service/native-run-handlers.js} +203 -19
  73. package/dist/{cli/commands/check-draft.d.ts → packages/local-service/readiness-check-draft.d.ts} +2 -2
  74. package/dist/packages/local-service/routes.d.ts +6 -1
  75. package/dist/packages/local-service/routes.js +7 -2
  76. package/dist/packages/local-service/run-observability.js +15 -17
  77. package/dist/packages/local-service/runtime.d.ts +10 -7
  78. package/dist/packages/local-service/runtime.js +430 -286
  79. package/dist/packages/local-service/server.js +94 -44
  80. package/dist/packages/method-package/method-review-paths.d.ts +1 -1
  81. package/dist/packages/method-package/method-review-paths.js +5 -5
  82. package/dist/packages/project-model/index.d.ts +1 -0
  83. package/dist/packages/project-model/index.js +1 -0
  84. package/dist/packages/project-model/preparation-entries.d.ts +11 -0
  85. package/dist/packages/project-model/preparation-entries.js +49 -0
  86. package/dist/packages/project-model/source-config.d.ts +1 -0
  87. package/dist/packages/project-model/source-config.js +12 -1
  88. package/dist/packages/testing/lib/schema.d.ts +2 -3
  89. package/dist/packages/testing/lib/schema.js +2 -3
  90. package/dist/packages/testing/readiness-check-run.d.ts +3 -3
  91. package/dist/packages/testing/readiness-check-run.js +12 -17
  92. package/package.json +5 -24
  93. package/dist/cli/commands/compile-controller.d.ts +0 -17
  94. package/dist/cli/commands/compiled-flow.d.ts +0 -25
  95. package/dist/cli/commands/compiled-flow.js +0 -112
  96. package/dist/cli/commands/test-flow.d.ts +0 -58
  97. package/dist/cli/commands/test-flow.js +0 -231
  98. package/dist/compiler-ui/_next/static/chunks/0c9mu7yldxyyg.css +0 -3
  99. package/dist/compiler-ui/_next/static/chunks/15mks7ry_cupt.js +0 -118
  100. /package/dist/compiler-ui/_next/static/{pIZnDsV3Je6hdC3cOsGdK → 84FaeF3EzBF9kKTMjSEVN}/_buildManifest.js +0 -0
  101. /package/dist/compiler-ui/_next/static/{pIZnDsV3Je6hdC3cOsGdK → 84FaeF3EzBF9kKTMjSEVN}/_clientMiddlewareManifest.js +0 -0
  102. /package/dist/compiler-ui/_next/static/{pIZnDsV3Je6hdC3cOsGdK → 84FaeF3EzBF9kKTMjSEVN}/_ssgManifest.js +0 -0
  103. /package/dist/{cli/commands/check-draft.js → packages/local-service/readiness-check-draft.js} +0 -0
@@ -41,8 +41,8 @@ function safeMethodNamePart(value) {
41
41
  .replace(/^-+|-+$/g, "")
42
42
  || "run";
43
43
  }
44
- function methodTraceName(runType, name) {
45
- return `workflow//./interf/${runType}//${safeMethodNamePart(name)}`;
44
+ function interfTraceName(runType, name) {
45
+ return `interf//./runs/${runType}//${safeMethodNamePart(name)}`;
46
46
  }
47
47
  function methodStepName(runType, label) {
48
48
  return `step//./interf/${runType}//${safeMethodNamePart(label)}`;
@@ -93,15 +93,11 @@ function agentLabelForJob(job) {
93
93
  }
94
94
  function jobTypeLabelForMetric(type) {
95
95
  if (type === "readiness-check-draft")
96
- return "Readiness-check draft";
96
+ return "Draft readiness checks";
97
97
  if (type === "method-authoring")
98
98
  return "Method draft";
99
99
  if (type === "method-improvement")
100
100
  return "Method improvement";
101
- if (type === "compile")
102
- return "Compile";
103
- if (type === "test")
104
- return "Readiness check";
105
101
  return "Local job";
106
102
  }
107
103
  function stageTracePayload(stage) {
@@ -118,7 +114,7 @@ export function compileRunToObservability(run) {
118
114
  const proof = proofChecksForCompileRun(run);
119
115
  const executor = run.stages.find((stage) => stage.executor)?.executor ?? null;
120
116
  const traceStatus = methodTraceRunStatus(run.status);
121
- const methodName = methodTraceName("compile", `Prepare ${run.preparation}`);
117
+ const methodName = interfTraceName("compile", `Prepare ${run.preparation}`);
122
118
  const completedAt = run.finished_at ?? (traceStatus === "completed" || traceStatus === "failed" || traceStatus === "cancelled"
123
119
  ? run.started_at ?? run.created_at
124
120
  : undefined);
@@ -221,6 +217,7 @@ export function compileRunToObservability(run) {
221
217
  created_at: run.created_at,
222
218
  started_at: run.started_at ?? null,
223
219
  finished_at: run.finished_at ?? null,
220
+ readiness: run.readiness ?? null,
224
221
  metrics: [
225
222
  { label: "Preparation", value: run.preparation },
226
223
  { label: "Method", value: run.method },
@@ -274,12 +271,13 @@ export function compileRunToObservability(run) {
274
271
  export function testRunToObservability(run) {
275
272
  const traceStatus = methodTraceRunStatus(run.status);
276
273
  const title = `Check readiness ${run.preparation}`;
277
- const methodName = methodTraceName("test", title);
274
+ const methodName = interfTraceName("test", title);
278
275
  const completedAt = run.finished_at ?? (traceStatus === "completed" || traceStatus === "failed" || traceStatus === "cancelled"
279
276
  ? run.started_at ?? new Date().toISOString()
280
277
  : undefined);
281
- const raw = run.comparison?.raw ?? null;
282
- const compiled = run.comparison?.compiled ?? null;
278
+ const readinessRun = run.readiness_run;
279
+ const raw = readinessRun?.raw ?? null;
280
+ const compiled = readinessRun?.compiled ?? null;
283
281
  const proofCandidates = [
284
282
  raw
285
283
  ? {
@@ -354,7 +352,7 @@ export function testRunToObservability(run) {
354
352
  preparation: run.preparation,
355
353
  mode: run.mode,
356
354
  },
357
- output: run.comparison ?? null,
355
+ output: readinessRun ?? null,
358
356
  });
359
357
  }
360
358
  for (const step of targetSteps) {
@@ -373,7 +371,7 @@ export function testRunToObservability(run) {
373
371
  if (traceStatus === "completed") {
374
372
  events.push(traceEvent(run.run_id, "run_completed", completedAt, eventIndex++, {
375
373
  output: {
376
- comparison: run.comparison,
374
+ readiness_run: readinessRun,
377
375
  proof,
378
376
  },
379
377
  }));
@@ -400,6 +398,7 @@ export function testRunToObservability(run) {
400
398
  created_at: run.started_at ?? completedAt ?? new Date().toISOString(),
401
399
  started_at: run.started_at ?? null,
402
400
  finished_at: run.finished_at ?? null,
401
+ readiness: run.readiness ?? null,
403
402
  metrics: [
404
403
  { label: "Preparation", value: run.preparation },
405
404
  { label: "Mode", value: run.mode },
@@ -428,7 +427,7 @@ export function testRunToObservability(run) {
428
427
  source_path: run.source_path ?? null,
429
428
  portable_context_path: run.portable_context_path ?? null,
430
429
  },
431
- ...(traceStatus === "completed" ? { output: { comparison: run.comparison, proof } } : {}),
430
+ ...(traceStatus === "completed" ? { output: { readiness_run: readinessRun, proof } } : {}),
432
431
  ...(traceStatus === "failed" ? { error: structuredMethodError(run.error) } : {}),
433
432
  ...(run.started_at ? { startedAt: run.started_at } : {}),
434
433
  ...(completedAt ? { completedAt } : {}),
@@ -441,8 +440,7 @@ export function testRunToObservability(run) {
441
440
  });
442
441
  }
443
442
  export function jobRunToObservability(job) {
444
- const runType = (job.job_type === "preparation-setup" ||
445
- job.job_type === "readiness-check-draft" ||
443
+ const runType = (job.job_type === "readiness-check-draft" ||
446
444
  job.job_type === "method-authoring" ||
447
445
  job.job_type === "method-improvement"
448
446
  ? job.job_type
@@ -456,7 +454,7 @@ export function jobRunToObservability(job) {
456
454
  }
457
455
  : null;
458
456
  const traceStatus = methodTraceRunStatus(job.status);
459
- const methodName = methodTraceName(runType, job.title);
457
+ const methodName = interfTraceName(runType, job.title);
460
458
  const completedAt = job.finished_at ?? (traceStatus === "completed" || traceStatus === "failed" || traceStatus === "cancelled"
461
459
  ? job.started_at ?? job.created_at
462
460
  : undefined);
@@ -2,7 +2,7 @@ import { type ArtifactRef, type CompileRun, type InterfRunEvent, type ProofRecor
2
2
  import { type RunEventSink } from "../execution/events.js";
3
3
  import { type ReadinessState } from "../contracts/lib/schema.js";
4
4
  import type { SourcePreparationConfig } from "../project-model/lib/schema.js";
5
- import { type ActionProposalCreateRequest, type ActionProposalPlan, type ActionProposalResource, type CompileRunCreateRequest, type CompileRunResource, type MethodResource, type LocalServiceHealth, type LocalJobEvent, type LocalJobEventAppendRequest, type LocalExecutorStatus, type LocalJobRunResource, type LocalRunHandlerResult, type PortableContextResource, type PreparationReadinessState, type PreparationResource, type ReadinessCheckDraftCreateRequest, type ReadinessCheckDraftResult, type RunObservabilityResource, type SourceFileResource, type WorkspaceFileResource, type TestRunCreateRequest, type TestRunResource, type MethodAuthoringCreateRequest, type MethodAuthoringResult } from "./lib/schema.js";
5
+ import { type ActionProposalCreateRequest, type ActionProposalPlan, type ActionProposalResource, type CompileRunCreateRequest, type CompileRunResource, type MethodResource, type LocalServiceHealth, type LocalJobEvent, type LocalJobEventAppendRequest, type LocalExecutorStatus, type LocalJobRunResource, type LocalRunHandlerResult, type PortableContextResource, type PreparationReadinessState, type PreparationResource, type ReadinessCheckDraftCreateRequest, type ReadinessCheckDraftResult, type RunObservabilityResource, type SourceFileResource, type WorkspaceFileResource, type TestRunCreateRequest, type TestRunResource, type MethodAuthoringCreateRequest, type MethodAuthoringResult, type MethodChangeResult, type PreparationChangeResult, type PreparationSetupResult, type ResetResult } from "./lib/schema.js";
6
6
  export interface LocalServiceCompileRunContext {
7
7
  runId: string;
8
8
  sourcePath: string;
@@ -84,11 +84,14 @@ export declare class LocalServiceRuntime {
84
84
  decideActionProposal(proposalId: string, requestValue: unknown): Promise<ActionProposalResource | null>;
85
85
  listRunObservability(): RunObservabilityResource[];
86
86
  getRunObservability(runId: string): RunObservabilityResource | null;
87
- createJobRun(requestValue: unknown): LocalJobRunResource;
88
- appendJobRunEvent(runId: string, requestValue: unknown): LocalJobRunResource | null;
87
+ private createJobRun;
88
+ private appendJobRunEvent;
89
89
  createReadinessCheckDraftRun(requestValue: unknown): Promise<LocalJobRunResource>;
90
- createPreparationSetupRun(requestValue: unknown): Promise<LocalJobRunResource>;
91
- createMethodAuthoringRun(requestValue: unknown): Promise<LocalJobRunResource>;
90
+ applyMethodChange(requestValue: unknown): MethodChangeResult;
91
+ applyPreparationSetup(requestValue: unknown): PreparationSetupResult;
92
+ applyPreparationChange(requestValue: unknown): PreparationChangeResult;
93
+ applyReset(requestValue: unknown): ResetResult;
94
+ createMethodAuthoringRun(requestValue: unknown, jobType?: "method-authoring" | "method-improvement"): Promise<LocalJobRunResource>;
92
95
  listPortableContexts(): PortableContextResource[];
93
96
  getPortableContext(preparationName: string): PortableContextResource | null;
94
97
  listCompileRuns(): CompileRunResource[];
@@ -109,7 +112,7 @@ export declare class LocalServiceRuntime {
109
112
  private jobRunContext;
110
113
  private defaultPreparationName;
111
114
  private planActionProposal;
112
- private buildPreparationSetupRequest;
115
+ private directServiceActionClarification;
113
116
  private buildActionProposal;
114
117
  private submitActionProposal;
115
118
  private resolvePreparationConfig;
@@ -122,7 +125,7 @@ export declare class LocalServiceRuntime {
122
125
  private recordCompileRunEvent;
123
126
  private refreshCompileRunFromRuntime;
124
127
  private emitRuntimeDerivedEvents;
125
- private readLatestComparison;
128
+ private readLatestReadinessRun;
126
129
  private checksEvaluatedEvent;
127
130
  private readinessUpdatedEvent;
128
131
  private writeTestRun;