@oneie/cli 4.0.4 → 4.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneie/cli",
3
- "version": "4.0.4",
3
+ "version": "4.0.5",
4
4
  "description": "ONE agent CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,10 +20,10 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "commander": "^12.0.0",
23
- "@oneie/sdk": "^0.14.11"
23
+ "@oneie/sdk": "^0.14.12"
24
24
  },
25
25
  "devDependencies": {
26
- "@oneie/evals": "workspace:*",
26
+ "@oneie/evals": "^0.1.1",
27
27
  "@types/node": "^25.6.0",
28
28
  "tsx": "^4.0.0",
29
29
  "typescript": "^5.4.0",
@@ -255,9 +255,14 @@ export async function compileNode(dir, agencySlug, opts) {
255
255
  // human bits {id,label,tags,description,[[stages]]}; the rest is derived deterministically:
256
256
  // stage.slot numeric order (the wall loads ORDER BY slot) → the stage index
257
257
  // stage.tag full namespaced tag lifecycle:<id>:<stageId> (LifecycleStage.tag)
258
- // stage.subSteps / enter_when empty / null (no sub-steps or auto-enter rule by default —
259
- // the compiler cannot express an auto-enter rule from static TOML; patch
260
- // lifecycle_stages.enter_when directly after push if you need one)
258
+ // stage.subSteps always empty — TOML has no sub-step authoring surface
259
+ // stage.enter_when optional TOML field, straight through (null when absent) — the
260
+ // C7 rule engine grammar (an exact event name or a conversion-stage
261
+ // category, e.g. "purchase"/"intent"); the compiler does not validate
262
+ // it against event-vocabulary.ts (that package isn't a CLI dependency),
263
+ // so an author who wants the stage to self-populate from real traffic
264
+ // must use a value the web app's isValidEnterWhen() accepts — a bad
265
+ // value just leaves the stage manual-only (evaluate() never matches it).
261
266
  // stage.goal / principle / band plain string fields, straight through if present
262
267
  // stage.levers parseToml has no nested array-of-tables, so a lever is one string per
263
268
  // entry in a bracket list: levers = ["page:/pricing", "agent:one"] —
@@ -280,7 +285,7 @@ export async function compileNode(dir, agencySlug, opts) {
280
285
  tag: `lifecycle:${id}:${stageId}`,
281
286
  slot: i,
282
287
  subSteps: [],
283
- enter_when: null,
288
+ enter_when: s.enter_when ? String(s.enter_when) : null,
284
289
  ...(s.goal ? { goal: String(s.goal) } : {}),
285
290
  ...(s.principle ? { principle: String(s.principle) } : {}),
286
291
  ...(s.band ? { band: String(s.band) } : {}),
package/dist/src/fn.js CHANGED
@@ -1,12 +1,9 @@
1
1
  import { Command } from 'commander';
2
2
  import { FN_MAP, FN_MAP_VERSION } from '@oneie/sdk/generated/fn-map';
3
+ // The allowlist is ONE source (`@oneie/sdk/fn-allowlist`) shared by web, MCP, CLI
4
+ // and channels — never a literal copied per surface.
5
+ import { FN_ALLOWLIST, isAllowedFn } from '@oneie/sdk/fn-allowlist';
3
6
  const DEFAULT_API = process.env.ONEIE_BASE_URL ?? process.env.ONE_API_URL ?? 'https://api.one.ie';
4
- const ALLOWLIST = new Set([
5
- 'actionable_hypotheses', 'active_frontiers', 'active_objectives',
6
- 'actor_classification', 'actors_by_kind', 'actors_by_tag', 'actors_for',
7
- 'attractive_tasks', 'blocked_tasks', 'cheapest_provider', 'exploratory_tasks',
8
- 'highways', 'optimal_route', 'promising_frontiers', 'suggest_route', 'total_contribution',
9
- ]);
10
7
  function apiKey() {
11
8
  return process.env.ONEIE_API_KEY ?? process.env.ONE_API_KEY ?? '';
12
9
  }
@@ -32,7 +29,7 @@ export function fnCmd() {
32
29
  .command('list')
33
30
  .description('List all allowlisted functions')
34
31
  .action(() => {
35
- const rows = Array.from(ALLOWLIST).map((name) => {
32
+ const rows = FN_ALLOWLIST.map((name) => {
36
33
  const entry = FN_MAP[name];
37
34
  const params = entry?.params.map((p) => p.name).join(', ') ?? '';
38
35
  return ` ${name.padEnd(28)}${params ? `(${params})` : '()'} → ${entry?.returnKind ?? '?'}`;
@@ -46,7 +43,7 @@ export function fnCmd() {
46
43
  .option('--workspace <slug>', 'Workspace slug')
47
44
  .option('--api <url>', 'API base URL', DEFAULT_API)
48
45
  .action(async (name, opts) => {
49
- if (!ALLOWLIST.has(name)) {
46
+ if (!isAllowedFn(name)) {
50
47
  process.stderr.write(`error: '${name}' is not in the allowlist. Run 'one fn list' to see available functions.\n`);
51
48
  process.exit(1);
52
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneie/cli",
3
- "version": "4.0.4",
3
+ "version": "4.0.5",
4
4
  "description": "ONE agent CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,10 +20,10 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "commander": "^12.0.0",
23
- "@oneie/sdk": "^0.14.11"
23
+ "@oneie/sdk": "^0.14.12"
24
24
  },
25
25
  "devDependencies": {
26
- "@oneie/evals": "workspace:*",
26
+ "@oneie/evals": "^0.1.1",
27
27
  "@types/node": "^25.6.0",
28
28
  "tsx": "^4.0.0",
29
29
  "typescript": "^5.4.0",