@frontera-sdk/cli 1.50.18 → 1.50.19
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": "@frontera-sdk/cli",
|
|
3
|
-
"version": "1.50.
|
|
3
|
+
"version": "1.50.19",
|
|
4
4
|
"description": "The frontera CLI — scaffold, pull, save and deploy Frontera apps and automations.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"frontera",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@anthropic-ai/claude-agent-sdk": "^0.3.251",
|
|
42
|
-
"@frontera-sdk/functions": "1.50.
|
|
43
|
-
"@frontera-sdk/core": "1.50.
|
|
42
|
+
"@frontera-sdk/functions": "1.50.19",
|
|
43
|
+
"@frontera-sdk/core": "1.50.19",
|
|
44
44
|
"ai": "^6.0.116",
|
|
45
45
|
"gray-matter": "^4.0.3",
|
|
46
46
|
"yaml": "^2.9.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@frontera-sdk/forge-contracts": "1.50.
|
|
49
|
+
"@frontera-sdk/forge-contracts": "1.50.19",
|
|
50
50
|
"@types/bun": "^1.3.14",
|
|
51
51
|
"typescript": "^5.9.3"
|
|
52
52
|
}
|
package/src/api/platform-api.ts
CHANGED
|
@@ -689,12 +689,7 @@ export class PlatformApi {
|
|
|
689
689
|
* chain from here is `agent apply` then `agent publish`, and both resolve a
|
|
690
690
|
* slug through `GET /config/agents/:ref`, which does see it.
|
|
691
691
|
*/
|
|
692
|
-
createAgent(body: {
|
|
693
|
-
agentId: string
|
|
694
|
-
name?: string
|
|
695
|
-
description?: string
|
|
696
|
-
kind?: 'conversation' | 'work'
|
|
697
|
-
}) {
|
|
692
|
+
createAgent(body: { agentId: string; name?: string; description?: string }) {
|
|
698
693
|
return this.client.request<unknown>('/v1/config/agents', { method: 'POST', body })
|
|
699
694
|
}
|
|
700
695
|
|
|
@@ -18,7 +18,7 @@ export interface Lookups {
|
|
|
18
18
|
/** workspace skill id → readable name. */
|
|
19
19
|
skills: Map<string, string>
|
|
20
20
|
/** Identity the snapshot's config does not carry. */
|
|
21
|
-
identity?: { id?: string; slug?: string;
|
|
21
|
+
identity?: { id?: string; slug?: string; version?: number }
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
function arr(value: unknown): Row[] {
|
|
@@ -55,7 +55,6 @@ export function renderComposition(snapshot: Row, lookups: Lookups): string {
|
|
|
55
55
|
for (const [k, v] of [
|
|
56
56
|
['slug', str(config, 'agentId') || (lookups.identity?.slug ?? '')],
|
|
57
57
|
['id', str(config, 'id') || (lookups.identity?.id ?? '')],
|
|
58
|
-
['kind', str(config, 'kind') || (lookups.identity?.kind ?? '')],
|
|
59
58
|
['status', str(config, 'lifecycleStatus')],
|
|
60
59
|
['default mode', str(config, 'defaultMode')],
|
|
61
60
|
['live version', lookups.identity?.version ? String(lookups.identity.version) : ''],
|
|
@@ -31,7 +31,7 @@ async function target(ctx: CommandContext, verb: string): Promise<{ api: Platfor
|
|
|
31
31
|
*/
|
|
32
32
|
async function buildLookups(
|
|
33
33
|
client: PlatformApi,
|
|
34
|
-
identity?: { id?: string; slug?: string
|
|
34
|
+
identity?: { id?: string; slug?: string },
|
|
35
35
|
): Promise<Lookups> {
|
|
36
36
|
const [plugins, knowledge, skills] = await Promise.all([
|
|
37
37
|
client.pluginInstalls().catch(() => [] as unknown[]),
|
|
@@ -107,12 +107,9 @@ const create: Command = {
|
|
|
107
107
|
description: 'lowercase slug every other agent command takes, e.g. claims-triage',
|
|
108
108
|
},
|
|
109
109
|
],
|
|
110
|
-
flags: { name: 'string', description: 'string'
|
|
110
|
+
flags: { name: 'string', description: 'string' },
|
|
111
111
|
summary: 'Create an agent, ready for `agent apply` and `agent publish`',
|
|
112
|
-
examples: [
|
|
113
|
-
'frontera agent create claims-triage --name "Claims Triage"',
|
|
114
|
-
'frontera agent create nightly-extract --kind work',
|
|
115
|
-
],
|
|
112
|
+
examples: ['frontera agent create claims-triage --name "Claims Triage"'],
|
|
116
113
|
},
|
|
117
114
|
async run(ctx) {
|
|
118
115
|
const slug = ctx.positional[0]
|
|
@@ -126,11 +123,6 @@ const create: Command = {
|
|
|
126
123
|
)
|
|
127
124
|
}
|
|
128
125
|
|
|
129
|
-
const kind = flagString(ctx, 'kind')
|
|
130
|
-
if (kind && kind !== 'conversation' && kind !== 'work') {
|
|
131
|
-
throw new UsageError(`unknown --kind "${kind}"`, 'conversation (default) or work')
|
|
132
|
-
}
|
|
133
|
-
|
|
134
126
|
const client = api(ctx)
|
|
135
127
|
|
|
136
128
|
// Checked before the write: the service answers a duplicate slug from deep
|
|
@@ -153,7 +145,6 @@ const create: Command = {
|
|
|
153
145
|
agentId: slug,
|
|
154
146
|
...(name ? { name } : {}),
|
|
155
147
|
...(description ? { description } : {}),
|
|
156
|
-
...(kind ? { kind: kind as 'conversation' | 'work' } : {}),
|
|
157
148
|
})) as { data?: AgentRow } | AgentRow
|
|
158
149
|
const agent = ((row as { data?: AgentRow }).data ?? row) as AgentRow
|
|
159
150
|
|
|
@@ -188,8 +179,8 @@ const list: Command = {
|
|
|
188
179
|
? 'No agents in this workspace.'
|
|
189
180
|
: // Either ID or SLUG works wherever an agent is named.
|
|
190
181
|
table(
|
|
191
|
-
['id', 'slug', '
|
|
192
|
-
rows.map((a) => [a.id ?? '?', a.agentId ?? '', a.
|
|
182
|
+
['id', 'slug', 'name'],
|
|
183
|
+
rows.map((a) => [a.id ?? '?', a.agentId ?? '', a.name ?? '']),
|
|
193
184
|
),
|
|
194
185
|
}
|
|
195
186
|
},
|
|
@@ -228,7 +219,7 @@ const get: Command = {
|
|
|
228
219
|
// knowledge, plugins and channels are the reason to read an agent.
|
|
229
220
|
// The lookups turn the snapshot's uuids into names — without them the
|
|
230
221
|
// human output is a list of identifiers nobody can act on.
|
|
231
|
-
// The snapshot's config carries neither id, slug
|
|
222
|
+
// The snapshot's config carries neither id, slug nor the published
|
|
232
223
|
// version, so the config ROW is read alongside it. Two requests for a
|
|
233
224
|
// complete picture beats one that silently omits what an agent is.
|
|
234
225
|
const [snapshot, row, lookups] = await Promise.all([
|
|
@@ -239,7 +230,6 @@ const get: Command = {
|
|
|
239
230
|
const identity = (row ?? {}) as {
|
|
240
231
|
id?: string
|
|
241
232
|
agentId?: string
|
|
242
|
-
kind?: string
|
|
243
233
|
currentVersion?: { versionNumber?: number }
|
|
244
234
|
}
|
|
245
235
|
return {
|
|
@@ -249,7 +239,6 @@ const get: Command = {
|
|
|
249
239
|
identity: {
|
|
250
240
|
id: identity.id ?? t.id,
|
|
251
241
|
slug: identity.agentId,
|
|
252
|
-
kind: identity.kind,
|
|
253
242
|
version: identity.currentVersion?.versionNumber,
|
|
254
243
|
},
|
|
255
244
|
}),
|