@xanots/sdk 0.0.5 → 0.0.6

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +3 -3
  3. package/dist/.build-fingerprint +1 -1
  4. package/dist/{agent-file-refresh-IJ7GN2FJ.js → agent-file-refresh-6XT23SLU.js} +4 -4
  5. package/dist/bin.js +8 -8
  6. package/dist/branch-commands-R4FR75UW.js +134 -0
  7. package/dist/{chunk-7SISR3CS.js → chunk-2SUCC4DV.js} +2 -2
  8. package/dist/{chunk-BPEEGJJA.js → chunk-3FQD3QME.js} +3 -3
  9. package/dist/{chunk-KXCPZUUM.js → chunk-4HDOP7LH.js} +8 -67
  10. package/dist/{chunk-PGBK64U5.js → chunk-4PTSTDIG.js} +2 -2
  11. package/dist/{live-diff-FP4SFNT4.js → chunk-5HCDZ2XN.js} +67 -6
  12. package/dist/{chunk-5WGEURVI.js → chunk-6AAT2AYQ.js} +21 -1
  13. package/dist/{chunk-APOR6TCV.js → chunk-CEFYM6N5.js} +2 -2
  14. package/dist/{chunk-YUPQOLFX.js → chunk-CQBJNFDK.js} +2 -2
  15. package/dist/{chunk-FN4OQT2J.js → chunk-CU5VOSTW.js} +4 -4
  16. package/dist/{chunk-YUBJLB6G.js → chunk-EFH4NFPY.js} +6 -3
  17. package/dist/chunk-EQW3YT5U.js +159 -0
  18. package/dist/{chunk-CYJ7R3AD.js → chunk-GC7ZQHW7.js} +22 -10
  19. package/dist/{chunk-IVP6TS26.js → chunk-JQLR64UC.js} +6 -5
  20. package/dist/{chunk-PXXLBXOP.js → chunk-JRGDLAEA.js} +2 -2
  21. package/dist/{chunk-WGDAOOXG.js → chunk-MU3O43L2.js} +3 -3
  22. package/dist/{chunk-F5T45NAM.js → chunk-OKNSR7MT.js} +45 -2
  23. package/dist/{chunk-MFIHIS6B.js → chunk-OLQLJY5T.js} +2 -2
  24. package/dist/{chunk-QUUB7HYK.js → chunk-P5C2YKAM.js} +2 -2
  25. package/dist/{chunk-D6OGU2AI.js → chunk-P5OAM3G2.js} +2 -2
  26. package/dist/{chunk-6DHJVLYP.js → chunk-Q77KNEUL.js} +1 -1
  27. package/dist/{chunk-QA5ICJ4M.js → chunk-QVSUMHNN.js} +3 -3
  28. package/dist/{chunk-MS3BRZAZ.js → chunk-SOCYCBYG.js} +45 -22
  29. package/dist/{chunk-OARSPAIE.js → chunk-TYBB7ON3.js} +56 -36
  30. package/dist/{chunk-ZGA5MUNC.js → chunk-Y7BARS25.js} +2 -2
  31. package/dist/cli.d.ts +28 -2
  32. package/dist/cli.js +7 -7
  33. package/dist/{codegen-command-BLOS3GR3.js → codegen-command-6XXOIQ25.js} +16 -16
  34. package/dist/{completion-GHP5RRLQ.js → completion-A6BZ3XGU.js} +8 -7
  35. package/dist/{deploy-command-XOH76USO.js → deploy-command-MTQQXPOO.js} +12 -12
  36. package/dist/{env-target-POGJMD6Q.js → env-target-C5JFLDK3.js} +2 -2
  37. package/dist/{ephemeral-command-46SL27GJ.js → ephemeral-command-K3UJSDS4.js} +5 -5
  38. package/dist/index.d.ts +67 -24
  39. package/dist/index.js +6 -6
  40. package/dist/init-command-AY4KSXR5.js +30 -0
  41. package/dist/internal.js +13 -11
  42. package/dist/{io-7VIA5SON.js → io-65CJNLYI.js} +3 -3
  43. package/dist/live-diff-QK4KC2FJ.js +12 -0
  44. package/dist/{lock-KXOJIGCG.js → lock-PDFCNYUW.js} +2 -2
  45. package/dist/{lock-commands-6UONZW26.js → lock-commands-MC6I3MZA.js} +8 -8
  46. package/dist/{login-command-SG7IWTHW.js → login-command-LCOOOPO2.js} +4 -4
  47. package/dist/{marketplace-command-NKTQ3VPS.js → marketplace-command-BCOAAN2I.js} +3 -3
  48. package/dist/{meta-client-OW5WKWW7.js → meta-client-57ZWVHST.js} +2 -2
  49. package/dist/node.js +10 -10
  50. package/dist/{release-command-FKQ6E3TD.js → release-command-V4K4IORX.js} +191 -23
  51. package/dist/scaffold.d.ts +10 -13
  52. package/dist/scaffold.js +3 -3
  53. package/dist/{test-command-56IAEYHX.js → test-command-OEBIGOPP.js} +4 -4
  54. package/dist/{upgrade-command-M2DZ3ZPD.js → upgrade-command-52AAZ3NV.js} +13 -13
  55. package/dist/{validate-command-CIBQJND7.js → validate-command-KTLPSSH7.js} +10 -10
  56. package/dist/{workspace-command-HZS43PHJ.js → workspace-command-LX5S5N2H.js} +20 -16
  57. package/guides/scaffold.md +3 -2
  58. package/llms/statements-calls.md +1 -1
  59. package/llms/statements-data.md +2 -1
  60. package/llms-full.txt +4 -3
  61. package/llms.txt +1 -1
  62. package/manifest.json +1 -1
  63. package/package.json +1 -1
  64. package/dist/init-command-NCRPVFGE.js +0 -30
