@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.
@@ -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 automation list` — then pass the slug of the one you mean',
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 automation versions <slug>` lists them',
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: 'automation',
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 automation run daily-digest',
259
- 'frontera automation run daily-digest --dev',
260
- 'frontera automation run daily-digest --version 7',
261
- 'frontera automation run daily-digest --no-wait',
262
- 'frontera automation run ktp-extraction --input \'{"file_path":"files/…"}\'',
263
- 'frontera automation run ktp-extraction --input @input.json',
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 automation runs ${slug} # to see how it went`,
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 automation runs ${slug} # to see how it went`,
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 automation runs ${slug}`,
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: 'automation',
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 automation runs daily-digest',
403
- 'frontera automation runs daily-digest --dev',
404
- 'frontera automation runs daily-digest <runId> --json',
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 automation dev <entry-file> # to serve one`
456
+ + ` frontera function dev <entry-file> # to serve one`
457
457
  : `No runs recorded for ${slug}.\n`
458
- + ` frontera automation run ${slug} # to start one`,
458
+ + ` frontera function run ${slug} # to start one`,
459
459
  }
460
460
  }
461
461
 
@@ -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 === noun && c.meta.verb === (verb ?? '')) ?? null
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
- automation: 'Automations — TypeScript deployed here, run on a schedule',
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 automation runs` covers automation runs',
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/automation`) is a
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