@molecule/api-ai-tools 1.15.0 → 1.16.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.
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,UAAU,CAAA;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAwW1C,CAAA"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,UAAU,CAAA;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CA4Y1C,CAAA"}
package/dist/schemas.js CHANGED
@@ -297,7 +297,7 @@ export const TOOL_SCHEMAS = {
297
297
  },
298
298
  save_plan: {
299
299
  name: 'save_plan',
300
- description: 'Save an implementation plan as a markdown file in .agents/plans/.',
300
+ description: 'Save an implementation plan as a markdown file in .agents/plans/. Record registry package decisions in the typed `packages` field, not as Markdown lines or tables: one entry per needed domain. `use` must name the exact package to use or add; `own` and `skip` require that package doc to have been read.',
301
301
  parameters: {
302
302
  type: 'object',
303
303
  properties: {
@@ -307,7 +307,39 @@ export const TOOL_SCHEMAS = {
307
307
  },
308
308
  content: {
309
309
  type: 'string',
310
- description: 'Full plan content in markdown. MUST be a checklist: every actionable step is a `- [ ]` checkbox (grouped under short headings) so each one can be flipped to `- [x]` in this file as it is completed.',
310
+ description: 'Full plan content in markdown. MUST be a checklist: every actionable step is a `- [ ]` checkbox (grouped under short headings) so each one can be flipped to `- [x]` in this file as it is completed. This text is for people and is not parsed for package decisions.',
311
+ },
312
+ packages: {
313
+ type: 'array',
314
+ description: 'Typed registry decisions for every domain the request needs. Reasons are retained for people, not graded.',
315
+ items: {
316
+ type: 'object',
317
+ properties: {
318
+ domain: {
319
+ type: 'string',
320
+ description: 'Registry domain, for example `article` or `comment`.',
321
+ },
322
+ decision: {
323
+ type: 'string',
324
+ enum: ['use', 'own', 'skip'],
325
+ description: 'Use/add the package, implement the domain yourself, or skip it.',
326
+ },
327
+ package: {
328
+ type: 'string',
329
+ description: 'Exact @molecule/* package identity. Required for `use`; optional for `own`/`skip`.',
330
+ },
331
+ reason: {
332
+ type: 'string',
333
+ description: 'Human-readable rationale in any language; its wording is not judged.',
334
+ },
335
+ config: {
336
+ type: 'array',
337
+ items: { type: 'string' },
338
+ description: 'Documented configuration field names selected for a declared app capability.',
339
+ },
340
+ },
341
+ required: ['domain', 'decision', 'reason'],
342
+ },
311
343
  },
312
344
  },
313
345
  required: ['name', 'content'],
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AA2B9C,OAAO,EAIL,KAAK,mBAAmB,EAEzB,MAAM,wBAAwB,CAAA;AAsC/B;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,KAAK,CAAC,EACnD,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GACjC,OAAO,CAAC,mBA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AAE,OAAO,CAAA;CAC5B;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAA;AAoBpF;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,CAAC,GACxE,qBAAqB,CAkBvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiCxB;AA2GD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,MAAM,EAAE,CAmnGxF"}
package/dist/tools.js CHANGED
@@ -3965,6 +3965,9 @@ export function buildTools(backend, config) {
3965
3965
  input.plan ??
3966
3966
  input.markdown ??
3967
3967
  input.text);
3968
+ // Decisions are structured data beside the human Markdown. Return them so the
3969
+ // conversation can preserve the approved decisions even if a long tool input is folded.
3970
+ const packages = Array.isArray(input.packages) ? input.packages : [];
3968
3971
  // Genuinely empty content (wrong/missing field) — name the fix, don't blame the format.
3969
3972
  if (typeof content !== 'string' || content.trim() === '') {
3970
3973
  return {
@@ -4004,7 +4007,7 @@ export function buildTools(backend, config) {
4004
4007
  const filename = `${String(nextNum).padStart(2, '0')}-${slug}-${date}.md`;
4005
4008
  const planPath = `${plansDir}/${filename}`;
4006
4009
  await backend.writeFile(planPath, content);
4007
- return { path: planPath, ok: true, content, name };
4010
+ return { path: planPath, ok: true, content, name, packages };
4008
4011
  }
4009
4012
  catch (e) {
4010
4013
  return { error: `Failed to save plan: ${e.message}` };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/api-ai-tools",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "Shared AI agent tools with backend abstraction for sandbox and local execution",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",