@apotech-os/cli 3.0.2 → 3.1.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/index.js CHANGED
@@ -23037,6 +23037,13 @@ var PromptDefSchema = external_exports.object({
23037
23037
  template: external_exports.string(),
23038
23038
  labels: external_exports.array(external_exports.string()).optional()
23039
23039
  });
23040
+ var SuggestedToolBindingSchema = external_exports.object({
23041
+ /** Provider ref: `mcp:<slug>`, `app:<slug>`, or a bare integration slug. */
23042
+ provider: external_exports.string().min(1),
23043
+ /** Actions to enable; absent = everything the provider exposes. */
23044
+ enabledActions: external_exports.array(external_exports.string()).optional(),
23045
+ allowDestructive: external_exports.boolean().optional()
23046
+ });
23040
23047
  var AgentDeclarationSchema = external_exports.object({
23041
23048
  /** Stable per platform; becomes the Langfuse prompt name `agent.platform.<slug>`. */
23042
23049
  slug: external_exports.string().regex(/^[a-z][a-z0-9-]*$/),
@@ -23047,7 +23054,9 @@ var AgentDeclarationSchema = external_exports.object({
23047
23054
  provider: external_exports.enum(["openai", "anthropic"]).optional(),
23048
23055
  model: external_exports.string().optional(),
23049
23056
  /** System prompt: seeded as Langfuse v1, re-versioned when the app changes it. */
23050
- prompt: external_exports.string().min(1)
23057
+ prompt: external_exports.string().min(1),
23058
+ /** Recommended wiring, applied only by an admin (no `.default()` — checksum). */
23059
+ suggestedToolBindings: external_exports.array(SuggestedToolBindingSchema).optional()
23051
23060
  });
23052
23061
  var AppManifestFieldsSchema = external_exports.object({
23053
23062
  universalIdentifier: external_exports.string().uuid(),
@@ -23595,10 +23604,35 @@ function checkManifestSemantics(manifest) {
23595
23604
  errors.push(`agents: duplicate slug '${agent.slug}' \u2014 each declared agent needs its own`);
23596
23605
  }
23597
23606
  agentSlugs.add(agent.slug);
23607
+ errors.push(...checkSuggestedToolBindings(agent));
23598
23608
  }
23599
23609
  errors.push(...checkPromptsCapabilityPairing(manifest));
23600
23610
  return errors;
23601
23611
  }
23612
+ var SUGGESTED_PROVIDER_REF = /^(?:(?:mcp|app):)?[a-z][a-z0-9-]*$/;
23613
+ function checkSuggestedToolBindings(agent) {
23614
+ const errors = [];
23615
+ const seen = /* @__PURE__ */ new Set();
23616
+ for (const suggestion of agent.suggestedToolBindings ?? []) {
23617
+ const ref = suggestion.provider;
23618
+ if (ref === "builtin" || ref.startsWith("builtin:")) {
23619
+ errors.push(
23620
+ `agents.${agent.slug}.suggestedToolBindings: 'builtin' capabilities cannot be suggested`
23621
+ );
23622
+ } else if (!SUGGESTED_PROVIDER_REF.test(ref)) {
23623
+ errors.push(
23624
+ `agents.${agent.slug}.suggestedToolBindings: malformed provider ref '${ref}' \u2014 expected 'mcp:<slug>', 'app:<slug>' or a bare integration slug`
23625
+ );
23626
+ }
23627
+ if (seen.has(ref)) {
23628
+ errors.push(
23629
+ `agents.${agent.slug}.suggestedToolBindings: duplicate provider '${ref}' \u2014 the proposal is keyed by provider`
23630
+ );
23631
+ }
23632
+ seen.add(ref);
23633
+ }
23634
+ return errors;
23635
+ }
23602
23636
  function checkPromptsCapabilityPairing(manifest) {
23603
23637
  const role = manifest.role;
23604
23638
  if (!role) return [];