@@ -27,15 +27,15 @@ import {
27
27
  resolveFrontendPreset,
28
28
  resolveThemeChoice,
29
29
  sanitizeAppName
30
- } from "./chunk-KXCPZUUM.js";
30
+ } from "./chunk-4HDOP7LH.js";
31
31
  import {
32
32
  XANO_DIR,
33
33
  resolveAiPresets,
34
34
  scaffoldProject
35
- } from "./chunk-7SISR3CS.js";
35
+ } from "./chunk-2SUCC4DV.js";
36
36
  import {
37
37
  TEST_EXPECT_TYPES
38
- } from "./chunk-PXXLBXOP.js";
38
+ } from "./chunk-JRGDLAEA.js";
39
39
  import {
40
40
  raw
41
41
  } from "./chunk-LU7TRWMC.js";
@@ -44,7 +44,7 @@ import {
44
44
  describeOrigin,
45
45
  renderCodegenMarker,
46
46
  renderCodegenReadme
47
- } from "./chunk-QUUB7HYK.js";
47
+ } from "./chunk-P5C2YKAM.js";
48
48
  import {
49
49
  FIELD_METHODS,
50
50
  STATEMENT_SURFACES,
@@ -67,14 +67,14 @@ import {
67
67
  searchConstrainsRows,
68
68
  tableTrigger,
69
69
  workspaceTrigger
70
- } from "./chunk-CYJ7R3AD.js";
70
+ } from "./chunk-GC7ZQHW7.js";
71
71
  import {
72
72
  loadDefault,
73
73
  readVersion
74
- } from "./chunk-MS3BRZAZ.js";
74
+ } from "./chunk-SOCYCBYG.js";
75
75
  import {
76
76
  UsageError
77
- } from "./chunk-IVP6TS26.js";
77
+ } from "./chunk-JQLR64UC.js";
78
78
  import {
79
79
  blank,
80
80
  detail,
@@ -115,7 +115,7 @@ import {
115
115
  sys,
116
116
  toolset,
117
117
  withFilters
118
- } from "./chunk-YUPQOLFX.js";
118
+ } from "./chunk-CQBJNFDK.js";
119
119
  import {
120
120
  parsePathParams,
121
121
  unboundPathParams
@@ -130,7 +130,7 @@ import {
130
130
  } from "./chunk-5XZ744TS.js";
131
131
  import {
132
132
  REFERENCEABLE_KIND_PAYLOAD_KEYS
133
- } from "./chunk-YUBJLB6G.js";
133
+ } from "./chunk-EFH4NFPY.js";
134
134
 
135
135
  // src/emit/codegen-command.ts
136
136
  import { existsSync, readFileSync, writeFileSync } from "fs";
@@ -2732,10 +2732,7 @@ function callDecoder(shape) {
2732
2732
  shape.path
2733
2733
  );
2734
2734
  }
2735
- const target = unbound ? lit(null) : shape.external ? obj2([
2736
- ["name", lit("")],
2737
- ["guid", lit(guid)]
2738
- ]) : resolveReference(a.ctx, a.refs, guid, { ...a.resolve, unresolved: "object-ref" });
2735
+ const target = unbound ? lit(null) : resolveReference(a.ctx, a.refs, guid, { ...a.resolve, unresolved: "object-ref" });
2739
2736
  const entries = [[shape.arg, target]];
2740
2737
  const runtime = {
2741
2738
  [shape.arg]: unbound ? null : { name: "", guid }
@@ -2845,11 +2842,7 @@ var CALL_DECODERS = /* @__PURE__ */ new Map([
2845
2842
  "mvp:workspace_run_middleware",
2846
2843
  callDecoder({ path: "middleware.call", arg: "middleware", idPath: "id" })
2847
2844
  ],
2848
- ["mvp:workspace_run_addon", callDecoder({ path: "addon.call", arg: "addon", idPath: "id" })],
2849
- [
2850
- "mvp:action",
2851
- callDecoder({ path: "action.call", arg: "action", idPath: "run_version.id", external: true })
2852
- ]
2845
+ ["mvp:workspace_run_addon", callDecoder({ path: "addon.call", arg: "addon", idPath: "id" })]
2853
2846
  ]);
