@frontera-sdk/cli 1.49.0 → 1.50.1
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 +4 -4
- package/src/api/automation-api.ts +24 -24
- package/src/automation-template.ts +8 -8
- package/src/commands/automation/bindings.ts +11 -11
- package/src/commands/automation/dev.ts +8 -8
- package/src/commands/automation/index-commands.ts +20 -20
- package/src/commands/automation/init.ts +4 -4
- package/src/commands/automation/pull.ts +8 -8
- package/src/commands/automation/run.ts +18 -18
- package/src/commands/registry.ts +15 -3
- package/src/heal.ts +1 -1
- package/src/vendor/kit-assets.json +6 -6
- package/src/vendor/sdk-sources.json +15 -15
|
@@ -68,7 +68,7 @@ function requireSlug(ctx: CommandContext): string {
|
|
|
68
68
|
if (!slug) {
|
|
69
69
|
throw new UsageError(
|
|
70
70
|
'missing <slug>',
|
|
71
|
-
'run `frontera
|
|
71
|
+
'run `frontera function list` — then pass the slug of the one you mean',
|
|
72
72
|
)
|
|
73
73
|
}
|
|
74
74
|
return slug
|
|
@@ -130,7 +130,7 @@ export function parseVersionFlag(ctx: CommandContext): number | undefined {
|
|
|
130
130
|
if (!Number.isInteger(parsed) || parsed < 1) {
|
|
131
131
|
throw new UsageError(
|
|
132
132
|
`"${raw}" is not a version number`,
|
|
133
|
-
'versions are whole numbers from 1 — `frontera
|
|
133
|
+
'versions are whole numbers from 1 — `frontera function versions <slug>` lists them',
|
|
134
134
|
)
|
|
135
135
|
}
|
|
136
136
|
return parsed
|
|
@@ -249,18 +249,18 @@ export function describeRun(run: AutomationRunSummary, steps: AutomationRunStep[
|
|
|
249
249
|
*/
|
|
250
250
|
export const automationRun: Command = {
|
|
251
251
|
meta: {
|
|
252
|
-
noun: '
|
|
252
|
+
noun: 'function',
|
|
253
253
|
verb: 'run',
|
|
254
254
|
args: [{ name: 'slug', required: true, description: 'automation slug' }],
|
|
255
255
|
flags: { 'no-wait': 'boolean', version: 'string', dev: 'boolean', input: 'string' },
|
|
256
256
|
summary: 'Run the live version now — or a named one, or the dev session — and report what it did',
|
|
257
257
|
examples: [
|
|
258
|
-
'frontera
|
|
259
|
-
'frontera
|
|
260
|
-
'frontera
|
|
261
|
-
'frontera
|
|
262
|
-
'frontera
|
|
263
|
-
'frontera
|
|
258
|
+
'frontera function run daily-digest',
|
|
259
|
+
'frontera function run daily-digest --dev',
|
|
260
|
+
'frontera function run daily-digest --version 7',
|
|
261
|
+
'frontera function run daily-digest --no-wait',
|
|
262
|
+
'frontera function run ktp-extraction --input \'{"file_path":"files/…"}\'',
|
|
263
|
+
'frontera function run ktp-extraction --input @input.json',
|
|
264
264
|
],
|
|
265
265
|
},
|
|
266
266
|
|
|
@@ -297,7 +297,7 @@ export const automationRun: Command = {
|
|
|
297
297
|
return {
|
|
298
298
|
data: queued,
|
|
299
299
|
text: `Queued a dev run of ${slug}.\n`
|
|
300
|
-
+ ` frontera
|
|
300
|
+
+ ` frontera function runs ${slug} # to see how it went`,
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
const seen = await waitForRun(client, slug, priorId, 'dev')
|
|
@@ -344,7 +344,7 @@ export const automationRun: Command = {
|
|
|
344
344
|
return {
|
|
345
345
|
data: queued,
|
|
346
346
|
text: `Queued a run of ${slug} v${queued.version}.\n`
|
|
347
|
-
+ ` frontera
|
|
347
|
+
+ ` frontera function runs ${slug} # to see how it went`,
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
|
|
@@ -377,7 +377,7 @@ export const automationRun: Command = {
|
|
|
377
377
|
+ 'so either no runner is polling or it has not picked the event up',
|
|
378
378
|
{
|
|
379
379
|
code: 'REQUEST_FAILED',
|
|
380
|
-
hint: `frontera
|
|
380
|
+
hint: `frontera function runs ${slug}`,
|
|
381
381
|
},
|
|
382
382
|
)
|
|
383
383
|
},
|
|
@@ -386,7 +386,7 @@ export const automationRun: Command = {
|
|
|
386
386
|
/** Recent runs, newest first — the pull-visibility half of "did it work". */
|
|
387
387
|
export const automationRuns: Command = {
|
|
388
388
|
meta: {
|
|
389
|
-
noun: '
|
|
389
|
+
noun: 'function',
|
|
390
390
|
verb: 'runs',
|
|
391
391
|
args: [
|
|
392
392
|
{ name: 'slug', required: true, description: 'automation slug' },
|
|
@@ -399,9 +399,9 @@ export const automationRuns: Command = {
|
|
|
399
399
|
flags: { dev: 'boolean' },
|
|
400
400
|
summary: 'List recent runs, newest first — or open one run and its steps',
|
|
401
401
|
examples: [
|
|
402
|
-
'frontera
|
|
403
|
-
'frontera
|
|
404
|
-
'frontera
|
|
402
|
+
'frontera function runs daily-digest',
|
|
403
|
+
'frontera function runs daily-digest --dev',
|
|
404
|
+
'frontera function runs daily-digest <runId> --json',
|
|
405
405
|
],
|
|
406
406
|
},
|
|
407
407
|
|
|
@@ -453,9 +453,9 @@ export const automationRuns: Command = {
|
|
|
453
453
|
data: rows,
|
|
454
454
|
text: dev
|
|
455
455
|
? `No dev runs recorded for ${slug}.\n`
|
|
456
|
-
+ ` frontera
|
|
456
|
+
+ ` frontera function dev <entry-file> # to serve one`
|
|
457
457
|
: `No runs recorded for ${slug}.\n`
|
|
458
|
-
+ ` frontera
|
|
458
|
+
+ ` frontera function run ${slug} # to start one`,
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
|
package/src/commands/registry.ts
CHANGED
|
@@ -117,9 +117,21 @@ export const COMMANDS: readonly Command[] = [
|
|
|
117
117
|
...actionCommands,
|
|
118
118
|
]
|
|
119
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Nouns that still resolve under an old name.
|
|
122
|
+
*
|
|
123
|
+
* `frontera function …` is what every runbook, README and installed shell
|
|
124
|
+
* history says, and a CLI is not something a customer upgrades on our schedule.
|
|
125
|
+
* The commands carry `noun: 'function'` and `nouns()` lists only that, so help
|
|
126
|
+
* advertises one name while the other keeps working. Phase 10 of the rename
|
|
127
|
+
* drops this map.
|
|
128
|
+
*/
|
|
129
|
+
const NOUN_ALIASES: Record<string, string> = { automation: 'function' }
|
|
130
|
+
|
|
120
131
|
export function findCommand(noun: string, verb: string | undefined): Command | null {
|
|
132
|
+
const resolved = NOUN_ALIASES[noun] ?? noun
|
|
121
133
|
return (
|
|
122
|
-
COMMANDS.find((c) => c.meta.noun ===
|
|
134
|
+
COMMANDS.find((c) => c.meta.noun === resolved && c.meta.verb === (verb ?? '')) ?? null
|
|
123
135
|
)
|
|
124
136
|
}
|
|
125
137
|
|
|
@@ -144,7 +156,7 @@ const NOUN_SUMMARY: Readonly<Record<string, string>> = {
|
|
|
144
156
|
knowledge: 'Knowledge bases and the sources inside them',
|
|
145
157
|
pack: 'Reusable skill bundles — author once, install per workspace',
|
|
146
158
|
secret: 'Workspace secrets — named here, never printed back',
|
|
147
|
-
|
|
159
|
+
function: 'Functions — TypeScript deployed here, run on a schedule',
|
|
148
160
|
blueprint: 'The shared model of the organization — what an app can read',
|
|
149
161
|
action: 'Governed Actions — arm the write path a published Action runs',
|
|
150
162
|
capability: 'What an agent may DO — plugin operations granted to it',
|
|
@@ -184,7 +196,7 @@ export const UNSUPPORTED: Readonly<Record<string, string>> = {
|
|
|
184
196
|
key: 'API keys are minted in the Console, never by the CLI — a credential that mints credentials '
|
|
185
197
|
+ 'is the escalation that separation exists to prevent',
|
|
186
198
|
sheet: 'sheets have no CLI surface and none is planned',
|
|
187
|
-
task: 'task and run history is Console-only; `frontera
|
|
199
|
+
task: 'task and run history is Console-only; `frontera function runs` covers function runs',
|
|
188
200
|
eval: 'the evaluation suite (datasets, scorers, judges, queues) is Console-only',
|
|
189
201
|
usage: 'usage, cost and audit reporting is Console-only',
|
|
190
202
|
site: 'published sites are managed in the Console; `frontera app` covers Frontera Apps',
|
package/src/heal.ts
CHANGED
|
@@ -155,7 +155,7 @@ export function healProject(dir: string): HealResult {
|
|
|
155
155
|
// are.
|
|
156
156
|
//
|
|
157
157
|
// The CLI is genuinely not a build input: it lives on PATH, and an app
|
|
158
|
-
// never imports it. Anything else here (`@frontera-sdk/
|
|
158
|
+
// never imports it. Anything else here (`@frontera-sdk/functions`) is a
|
|
159
159
|
// real package that this app may well import, and dropping it trades a
|
|
160
160
|
// failing `bun install` for a failing `bun run build`. Rewriting it to a
|
|
161
161
|
// version range is the actual repair and is not available yet — nothing
|