@apotech-os/cli 2.4.0 → 2.5.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 +23 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -23023,6 +23023,18 @@ var PromptDefSchema = external_exports.object({
|
|
|
23023
23023
|
template: external_exports.string(),
|
|
23024
23024
|
labels: external_exports.array(external_exports.string()).optional()
|
|
23025
23025
|
});
|
|
23026
|
+
var AgentDeclarationSchema = external_exports.object({
|
|
23027
|
+
/** Stable per platform; becomes the Langfuse prompt name `agent.platform.<slug>`. */
|
|
23028
|
+
slug: external_exports.string().regex(/^[a-z][a-z0-9-]*$/),
|
|
23029
|
+
name: external_exports.string().min(1),
|
|
23030
|
+
description: external_exports.string().optional(),
|
|
23031
|
+
/** Immutable once created — the server never updates it. */
|
|
23032
|
+
type: external_exports.enum(["chat", "classifier"]).optional(),
|
|
23033
|
+
provider: external_exports.enum(["openai", "anthropic"]).optional(),
|
|
23034
|
+
model: external_exports.string().optional(),
|
|
23035
|
+
/** System prompt: seeded as Langfuse v1, re-versioned when the app changes it. */
|
|
23036
|
+
prompt: external_exports.string().min(1)
|
|
23037
|
+
});
|
|
23026
23038
|
var AppManifestFieldsSchema = external_exports.object({
|
|
23027
23039
|
universalIdentifier: external_exports.string().uuid(),
|
|
23028
23040
|
slug: external_exports.string().regex(/^[a-z][a-z0-9-]*$/),
|
|
@@ -23097,6 +23109,10 @@ var AppManifestFieldsSchema = external_exports.object({
|
|
|
23097
23109
|
// Phase 6: declarative views
|
|
23098
23110
|
role: AppRoleSchema.optional(),
|
|
23099
23111
|
// Phase 6: scoped app token role
|
|
23112
|
+
/** Agents this app ships. Orthogonal to `role.agents`, which is the
|
|
23113
|
+
* allowlist of agents the app may INVOKE — an app can declare an agent
|
|
23114
|
+
* for a human to chat with without ever calling it itself. */
|
|
23115
|
+
agents: external_exports.array(AgentDeclarationSchema).optional(),
|
|
23100
23116
|
navigation: external_exports.array(NavItemSchema),
|
|
23101
23117
|
/** Default RBAC role granted to any member with no explicit grant on this app.
|
|
23102
23118
|
* ADMIN is intentionally excluded — an app cannot self-elevate to admin.
|
|
@@ -23559,6 +23575,13 @@ function checkManifestSemantics(manifest) {
|
|
|
23559
23575
|
if (hasAgentsCapability && !hasAgentsAllowlist) {
|
|
23560
23576
|
errors.push("role.capabilities includes 'agents' but role.agents is empty");
|
|
23561
23577
|
}
|
|
23578
|
+
const agentSlugs = /* @__PURE__ */ new Set();
|
|
23579
|
+
for (const agent of manifest.agents ?? []) {
|
|
23580
|
+
if (agentSlugs.has(agent.slug)) {
|
|
23581
|
+
errors.push(`agents: duplicate slug '${agent.slug}' \u2014 each declared agent needs its own`);
|
|
23582
|
+
}
|
|
23583
|
+
agentSlugs.add(agent.slug);
|
|
23584
|
+
}
|
|
23562
23585
|
return errors;
|
|
23563
23586
|
}
|
|
23564
23587
|
|