create-agdf 0.31.0 → 0.32.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.
Files changed (121) hide show
  1. package/generated/.opencode/agdf-interaction-locales.json +148 -4
  2. package/generated/plugins/agdf/.claude-plugin/plugin.json +1 -1
  3. package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
  4. package/generated/plugins/agdf/companion/events.mjs +5 -3
  5. package/generated/plugins/agdf/companion/figure.mjs +241 -110
  6. package/generated/plugins/agdf/companion/localization.mjs +5 -0
  7. package/generated/plugins/agdf/companion/notice.mjs +10 -2
  8. package/generated/plugins/agdf/companion/register.mjs +90 -32
  9. package/generated/plugins/agdf/companion/run-state.mjs +13 -1
  10. package/generated/plugins/agdf/companion/view.mjs +149 -19
  11. package/generated/plugins/agdf/mcp/server/package.json +2 -2
  12. package/generated/plugins/agdf/mcp/server/src/generation-runtime.js +6 -4
  13. package/generated/plugins/agdf/mcp/server/src/generation.js +8 -2
  14. package/generated/plugins/agdf/mcp/server/src/main.js +4 -1
  15. package/generated/plugins/agdf/mcp/server/src/server.js +19 -5
  16. package/generated/plugins/agdf/mcp/server/ui/cockpit.html +130 -33
  17. package/generated/plugins/agdf/mcp/server/ui/decision-manifest.json +3 -3
  18. package/generated/plugins/agdf/mcp/server/ui/decision.html +3 -3
  19. package/generated/plugins/agdf/mcp/server/ui/manifest.json +3 -3
  20. package/generated/plugins/agdf/meta/agdf-interaction-locales.json +148 -4
  21. package/generated/plugins/agdf/meta/agdf-mcp-capability.json +1 -1
  22. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
  23. package/generated/plugins/agdf/meta/copilot-payload-baseline.json +3 -3
  24. package/generated/plugins/agdf/meta/distribution-profile-history.json +7 -0
  25. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +148 -4
  26. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
  27. package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +4 -1
  28. package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-worker-runtime.js +77 -77
  29. package/generated/plugins/agdf/runtime/create-agdf/package.json +1 -1
  30. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/events.js +4 -1
  31. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/figure-state.js +6 -4
  32. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js +6 -0
  33. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js +54 -11
  34. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-placeholder.js +4 -1
  35. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +5 -1
  36. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-list.js +10 -8
  37. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-session.js +11 -3
  38. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-work.js +4 -2
  39. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit.js +43 -13
  40. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/work-situation.js +25 -0
  41. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-worker.js +1 -0
  42. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-create-command.js +6 -1
  43. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory-reader.js +50 -3
  44. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory.js +12 -27
  45. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +29 -0
  46. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-title.js +43 -0
  47. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +2 -1
  48. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +5 -9
  49. package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
  50. package/generated/plugins/agdf/submission/openai/availability.md +1 -1
  51. package/generated/plugins/agdf/submission/openai/capability-matrix.json +1 -1
  52. package/generated/plugins/agdf/submission/openai/release-notes.md +5 -8
  53. package/generated/plugins/agdf/submission/openai/reviewer-cases.json +1 -1
  54. package/generated/plugins/agdf-planning/.codex-plugin/plugin.json +1 -1
  55. package/generated/plugins/agdf-planning/plugin.json +1 -1
  56. package/generated/plugins/copilot/agdf/.agdf-payload-inventory.json +76 -58
  57. package/generated/plugins/copilot/agdf/mcp/server/package.json +2 -2
  58. package/generated/plugins/copilot/agdf/mcp/server/src/generation-runtime.js +6 -4
  59. package/generated/plugins/copilot/agdf/mcp/server/src/generation.js +8 -2
  60. package/generated/plugins/copilot/agdf/mcp/server/src/main.js +4 -1
  61. package/generated/plugins/copilot/agdf/mcp/server/src/server.js +19 -5
  62. package/generated/plugins/copilot/agdf/meta/agdf-plugin.definition.json +1 -1
  63. package/generated/plugins/copilot/agdf/meta/distribution-profile-history.json +7 -0
  64. package/generated/plugins/copilot/agdf/plugin.json +1 -1
  65. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +148 -4
  66. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
  67. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +4 -1
  68. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-worker-runtime.js +62 -62
  69. package/generated/plugins/copilot/agdf/runtime/create-agdf/package.json +1 -1
  70. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/events.js +4 -1
  71. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/figure-state.js +6 -4
  72. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js +6 -0
  73. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js +54 -11
  74. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-placeholder.js +4 -1
  75. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +5 -1
  76. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/work-situation.js +25 -0
  77. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-create-command.js +6 -1
  78. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory-reader.js +50 -3
  79. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory.js +12 -27
  80. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +29 -0
  81. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-title.js +43 -0
  82. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +2 -1
  83. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +5 -9
  84. package/generated/plugins/copilot/agdf/runtime/runtime-manifest.json +2 -2
  85. package/generated/plugins/copilot/agdf/skills/agdf-interaction-locales.json +1 -1
  86. package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +1 -1
  87. package/generated/submissions/openai/agdf/meta/agdf-interaction-locales.json +148 -4
  88. package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +1 -1
  89. package/generated/submissions/openai/agdf/meta/copilot-payload-baseline.json +3 -3
  90. package/generated/submissions/openai/agdf/meta/distribution-profile-history.json +7 -0
  91. package/generated/submissions/openai/agdf/plugin.json +1 -1
  92. package/generated/submissions/openai/agdf/submission/openai/availability.md +1 -1
  93. package/generated/submissions/openai/agdf/submission/openai/capability-matrix.json +1 -1
  94. package/generated/submissions/openai/agdf/submission/openai/inventory.json +13 -13
  95. package/generated/submissions/openai/agdf/submission/openai/listing.json +1 -1
  96. package/generated/submissions/openai/agdf/submission/openai/readiness.json +2 -2
  97. package/generated/submissions/openai/agdf/submission/openai/readiness.md +2 -2
  98. package/generated/submissions/openai/agdf/submission/openai/release-notes.md +5 -8
  99. package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +1 -1
  100. package/lib/mcp-dispatch-runtime.js +4 -1
  101. package/lib/mcp-worker-runtime.js +77 -77
  102. package/package.json +1 -1
  103. package/runtime/core/lib/companion/events.js +4 -1
  104. package/runtime/core/lib/companion/figure-state.js +6 -4
  105. package/runtime/core/lib/companion/journal.js +6 -0
  106. package/runtime/core/lib/companion/run-view.js +54 -11
  107. package/runtime/core/lib/control-evaluation/decision-content-placeholder.js +4 -1
  108. package/runtime/core/lib/control-evaluation/gate-check.js +5 -1
  109. package/runtime/core/lib/control-inspect/cockpit-list.js +10 -8
  110. package/runtime/core/lib/control-inspect/cockpit-session.js +11 -3
  111. package/runtime/core/lib/control-inspect/cockpit-work.js +4 -2
  112. package/runtime/core/lib/control-inspect/cockpit.js +43 -13
  113. package/runtime/core/lib/control-inspect/work-situation.js +25 -0
  114. package/runtime/core/lib/control-read/cockpit-worker.js +1 -0
  115. package/runtime/core/lib/control-state/run-create-command.js +6 -1
  116. package/runtime/core/lib/control-state/run-inventory-reader.js +50 -3
  117. package/runtime/core/lib/control-state/run-inventory.js +12 -27
  118. package/runtime/core/lib/control-state/run-presentation-render.js +29 -0
  119. package/runtime/core/lib/control-state/run-title.js +43 -0
  120. package/runtime/core/lib/interaction-catalog-validation.js +2 -1
  121. package/runtime/core/lib/interaction-presentation.js +5 -9
