@m6d/cortex-cli 1.5.0 → 1.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m6d/cortex-cli",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "description": "Scaffold and operate Cortex servers",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "devDependencies": {
30
30
  "@cortex/contracts": "workspace:*",
31
- "@types/bun": "latest",
31
+ "@types/bun": "1.3.14",
32
32
  "typescript": "~5.9.3"
33
33
  },
34
34
  "publishConfig": {
@@ -130,9 +130,32 @@ export const serviceCardSchema = z.object({
130
130
 
131
131
  export const runtimeAgentConfigSchema = z.object({
132
132
  agentId: agentSlugSchema,
133
+ /**
134
+ * End-user JWT verification for this agent, managed by the agent's owner.
135
+ * Tokens must be asymmetrically signed (the JWKS URI serves the public
136
+ * keys) with a matching `iss` claim. Absent = the server's own auth
137
+ * default applies.
138
+ */
139
+ auth: z
140
+ .object({
141
+ jwksUri: z.url(),
142
+ issuer: z.string().trim().min(1).max(2048),
143
+ // Optional: when set, the token's `aud` must contain it. Guards
144
+ // against a token minted for another audience under the same
145
+ // issuer being replayed here.
146
+ audience: z.string().trim().min(1).max(2048).optional(),
147
+ })
148
+ .optional(),
133
149
  systemPrompt: z.string(),
134
150
  promptVariables: z.array(z.enum(PROMPT_VARIABLES)),
135
151
  defaultLocale: localeSchema,
152
+ /**
153
+ * Whether end users may upload files to this agent. Operational config
154
+ * like `auth`: read from the agent row, so toggling applies without
155
+ * republishing. The runtime rejects new uploads when false; existing
156
+ * attachments stay downloadable and deletable.
157
+ */
158
+ attachmentsEnabled: z.boolean(),
136
159
  metaTools: z.object({
137
160
  searchKnowledge: z.boolean(),
138
161
  searchTools: z.boolean(),
@@ -81,6 +81,14 @@ export type ClientToolBinding = {
81
81
  embedOrigin: string;
82
82
  };
83
83
 
84
+ /**
85
+ * What the server offers this agent's clients, fetched once at widget startup.
86
+ * The widget hides UI for anything absent; enforcement stays server-side.
87
+ */
88
+ export type AgentCapabilities = {
89
+ attachments: boolean;
90
+ };
91
+
84
92
  export type MessageMetadata = {
85
93
  modelId?: string;
86
94
  providerMetadata?: unknown;