2854
2847
 
2855
2848
  // src/codegen/specials/db.ts
@@ -4032,26 +4025,52 @@ function callInput2(a) {
4032
4025
  }
4033
4026
  return { expr: obj2(cells), runtime };
4034
4027
  }
4028
+ function registryInput(a) {
4029
+ const list = a.stored.settings_registry;
4030
+ return callInput2({ ...a, stored: { ...a.stored, input: Array.isArray(list) ? list : [] } });
4031
+ }
4032
+ function withCallBindings(a, entries, runtime) {
4033
+ for (const [key2, read] of [
4034
+ ["input", callInput2],
4035
+ ["registry", registryInput]
4036
+ ]) {
4037
+ const decoded = read(a);
4038
+ if (!decoded) return false;
4039
+ if (Object.keys(decoded.runtime).length > 0) {
4040
+ entries.push([key2, decoded.expr]);
4041
+ runtime[key2] = decoded.runtime;
4042
+ }
4043
+ }
4044
+ return true;
4045
+ }
4046
+ var actionCall = (a) => {
4047
+ const context = a.stored.context ?? {};
4048
+ const id2 = getPath2(context, "run_version.id");
4049
+ if (typeof id2 !== "string" || id2 === "")
4050
+ return declineHere("action.call: context.run_version.id is blank");
4051
+ const entries = [["actionId", lit(id2)]];
4052
+ const runtime = { actionId: id2 };
4053
+ withAs(a, entries, runtime);
4054
+ if (!withCallBindings(a, entries, runtime)) return null;
4055
+ return prove(a.ctx, a.stored, "action.call", [runtime], [obj2(entries)]);
4056
+ };
4035
4057
  var actionPackageCall = (a) => {
4036
4058
  const context = a.stored.context ?? {};
4037
- if (getPath2(context, "action.trace_id") !== "" || getPath2(context, "package_version.id") !== "")
4038
- return declineHere("action.package.call: statement carries a marketplace identity");
4039
- const slug = getPath2(context, "package.slug");
4040
- if (typeof slug !== "string")
4041
- return declineHere("action.package.call: context.package.slug is not a string");
4042
- const entries = [["action", lit("")]];
4043
- const runtime = { action: "" };
4044
- if (slug !== "") {
4045
- entries.push(["package", lit(slug)]);
4046
- runtime.package = slug;
4047
- }
4048
- const input2 = callInput2(a);
4049
- if (!input2) return null;
4050
- if (Object.keys(input2.runtime).length > 0) {
4051
- entries.push(["input", input2.expr]);
4052
- runtime.input = input2.runtime;
4059
+ const parts = {
4060
+ traceId: getPath2(context, "action.trace_id"),
4061
+ versionId: getPath2(context, "package_version.id"),
4062
+ slug: getPath2(context, "package.slug")
4063
+ };
4064
+ const entries = [];
4065
+ const runtime = {};
4066
+ for (const [arg, value] of Object.entries(parts)) {
4067
+ if (typeof value !== "string" || value === "")
4068
+ return declineHere(`action.package.call: context identity part \`${arg}\` is blank`);
4069
+ entries.push([arg, lit(value)]);
4070
+ runtime[arg] = value;
4053
4071
  }
4054
4072
  withAs(a, entries, runtime);
4073
+ if (!withCallBindings(a, entries, runtime)) return null;
4055
4074
  return prove(a.ctx, a.stored, "action.package.call", [runtime], [obj2(entries)]);
4056
4075
  };
4057
4076
  var workflowTestCall = (a) => {
@@ -4165,6 +4184,7 @@ var MISC_DECODERS = /* @__PURE__ */ new Map([
4165
4184
  ["mvp:realtime_publish", realtimePublish],
4166
4185
  ["mvp:create_auth", createAuthToken],
4167
4186
  ["mvp:guid", createGuid],
4187
+ ["mvp:action", actionCall],
4168
4188
  ["mvp:action_package", actionPackageCall],
4169
4189
  ["mvp:workspace_run_workflow_test", workflowTestCall]
4170
4190
  ]);
@@ -6745,7 +6765,7 @@ async function fetchBundle(args, source) {
6745
6765
  );
6746
6766
  }
6747
6767
  const auth3 = await getAccessToken(args);
6748
- const { resolveLive, fetchEphemeralBundle } = await import("./ephemeral-command-46SL27GJ.js");
6768
+ const { resolveLive, fetchEphemeralBundle } = await import("./ephemeral-command-K3UJSDS4.js");
6749
6769
  const summary = await resolveLive(auth3, auth3.workspaceId, name);
6750
6770
  step(`Reading ephemeral "${name}"`);
6751
6771
  return {
@@ -7014,4 +7034,4 @@ export {
7014
7034
  verifyCrashEntry,
7015
7035
  blameGeneratedFile
7016
7036
  };
7017
- //# sourceMappingURL=chunk-OARSPAIE.js.map
7037
+ //# sourceMappingURL=chunk-TYBB7ON3.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readVersion
3
- } from "./chunk-MS3BRZAZ.js";
3
+ } from "./chunk-SOCYCBYG.js";
4
4
  import {
5
5
  atomicWrite
6
6
  } from "./chunk-GNPVYOPB.js";