@@ -156,7 +156,12 @@ export function buildAgdfServer({ runtime, executor, era, preparedCallStore } =
156
156
  const journaling = () => !runtime.requiresProjectedResult && typeof runtime.observeOutcome === 'function';
157
157
  const journalingFailures = () => typeof runtime.observeOutcome === 'function';
158
158
  const journal = (name, input, projected) => {
159
- try { runtime.observeOutcome(name, input, projected); } catch { /* notification only */ }
159
+ try { return runtime.observeOutcome(name, input, projected) === true; } catch { return false; /* notification only */ }
160
+ };
161
+ // Whether a result the generation returned left an event there (it journals what it produces).
162
+ const generationJournaled = (name, input, result) => {
163
+ if (!runtime.requiresProjectedResult || !result) return false;
164
+ try { return runtime.observesOutcome?.(name, input, result) === true; } catch { return false; }
160
165
  };
161
166
  const uiAllowed = (context) => !gated || requestDeclaresMcpAppUi(server.server, context, runtime.ui.mimeType);
162
167
  const supportsUi = context => !!runtime.ui && requestDeclaresMcpAppUi(server.server, context, runtime.ui.mimeType);
@@ -217,6 +222,8 @@ export function buildAgdfServer({ runtime, executor, era, preparedCallStore } =
217
222
  }
218
223
  let parentOwned;
219
224
  let phase = 'parse';
225
+ // Whether this call's result already left a companion event (written here or by its generation).
226
+ let journaled = false;
220
227
  try {
221
228
  phase = 'parse';
222
229
  argumentsValue = preparedCalls.resolve(name, argumentsValue);
@@ -228,8 +235,12 @@ export function buildAgdfServer({ runtime, executor, era, preparedCallStore } =
228
235
  const parsed = tool.parse(argumentsValue); phase = 'execute';
229
236
  result = await tool.execute(parsed, context.signal,
230
237
  { client: requestMcpClientInfo(server.server, context), uiSupported: supportsUi(context) });
231
- } else result = await dispatchExecutor.execute(argumentsValue, { signal: context.signal, toolName: name,
232
- trusted: runtime.prepareDispatch?.(name, argumentsValue) });
238
+ } else {
239
+ result = await dispatchExecutor.execute(argumentsValue, { signal: context.signal, toolName: name,
240
+ trusted: runtime.prepareDispatch?.(name, argumentsValue) });
241
+ }
242
+ // Behind the facade the generation journaled the result it returned.
243
+ journaled = generationJournaled(name, argumentsValue, result);
233
244
  if (runtime.postprocessToolResult) result = await runtime.postprocessToolResult(name, argumentsValue, result,
234
245
  { uiSupported: supportsUi(context), client: requestMcpClientInfo(server.server, context) });
235
246
  // Validate the producer and its canonical domain before consuming any
@@ -237,10 +248,12 @@ export function buildAgdfServer({ runtime, executor, era, preparedCallStore } =
237
248
  const checked = Object.hasOwn(result._meta ?? {}, 'agdf/tool-result') || runtime.requiresProjectedResult ? result
238
249
  : runtime.projectToolResult(name, argumentsValue, result);
239
250
  const { domain } = consume(name, checked);
240
- if (journaling()) journal(name, argumentsValue, checked);
251
+ if (journaling()) journaled = journal(name, argumentsValue, checked);
241
252
  const continued = await nextRead(domain, context);
242
253
  return respond(name, argumentsValue, checked, serialize ?? runtime.serialize, context, undefined, continued.next_read);
243
254
  } catch (error) {
255
+ // A facade failure raised after its generation had replied carries that reply.
256
+ journaled ||= generationJournaled(name, argumentsValue, error?.generationResult);
244
257
  const facts = runtime.normalizeFailure(error, { phase });
245
258
  const help = phase === 'parse' ? preparedCalls.validationHint(name, argumentsValue) : '';
246
259
  const failure = { ...runtime.failure(facts.code, name, argumentsValue, { ...facts, elapsed_ms: performance.now() - started }),
@@ -248,7 +261,8 @@ export function buildAgdfServer({ runtime, executor, era, preparedCallStore } =
248
261
  // A local execution/delivery failure is owned here, including malformed
249
262
  // producer output. It never causes re-execution or a second write.
250
263
  const projected = runtime.projectToolResult(name, argumentsValue, failure, facts);
251
- if (journalingFailures()) journal(name, argumentsValue, projected);
264
+ // One call leaves at most one event: a failure after its result left an event adds none.
265
+ if (journalingFailures() && !journaled) journal(name, argumentsValue, projected);
252
266
  return respond(name, argumentsValue, projected, serialize ?? runtime.serialize, context, facts);
253
267
  }
254
268
  },