@@ -170,4 +170,4 @@ export {
170
170
  upgradeCommand,
171
171
  maybeNotifyUpdate
172
172
  };
173
- //# sourceMappingURL=chunk-ZGA5MUNC.js.map
173
+ //# sourceMappingURL=chunk-Y7BARS25.js.map
package/dist/cli.d.ts CHANGED
@@ -190,8 +190,8 @@ interface ParsedArgs {
190
190
  /**
191
191
  * `init`/`codegen` `--theme <id>`: the shadcn/ui palette to render into the
192
192
  * scaffold's stylesheet — a `<base>` or `<base>-<accent>` pair, a registry
193
- * theme URL, or a path to a registry item JSON file. Undefined = prompt in a
194
- * TTY, else plain shadcn. Validated in `theme-presets.ts`, not at parse time.
193
+ * theme URL, or a path to a registry item JSON file. Undefined = plain
194
+ * shadcn. Validated in `theme-presets.ts`, not at parse time.
195
195
  */
196
196
  theme: string | undefined;
197
197
  /** `init`/`codegen` `--radius <len>`: corner radius override, bare number = rem. */
@@ -274,6 +274,32 @@ interface ParsedArgs {
274
274
  * Named rather than implicit so it can never be reached by accident.
275
275
  */
276
276
  replace: boolean;
277
+ /**
278
+ * `release --branch <label>`: land on this branch instead of the live one.
279
+ *
280
+ * The staging boundary for a workspace that has no second workspace. Branches
281
+ * scope LOGIC only — see {@link allowSharedSchemaChanges}.
282
+ */
283
+ branch: string | undefined;
284
+ /**
285
+ * `release --branch <label> --set-live`: promote the branch the moment the
286
+ * import lands, in the same call.
287
+ */
288
+ setLive: boolean;
289
+ /**
290
+ * `release --branch <label> --allow-shared-schema-changes`: proceed even
291
+ * though the bundle changes tables or microservices.
292
+ *
293
+ * Those carry no branch dimension, so they reach PRODUCTION whichever branch
294
+ * is targeted. A separate flag rather than a prompt, because the failure mode
295
+ * is not knowing — and `--yes` in CI answers a prompt without reading it.
296
+ */
297
+ allowSharedSchemaChanges: boolean;
298
+ /**
299
+ * `release --backup-branch[=<label>]`: clone the live branch before importing,
300
+ * so a bad promote is one `set-live` away from being undone.
301
+ */
302
+ backupBranch: string | boolean | undefined;
277
303
  /**
278
304
  * `--json`: force the machine-readable JSON on stdout even at a terminal.
279
305
  * Absent, the format is inferred from stdout being a TTY. Read through
package/dist/cli.js CHANGED
@@ -8,17 +8,17 @@ import {
8
8
  resolveHelpRequest,
9
9
  resolveLockPath,
10
10
  run
11
- } from "./chunk-MS3BRZAZ.js";
12
- import "./chunk-IVP6TS26.js";
13
- import "./chunk-MFIHIS6B.js";
11
+ } from "./chunk-SOCYCBYG.js";
12
+ import "./chunk-JQLR64UC.js";
13
+ import "./chunk-OLQLJY5T.js";
14
14
  import "./chunk-GNPVYOPB.js";
15
15
  import "./chunk-EZG76F7R.js";
16
- import "./chunk-BPEEGJJA.js";
17
- import "./chunk-F5T45NAM.js";
18
- import "./chunk-YUPQOLFX.js";
16
+ import "./chunk-3FQD3QME.js";
17
+ import "./chunk-OKNSR7MT.js";
18
+ import "./chunk-CQBJNFDK.js";
19
19
  import "./chunk-WHOJWOSV.js";
20
20
  import "./chunk-5XZ744TS.js";
21
- import "./chunk-YUBJLB6G.js";
21
+ import "./chunk-EFH4NFPY.js";
22
22
  export {
23
23
  compileBundle,
24
24
  exportBundleJson,
@@ -4,35 +4,35 @@ import {
4
4
  isMissingDependencyError,
5
5
  runCodegenCommand,
6
6
  verifyCrashEntry
7
- } from "./chunk-OARSPAIE.js";
7
+ } from "./chunk-TYBB7ON3.js";
8
8
  import "./chunk-ZOYMZZ3S.js";
9
9
  import "./chunk-SG4UBJ47.js";
10
10
  import "./chunk-LLWK6H77.js";
11
11
  import "./chunk-QTNO2WD6.js";
12
12
  import "./chunk-ZUTSMMAG.js";
13
13
  import "./chunk-X4DVXBFY.js";
14
- import "./chunk-KXCPZUUM.js";
15
- import "./chunk-7SISR3CS.js";
14
+ import "./chunk-4HDOP7LH.js";
15
+ import "./chunk-2SUCC4DV.js";
16
16
  import "./chunk-ZSYZTGJH.js";
17
17
  import "./chunk-3IGNIP6R.js";
18
- import "./chunk-PXXLBXOP.js";
18
+ import "./chunk-JRGDLAEA.js";
19
19
  import "./chunk-LU7TRWMC.js";
20
- import "./chunk-WGDAOOXG.js";
21
- import "./chunk-QUUB7HYK.js";
22
- import "./chunk-6DHJVLYP.js";
20
+ import "./chunk-MU3O43L2.js";
21
+ import "./chunk-P5C2YKAM.js";
22
+ import "./chunk-Q77KNEUL.js";
23
23
  import "./chunk-4BXJGVZ3.js";
24
- import "./chunk-CYJ7R3AD.js";
25
- import "./chunk-MS3BRZAZ.js";
26
- import "./chunk-IVP6TS26.js";
27
- import "./chunk-MFIHIS6B.js";
24
+ import "./chunk-GC7ZQHW7.js";
25
+ import "./chunk-SOCYCBYG.js";
26
+ import "./chunk-JQLR64UC.js";
27
+ import "./chunk-OLQLJY5T.js";
28
28
  import "./chunk-GNPVYOPB.js";
29
29
  import "./chunk-EZG76F7R.js";
30
- import "./chunk-BPEEGJJA.js";
31
- import "./chunk-F5T45NAM.js";
32
- import "./chunk-YUPQOLFX.js";
30
+ import "./chunk-3FQD3QME.js";
31
+ import "./chunk-OKNSR7MT.js";
32
+ import "./chunk-CQBJNFDK.js";
33
33
  import "./chunk-WHOJWOSV.js";
34
34
  import "./chunk-5XZ744TS.js";
35
- import "./chunk-YUBJLB6G.js";
35
+ import "./chunk-EFH4NFPY.js";
36
36
  export {
37
37
  blameGeneratedFile,
38
38
  fetchWorkspaceBundle,
@@ -40,4 +40,4 @@ export {
40
40
  runCodegenCommand,
41
41
  verifyCrashEntry
42
42
  };
43
- //# sourceMappingURL=codegen-command-BLOS3GR3.js.map
43
+ //# sourceMappingURL=codegen-command-6XXOIQ25.js.map
@@ -4,8 +4,9 @@ import {
4
4
  flagValues,
5
5
  getCommand,
6
6
  liveCommandNames,
7
- liveSubcommandNames
8
- } from "./chunk-F5T45NAM.js";
7
+ liveSubcommandNames,
8
+ visibleFlags
9
+ } from "./chunk-OKNSR7MT.js";
9
10
 
10
11
  // src/emit/completion.ts
11
12
  var COMPLETION_SHELLS = ["bash", "zsh", "fish"];
@@ -46,19 +47,19 @@ function scopes() {
46
47
  const spec = getCommand(name);
47
48
  out.push({
48
49
  key: name,
49
- flags: tokensFor(spec.flags),
50
+ flags: tokensFor(visibleFlags(spec)),
50
51
  paths: wantsPaths(spec.args),
51
52
  values: argValues(spec.args),
52
- valued: valuedFlags(spec.flags)
53
+ valued: valuedFlags(visibleFlags(spec))
53
54
  });
54
55
  for (const verb of liveSubcommandNames(name)) {
55
56
  const sub = spec.subcommands[verb];
56
57
  out.push({
57
58
  key: `${name} ${verb}`,
58
- flags: tokensFor(sub.flags),
59
+ flags: tokensFor(visibleFlags(sub)),
59
60
  paths: wantsPaths(sub.args),
60
61
  values: argValues(sub.args),
61
- valued: valuedFlags(sub.flags)
62
+ valued: valuedFlags(visibleFlags(sub))
62
63
  });
63
64
  }
64
65
  }
@@ -295,4 +296,4 @@ export {
295
296
  renderCompletion,
296
297
  runCompletionCommand
297
298
  };
298
- //# sourceMappingURL=completion-GHP5RRLQ.js.map
299
+ //# sourceMappingURL=completion-A6BZ3XGU.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  importWorkspaceArchive
3
- } from "./chunk-5WGEURVI.js";
3
+ } from "./chunk-6AAT2AYQ.js";
4
4
  import {
5
5
  assertBundleInput,
6
6
  loadBundleText
7
- } from "./chunk-QA5ICJ4M.js";
7
+ } from "./chunk-QVSUMHNN.js";
8
8
  import {
9
9
  createEphemeral,
10
10
  getEphemeral,
@@ -42,11 +42,11 @@ import {
42
42
  fetchOrExplain,
43
43
  httpFailure
44
44
  } from "./chunk-3IGNIP6R.js";
45
- import "./chunk-MS3BRZAZ.js";
45
+ import "./chunk-SOCYCBYG.js";
46
46
  import {
47
47
  assertWritableDest
48
- } from "./chunk-IVP6TS26.js";
49
- import "./chunk-MFIHIS6B.js";
48
+ } from "./chunk-JQLR64UC.js";
49
+ import "./chunk-OLQLJY5T.js";
50
50
  import "./chunk-GNPVYOPB.js";
51
51
  import {
52
52
  blank,
@@ -62,12 +62,12 @@ import {
62
62
  warn,
63
63
  withSpinner
64
64
  } from "./chunk-EZG76F7R.js";
65
- import "./chunk-BPEEGJJA.js";
66
- import "./chunk-F5T45NAM.js";
67
- import "./chunk-YUPQOLFX.js";
65
+ import "./chunk-3FQD3QME.js";
66
+ import "./chunk-OKNSR7MT.js";
67
+ import "./chunk-CQBJNFDK.js";
68
68
  import "./chunk-WHOJWOSV.js";
69
69
  import "./chunk-5XZ744TS.js";
70
- import "./chunk-YUBJLB6G.js";
70
+ import "./chunk-EFH4NFPY.js";
71
71
 
72
72
  // src/emit/deploy-command.ts
73
73
  import { basename } from "path";
@@ -158,7 +158,7 @@ async function runDeployedTests(auth, dest, summary, args) {
158
158
  }
159
159
  }
160
160
  async function runTestsOrThrow(auth, dest, summary, args) {
161
- const { runSuite, EXIT_TESTS_FAILED } = await import("./test-command-56IAEYHX.js");
161
+ const { runSuite, EXIT_TESTS_FAILED } = await import("./test-command-OEBIGOPP.js");
162
162
  let target;
163
163
  if (dest === "ephemeral") {
164
164
  if (summary.url === void 0) {
@@ -168,7 +168,7 @@ async function runTestsOrThrow(auth, dest, summary, args) {
168
168
  const name = summary.ephemeral?.name;
169
169
  target = { base: summary.url, workspaceId: 1, label: name ? `ephemeral ${name}` : "the ephemeral", env: name };
170
170
  } else {
171
- const { resolveMetaTarget } = await import("./env-target-POGJMD6Q.js");
171
+ const { resolveMetaTarget } = await import("./env-target-C5JFLDK3.js");
172
172
  target = await resolveMetaTarget(auth, { dest: "sandbox" });
173
173
  }
174
174
  const outcomes = await runSuite(auth, target, {
@@ -448,4 +448,4 @@ export {
448
448
  runDeployedTests,
449
449
  verifyMicroservices
450
450
  };
451
- //# sourceMappingURL=deploy-command-XOH76USO.js.map
451
+ //# sourceMappingURL=deploy-command-MTQQXPOO.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveMetaTarget
3
- } from "./chunk-APOR6TCV.js";
3
+ } from "./chunk-CEFYM6N5.js";
4
4
  import "./chunk-WJYB7DSI.js";
5
5
  import "./chunk-OR43PDCW.js";
6
6
  import "./chunk-NDZFBZHC.js";
@@ -13,4 +13,4 @@ import "./chunk-EZG76F7R.js";
13
13
  export {
14
14
  resolveMetaTarget
15
15
  };
16
- //# sourceMappingURL=env-target-POGJMD6Q.js.map
16
+ //# sourceMappingURL=env-target-C5JFLDK3.js.map
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-W5NOKYEG.js";
17
17
  import {
18
18
  confirm
19
- } from "./chunk-PGBK64U5.js";
19
+ } from "./chunk-4PTSTDIG.js";
20
20
  import {
21
21
  resolveOutputTarget
22
22
  } from "./chunk-AAFBSOSD.js";
@@ -41,7 +41,7 @@ import {
41
41
  import "./chunk-3IGNIP6R.js";
42
42
  import {
43
43
  unknownSubcommand
44
- } from "./chunk-IVP6TS26.js";
44
+ } from "./chunk-JQLR64UC.js";
45
45
  import "./chunk-GNPVYOPB.js";
46
46
  import {
47
47
  detail,
@@ -53,7 +53,7 @@ import {
53
53
  success,
54
54
  warn
55
55
  } from "./chunk-EZG76F7R.js";
56
- import "./chunk-F5T45NAM.js";
56
+ import "./chunk-OKNSR7MT.js";
57
57
 
58
58
  // src/emit/ephemeral-command.ts
59
59
  import { writeFileSync } from "fs";
@@ -90,7 +90,7 @@ async function runEphemeralCommand(args) {
90
90
  case "impersonate":
91
91
  return runImpersonate(args);
92
92
  case "codegen": {
93
- const { runCodegenCommand } = await import("./codegen-command-BLOS3GR3.js");
93
+ const { runCodegenCommand } = await import("./codegen-command-6XXOIQ25.js");
94
94
  return runCodegenCommand(args, { kind: "ephemeral" });
95
95
  }
96
96
  default:
@@ -239,4 +239,4 @@ export {
239
239
  resolveLive,
240
240
  runEphemeralCommand
241
241
  };
242
- //# sourceMappingURL=ephemeral-command-46SL27GJ.js.map
242
+ //# sourceMappingURL=ephemeral-command-K3UJSDS4.js.map
package/dist/index.d.ts CHANGED
@@ -649,16 +649,20 @@ interface AsyncRuntime {
649
649
  * api.call emits the `headers`/`auth` blocks (verb/name/api_group are
650
650
  * engine-derived, not stored).
651
651
  *
652
+ * `action.call` / `action.package.call` are the exception to the paragraph
653
+ * above: their target is NOT a workspace object, so no id is derived for them
654
+ * and the author supplies one. See {@link ActionCallArgs} for why.
655
+ *
652
656
  * @TODO(byte-verify): `function.run` (mvp:function), `api.call` (context.token
653
657
  * confirmed tagged), and — since the workflow-test capture — `function.call`
654
658
  * (mvp:workspace_run_function) are golden-verified. Still modeled/unverified:
655
659
  * - the remaining `workspace_run_*` (task/tool/trigger/middleware/addon) — no
656
660
  * golden, but they share the single-key `id` context two goldens now pin.
657
661
  * - `workflow_test` → context.{datasource,id} — decode-accurate, no golden.
658
- * - action / action_package — EXCLUDED from byte-verify: they need an
659
- * action-identity model first (action id currently resolves via the "function"
660
- * migrate type, likely wrong; action_package is emitted empty). See their own
661
- * @TODOs below do not vendor/capture until the identity model exists.
662
+ * - action / action_package — the stored shape is pinned against the engine's
663
+ * own authoring schema and its two transforms, and the ids are now carried
664
+ * verbatim rather than derived, so a capture is finally meaningful. It needs
665
+ * an instance with the package actually installed.
662
666
  */
663
667
 
664
668
  /** A call/agent `{name: value}` input map — raw scalar literals coerce to constants. */
@@ -830,37 +834,76 @@ interface AddonCallArgs extends StatementOptions {
830
834
  }
831
835
  /** `addon.call <addon>` — invoke an addon as a workspace run. */
832
836
  declare function addonCall(args: AddonCallArgs): Statement;
837
+ /**
838
+ * Why an action is identified by a LITERAL id and not by a name or a handle.
839
+ *
840
+ * Every other call in this file targets a workspace object, so its id is
841
+ * derivable: the name plus the object type is enough, because the SDK and the
842
+ * engine agree on how a workspace object is keyed. An action is not a workspace
843
+ * object. It is a third-party package INSTALLED onto the instance, and its
844
+ * identity is assigned at install time by the instance that installed it.
845
+ *
846
+ * Nothing offline can compute that. There is no name-to-id rule to reimplement —
847
+ * the mapping is a lookup over what happens to be installed, so the same action
848
+ * name resolves differently on two instances and to nothing at all on a third.
849
+ * That is also why an installed action never appears in the bundle's object
850
+ * graph: it is not part of the workspace's source.
851
+ *
852
+ * So the author supplies the id, and the SDK stores it verbatim. Deriving one
853
+ * from a name would produce a confident, well-formed value that addresses
854
+ * nothing — the failure mode this shape exists to make impossible.
855
+ *
856
+ * Where to find the ids: read them off an existing call in a pulled workspace,
857
+ * which round-trips them unchanged.
858
+ */
833
859
  interface ActionCallArgs extends StatementOptions {
834
- /** The action's name. */
835
- action: ObjectRef;
836
- /** The action package identifier. */
837
- package?: string;
860
+ /**
861
+ * The installed action's id, stored verbatim as `context.run_version.id`.
862
+ *
863
+ * Assigned when the action was installed — not derivable from the action's
864
+ * name, and not the same value on another instance.
865
+ */
866
+ actionId: string;
838
867
  as?: string;
868
+ /** Arguments passed to the action. */
839
869
  input?: CallInput;
870
+ /**
871
+ * The action's own settings (`settings_registry`) — an installed action's
872
+ * configured values, keyed by setting name. Separate from {@link input},
873
+ * which carries the per-call arguments.
874
+ */
875
+ registry?: CallInput;
840
876
  }
841
877
  /**
842
- * `action.call <action>` — invoke a marketplace/action operation (`mvp:action`).
843
- * Stored shape from the engine's action-call format: `context.run_version.id` is the action
844
- * id and `settings_registry` is always present.
878
+ * `action.call` — invoke an installed action (`mvp:action`).
845
879
  *
846
- * @TODO(byte-verify): xanots has no `action` kind, so the id resolves via the
847
- * "function" migrate type likely WRONG (actions are a distinct namespace,
848
- * `mapActionNameToId`). input[] uses the lean shape; the engine uses
849
- * `convertBlockToInput` (may be the rich form). No golden.
880
+ * Stores `context.run_version.id` verbatim; see {@link ActionCallArgs} for why
881
+ * the id is supplied rather than derived.
850
882
  */
851
883
  declare function actionCall(args: ActionCallArgs): Statement;
884
+ interface ActionPackageCallArgs extends StatementOptions {
885
+ /** The installed package's trace id (`context.action.trace_id`). */
886
+ traceId: string;
887
+ /** The installed package VERSION's id (`context.package_version.id`). */
888
+ versionId: string;
889
+ /** The package's slug (`context.package.slug`). */
890
+ slug: string;
891
+ as?: string;
892
+ /** Arguments passed to the action. */
893
+ input?: CallInput;
894
+ /** The action's own settings (`settings_registry`), keyed by setting name. */
895
+ registry?: CallInput;
896
+ }
852
897
  /**
853
- * `action.package.call <action>` — invoke an action-package operation
854
- * (`mvp:action_package`). Stored shape from the engine's action-package format:
855
- * `context.{action:{trace_id}, package:{slug}, package_version:{id}}`.
898
+ * `action.package.call` — invoke an action inside an installed package
899
+ * (`mvp:action_package`).
856
900
  *
857
- * @TODO(byte-verify): MODELED skeleton only — xanots doesn't model marketplace
858
- * action packages (trace_id / package slug / version id come from
859
- * `mapActionPackageNameToId`), so these are emitted EMPTY. This statement is a
860
- * reachable placeholder, NOT functional, until the action-package identity model
861
- * exists. No golden.
901
+ * Stores `context.{action.trace_id, package.slug, package_version.id}`. The
902
+ * three travel together: they are one composite identity the instance assigns at
903
+ * install, so a call carrying two of them addresses nothing. Same sourcing as
904
+ * {@link ActionCallArgs} read them off an existing call in a pulled workspace.
862
905
  */
863
- declare function actionPackageCall(args: ActionCallArgs): Statement;
906
+ declare function actionPackageCall(args: ActionPackageCallArgs): Statement;
864
907
  interface WorkflowTestCallArgs extends StatementOptions {
865
908
  /** The target workflow test. */
866
909
  workflowTest: ObjectRef;
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  TEST_EXPECT_TYPES,
7
7
  expect
8
- } from "./chunk-PXXLBXOP.js";
8
+ } from "./chunk-JRGDLAEA.js";
9
9
  import {
10
10
  addon,
11
11
  agent,
@@ -17,7 +17,7 @@ import {
17
17
  task,
18
18
  tool,
19
19
  workflowTest
20
- } from "./chunk-FN4OQT2J.js";
20
+ } from "./chunk-CU5VOSTW.js";
21
21
  import {
22
22
  actionCall,
23
23
  actionPackageCall,
@@ -100,11 +100,11 @@ import {
100
100
  workflowTestCall,
101
101
  workspaceConfig,
102
102
  workspaceTrigger
103
- } from "./chunk-CYJ7R3AD.js";
103
+ } from "./chunk-GC7ZQHW7.js";
104
104
  import {
105
105
  Xano,
106
106
  workspace
107
- } from "./chunk-BPEEGJJA.js";
107
+ } from "./chunk-3FQD3QME.js";
108
108
  import {
109
109
  LAMBDA_BINDINGS,
110
110
  LAMBDA_CODE_FILTERS,
@@ -148,7 +148,7 @@ import {
148
148
  toSearchParams,
149
149
  toolset,
150
150
  withFilters
151
- } from "./chunk-YUPQOLFX.js";
151
+ } from "./chunk-CQBJNFDK.js";
152
152
  import "./chunk-WHOJWOSV.js";
153
153
  import {
154
154
  annotate,
@@ -157,7 +157,7 @@ import {
157
157
  import {
158
158
  resetLockOverrides,
159
159
  seedLockOverrides
160
- } from "./chunk-YUBJLB6G.js";
160
+ } from "./chunk-EFH4NFPY.js";
161
161
  export {
162
162
  LAMBDA_BINDINGS,
163
163
  LAMBDA_CODE_FILTERS,