buckyos 0.7.184 → 0.7.186

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 (37) hide show
  1. package/cli/dist/cli.mjs +204 -15
  2. package/cli/dist/cli.mjs.map +1 -1
  3. package/cli/modules/aiws.ts +44 -9
  4. package/cli/modules/ext_tools.ts +30 -1
  5. package/cli/modules/pikg_protocol.ts +119 -6
  6. package/cli/version.ts +1 -1
  7. package/dist/aiworkspace_client.d.ts +19 -5
  8. package/dist/aiworkspace_client.d.ts.map +1 -1
  9. package/dist/{aiws_bind-82bace11.js → aiws_bind-0654c24e.js} +2 -2
  10. package/dist/aiws_bind-0654c24e.js.map +1 -0
  11. package/dist/{aiws_bind-3b874f77.mjs → aiws_bind-0885ff99.mjs} +7 -5
  12. package/dist/aiws_bind-0885ff99.mjs.map +1 -0
  13. package/dist/aiws_ext.cjs +1 -1
  14. package/dist/aiws_ext.mjs +1 -1
  15. package/dist/{aiws_write-ed4f0ec4.mjs → aiws_write-675664eb.mjs} +2 -2
  16. package/dist/{aiws_write-ed4f0ec4.mjs.map → aiws_write-675664eb.mjs.map} +1 -1
  17. package/dist/{aiws_write-1c748f36.js → aiws_write-b0333ca1.js} +2 -2
  18. package/dist/{aiws_write-1c748f36.js.map → aiws_write-b0333ca1.js.map} +1 -1
  19. package/dist/app-frame.cjs +1 -1
  20. package/dist/app-frame.cjs.map +1 -1
  21. package/dist/app-frame.d.ts +90 -0
  22. package/dist/app-frame.d.ts.map +1 -1
  23. package/dist/app-frame.mjs +159 -0
  24. package/dist/app-frame.mjs.map +1 -1
  25. package/dist/browser.cjs +1 -1
  26. package/dist/browser.mjs +4 -4
  27. package/dist/{content_objid-8a793481.js → content_objid-252bd154.js} +2 -2
  28. package/dist/{content_objid-8a793481.js.map → content_objid-252bd154.js.map} +1 -1
  29. package/dist/{content_objid-c25fec12.mjs → content_objid-39f4f273.mjs} +2 -2
  30. package/dist/{content_objid-c25fec12.mjs.map → content_objid-39f4f273.mjs.map} +1 -1
  31. package/dist/index.cjs +1 -1
  32. package/dist/index.mjs +4 -4
  33. package/dist/node.cjs +1 -1
  34. package/dist/node.mjs +3 -3
  35. package/package.json +1 -1
  36. package/dist/aiws_bind-3b874f77.mjs.map +0 -1
  37. package/dist/aiws_bind-82bace11.js.map +0 -1
package/cli/dist/cli.mjs CHANGED
@@ -4653,6 +4653,7 @@ const EXT_TOOLS_RESERVED_COMMANDS = [
4653
4653
  "llm_understand_media",
4654
4654
  "materialize_resource",
4655
4655
  "ocr_image",
4656
+ "reflow",
4656
4657
  "remove_bg",
4657
4658
  "resume_aicc_task",
4658
4659
  "segment_image",
@@ -4677,12 +4678,96 @@ const EXT_TOOLS_PLATFORMS = [
4677
4678
  function extToolsPlatformOfKey(key) {
4678
4679
  return EXT_TOOLS_PLATFORMS.find((platform) => platform.key === key);
4679
4680
  }
4681
+ const EXT_TOOLS_VERSION = /^[A-Za-z0-9._+-]+$/;
4682
+ const EXT_TOOLS_ONLINE_FORMATS = ["zip", "tar.gz"];
4683
+ function unknownKeys(value, allowed) {
4684
+ return Object.keys(value).filter((key) => !allowed.includes(key));
4685
+ }
4686
+ function isHttpsUrl(value) {
4687
+ if (typeof value !== "string")
4688
+ return false;
4689
+ try {
4690
+ const url = new URL(value);
4691
+ return url.protocol === "https:" && url.hostname !== "";
4692
+ } catch {
4693
+ return false;
4694
+ }
4695
+ }
4696
+ function extToolsOnlineSourceErrors(item, raw) {
4697
+ if (!raw || typeof raw !== "object" || Array.isArray(raw))
4698
+ return ["must be an object"];
4699
+ const source = raw;
4700
+ const errors = unknownKeys(source, ["url", "sha256", "size_bytes", "format", "into", "rename", "overlay"]).map((key) => `${key} is not a field`);
4701
+ if (!isHttpsUrl(source.url))
4702
+ errors.push(`url ${JSON.stringify(source.url)} must be an https address`);
4703
+ if (typeof source.sha256 !== "string" || !/^[0-9a-fA-F]{64}$/.test(source.sha256))
4704
+ errors.push("sha256 must be 64 hex digits");
4705
+ if (!Number.isSafeInteger(source.size_bytes) || source.size_bytes <= 0)
4706
+ errors.push("size_bytes must be the size of the archive");
4707
+ if (typeof source.format !== "string" || !EXT_TOOLS_ONLINE_FORMATS.includes(source.format))
4708
+ errors.push(`format ${JSON.stringify(source.format)} must be zip or tar.gz`);
4709
+ if (source.into !== void 0 && (typeof source.into !== "string" || !isSafeRelativePath(source.into)))
4710
+ errors.push("into must be a relative path inside the item");
4711
+ const pairs = source.rename === void 0 ? [] : source.rename;
4712
+ const renamed = Array.isArray(pairs) && pairs.every(
4713
+ (pair) => Array.isArray(pair) && pair.length === 2 && pair.every((path) => typeof path === "string" && isSafeRelativePath(path)) && pair[0] !== pair[1]
4714
+ );
4715
+ if (!renamed)
4716
+ errors.push("rename must be [from, to] pairs of relative paths inside the item");
4717
+ const root = `online/${item}`;
4718
+ const overlay = source.overlay;
4719
+ if (overlay !== void 0 && !(typeof overlay === "string" && isSafeRelativePath(overlay) && (overlay === root || overlay.startsWith(`${root}/`)))) {
4720
+ errors.push(`overlay must be ${root} or a directory below it`);
4721
+ }
4722
+ return errors;
4723
+ }
4724
+ function extToolsOnlineErrors(manifest) {
4725
+ const errors = [];
4726
+ const items = /* @__PURE__ */ new Set();
4727
+ if (manifest.online === void 0)
4728
+ return { errors, items };
4729
+ if (!Array.isArray(manifest.online))
4730
+ return { errors: ["online must be a list of items"], items };
4731
+ const platforms = Array.isArray(manifest.platforms) ? manifest.platforms : [];
4732
+ for (const raw of manifest.online) {
4733
+ const item = raw ?? {};
4734
+ const id = item.id;
4735
+ if (typeof id !== "string" || !EXT_TOOLS_ID.test(id)) {
4736
+ errors.push(`online: id ${JSON.stringify(id)} must be lowercase letters, digits and -`);
4737
+ continue;
4738
+ }
4739
+ if (items.has(id))
4740
+ errors.push(`online: ${id} is listed twice`);
4741
+ items.add(id);
4742
+ for (const key of unknownKeys(item, ["id", "version", "desc", "license", "auto", "platforms"]))
4743
+ errors.push(`online ${id}: ${key} is not a field`);
4744
+ if (typeof item.version !== "string" || !EXT_TOOLS_VERSION.test(item.version))
4745
+ errors.push(`online ${id}: version must be letters, digits and ._+-`);
4746
+ for (const text2 of ["desc", "license"])
4747
+ if (item[text2] !== void 0 && typeof item[text2] !== "string")
4748
+ errors.push(`online ${id}: ${text2} must be a string`);
4749
+ if (item.auto !== void 0 && typeof item.auto !== "boolean")
4750
+ errors.push(`online ${id}: auto must be true or false`);
4751
+ const sources = item.platforms;
4752
+ if (!sources || typeof sources !== "object" || Array.isArray(sources) || Object.keys(sources).length === 0) {
4753
+ errors.push(`online ${id}: platforms must not be empty`);
4754
+ continue;
4755
+ }
4756
+ for (const [platform, source] of Object.entries(sources)) {
4757
+ if (!platforms.includes(platform))
4758
+ errors.push(`online ${id}: ${platform} is not a platform of the package`);
4759
+ for (const problem of extToolsOnlineSourceErrors(id, source))
4760
+ errors.push(`online ${id} on ${platform}: ${problem}`);
4761
+ }
4762
+ }
4763
+ return { errors, items };
4764
+ }
4680
4765
  function extToolsManifestErrors(value) {
4681
4766
  if (!value || typeof value !== "object" || Array.isArray(value))
4682
4767
  return ["must be a JSON object"];
4683
4768
  const manifest = value;
4684
4769
  const errors = [];
4685
- const allowed = ["schema", "id", "version", "requires", "conflicts", "provides", "platforms", "size_bytes", "license", "desc"];
4770
+ const allowed = ["schema", "id", "version", "requires", "conflicts", "provides", "platforms", "size_bytes", "license", "desc", "online"];
4686
4771
  for (const key of Object.keys(manifest))
4687
4772
  if (!allowed.includes(key))
4688
4773
  errors.push(`${key} is not a field of the manifest`);
@@ -4690,10 +4775,12 @@ function extToolsManifestErrors(value) {
4690
4775
  errors.push(`schema must be ${EXT_TOOLS_MANIFEST_SCHEMA}`);
4691
4776
  if (typeof manifest.id !== "string" || !EXT_TOOLS_ID.test(manifest.id))
4692
4777
  errors.push("id must be lowercase letters, digits and -");
4693
- if (typeof manifest.version !== "string" || !/^[A-Za-z0-9._+-]+$/.test(manifest.version))
4778
+ if (typeof manifest.version !== "string" || !EXT_TOOLS_VERSION.test(manifest.version))
4694
4779
  errors.push("version must be letters, digits and ._+-");
4695
4780
  if (!Array.isArray(manifest.provides) || manifest.provides.length === 0)
4696
4781
  errors.push("provides must not be empty");
4782
+ const online = extToolsOnlineErrors(manifest);
4783
+ errors.push(...online.errors);
4697
4784
  const commands = /* @__PURE__ */ new Set();
4698
4785
  for (const raw of Array.isArray(manifest.provides) ? manifest.provides : []) {
4699
4786
  const entry = raw ?? {};
@@ -4707,12 +4794,24 @@ function extToolsManifestErrors(value) {
4707
4794
  if (EXT_TOOLS_RESERVED_COMMANDS.includes(command2))
4708
4795
  errors.push(`provides: ${command2} is a standard command and cannot be provided by a package`);
4709
4796
  commands.add(command2);
4797
+ for (const key of unknownKeys(entry, ["command", "version_probe", "smoke", "needs"]))
4798
+ errors.push(`provides: ${key} is not a field of ${command2}`);
4710
4799
  if (typeof entry.version_probe !== "string" || !entry.version_probe.trim())
4711
4800
  errors.push(`provides: ${command2} has no version_probe`);
4712
4801
  const smoke = entry.smoke;
4713
4802
  if (smoke !== void 0 && (typeof smoke !== "string" || !isSafeRelativePath(smoke))) {
4714
4803
  errors.push(`provides: the smoke of ${command2} must be a relative path inside the payload`);
4715
4804
  }
4805
+ const needs = entry.needs === void 0 ? [] : entry.needs;
4806
+ if (!Array.isArray(needs) || !needs.every((need) => typeof need === "string")) {
4807
+ errors.push(`provides: the needs of ${command2} must list online items by id`);
4808
+ continue;
4809
+ }
4810
+ for (const need of needs)
4811
+ if (!online.items.has(need))
4812
+ errors.push(`provides: ${command2} needs ${need}, which is not an online item of the package`);
4813
+ if (new Set(needs).size !== needs.length)
4814
+ errors.push(`provides: ${command2} needs an online item twice`);
4716
4815
  }
4717
4816
  if (!Array.isArray(manifest.platforms) || manifest.platforms.length === 0)
4718
4817
  errors.push("platforms must not be empty");
@@ -4753,14 +4852,23 @@ function extToolsPayloadErrors(manifest, platform, tree, buildPaths = []) {
4753
4852
  const errors = [];
4754
4853
  const windows = platform.startsWith("windows-");
4755
4854
  const suffixes = windows ? EXT_TOOLS_WINDOWS_SUFFIXES : [""];
4855
+ const online = manifest.online ?? [];
4756
4856
  for (const path of [...tree.files.keys(), ...tree.directories]) {
4757
4857
  const [top, second] = path.split("/");
4758
4858
  const isTop = !path.includes("/");
4759
- const known = top === EXT_TOOLS_MANIFEST_FILE && isTop || top === "bin" || top === "smoke" || top === "store";
4859
+ const known = top === EXT_TOOLS_MANIFEST_FILE && isTop || top === "bin" || top === "smoke" || top === "store" || top === "online";
4760
4860
  if (!known)
4761
- errors.push(`${path}: a package only holds ${EXT_TOOLS_MANIFEST_FILE}, bin/, smoke/ and store/${manifest.id}/`);
4861
+ errors.push(`${path}: a package only holds ${EXT_TOOLS_MANIFEST_FILE}, bin/, smoke/, store/${manifest.id}/ and online/<item>/`);
4762
4862
  if (top === "store" && second !== void 0 && second !== manifest.id)
4763
4863
  errors.push(`${path}: a package only writes store/${manifest.id}/`);
4864
+ if (top === "online" && second !== void 0 && !online.some((item) => item.id === second))
4865
+ errors.push(`${path}: not an online item of the package`);
4866
+ }
4867
+ for (const item of online) {
4868
+ const overlay = item.platforms[platform]?.overlay;
4869
+ const present = overlay !== void 0 && (tree.directories.has(overlay) || [...tree.files.keys()].some((path) => path.startsWith(`${overlay}/`)));
4870
+ if (overlay !== void 0 && !present)
4871
+ errors.push(`${overlay}: the overlay of online item ${item.id} is missing`);
4764
4872
  }
4765
4873
  const declared = new Set(manifest.provides.map((provided) => provided.command));
4766
4874
  for (const provided of manifest.provides) {
@@ -6115,7 +6223,7 @@ async function readSkillDirectory(root, limit) {
6115
6223
  await walk(realRoot, "");
6116
6224
  return { files, ignored };
6117
6225
  }
6118
- const PACKAGE_VERSION = "0.7.184";
6226
+ const PACKAGE_VERSION = "0.7.186";
6119
6227
  const TOOL_VERSION = PACKAGE_VERSION;
6120
6228
  const SDK_VERSION = PACKAGE_VERSION;
6121
6229
  const PROTOCOL_VERSION = "1";
@@ -13373,15 +13481,45 @@ function desired(verb, summary2, enabled) {
13373
13481
  handler: (ctx, input) => call$1(ctx, input.dry_run === true ? "ext_tools.plan" : "ext_tools.set_desired", requestOf(input, enabled))
13374
13482
  };
13375
13483
  }
13484
+ function download() {
13485
+ return {
13486
+ verb: "download",
13487
+ summary: "Ask the nodes to download an online item of a package again: after a failure, or to replace what is there",
13488
+ positionals: [
13489
+ { name: "id", description: "Package id, e.g. ext-core" },
13490
+ { name: "item", description: "Online item id, e.g. chromium (see `online` in ext-tools status)" }
13491
+ ],
13492
+ options: [{ name: "node", description: "Only this node; without it every node that has the item", type: "string" }],
13493
+ inputSchema: {
13494
+ type: "object",
13495
+ properties: { id: ID$1, item: ID$1, node: { type: "string", minLength: 1 } },
13496
+ required: ["id", "item"],
13497
+ additionalProperties: false
13498
+ },
13499
+ outputSchema: OBJECT_OUTPUT$3,
13500
+ resultSchemaVersion: 1,
13501
+ access: { mode: "fixed", level: "write" },
13502
+ asyncMode: "sync",
13503
+ requiresSession: true,
13504
+ handler: (ctx, input) => {
13505
+ for (const name of ["id", "item"]) {
13506
+ if (typeof input[name] !== "string" || !input[name])
13507
+ throw new UsageError("MISSING_ARGUMENT", `a package id and an online item id are required`);
13508
+ }
13509
+ return call$1(ctx, "ext_tools.download", { id: input.id, item: input.item, ...typeof input.node === "string" ? { node: input.node } : {} });
13510
+ }
13511
+ };
13512
+ }
13376
13513
  function createExtToolsModule() {
13377
13514
  return {
13378
13515
  name: "ext-tools",
13379
13516
  summary: "Manage the extension tool packages every Agent of the Zone shares",
13380
13517
  commands: [
13381
13518
  read("list", "The packages published in the Repo, and what each provides", "ext_tools.catalog"),
13382
- read("status", "Package by node: what is asked for and where each node got to", "ext_tools.status"),
13519
+ read("status", "Package by node: what is asked for, where each node got to, and the online items it downloaded or still waits for", "ext_tools.status"),
13383
13520
  desired("enable", "Enable or upgrade a package, with the packages it requires", true),
13384
13521
  desired("disable", "Disable a package; refused while an enabled package requires it", false),
13522
+ download(),
13385
13523
  {
13386
13524
  verb: "import",
13387
13525
  summary: "Put an already built .pikg (an official release asset) into the Repo unchanged",
@@ -14624,7 +14762,7 @@ const infoCommand = {
14624
14762
  };
14625
14763
  const runGetCommand = {
14626
14764
  verb: "run-get",
14627
- summary: "A wish run: state, execution context, the brief an executor starts from, candidate and preview",
14765
+ summary: "A wish run: state, progress, execution context, the brief an executor starts from, what it wrote (applied) and the record it added to the wish's history (record)",
14628
14766
  options: [WORKSPACE_OPTION, RUN_OPTION],
14629
14767
  inputSchema: workspaceInput({ run_id: { type: "string", minLength: 1 } }, ["run_id"]),
14630
14768
  outputSchema: OBJECT_OUTPUT,
@@ -14770,7 +14908,13 @@ function sessionInfer(ctx) {
14770
14908
  allow_tool_calls: false,
14771
14909
  signal: ctx.signal
14772
14910
  });
14773
- return { text: r.message.content.map((c) => c.type === "text" ? c.text ?? "" : "").join(""), tokens: r.usage?.output_tokens };
14911
+ const model = r.extra?.model;
14912
+ return {
14913
+ text: r.message.content.map((c) => c.type === "text" ? c.text ?? "" : "").join(""),
14914
+ tokens: r.usage?.output_tokens,
14915
+ input_tokens: r.usage?.input_tokens,
14916
+ ...typeof model === "string" && model ? { model } : {}
14917
+ };
14774
14918
  } catch (error) {
14775
14919
  throw refusalOf(error);
14776
14920
  }
@@ -14974,20 +15118,37 @@ const runStartCommand = {
14974
15118
  };
14975
15119
  const runReportCommand = {
14976
15120
  verb: "run-report",
14977
- summary: "End a claimed run: --finished after the stage is done (submit_analysis or finish accepted, or the stored macro handed in), an analysis made elsewhere, or a failure",
14978
- description: "The service validates and plans what the stage collected; the user confirms it in the workspace. Results always come from the macro (run-program). A superseded attempt or a cancelled run gets RUN_REVOKED.",
15121
+ summary: "End a claimed run: --finished after the stage is done (submit_analysis or finish accepted, or the stored macro handed in), an analysis made elsewhere, or a failure — with what your model loop used",
15122
+ description: "The service then checks the stage and writes it at once: an analysis its task contract, coding only the macro, a run its results; each stage adds a record to the wish's history, a failure too (and writes nothing else). Results always come from the macro (run-program). --model, --input-tokens, --output-tokens and --calls go into that record as they are: what the model turns of this stage used (leave them out when you called no model, as when you only ran the stored macro). A superseded attempt or a cancelled run gets RUN_REVOKED.",
14979
15123
  options: [
14980
15124
  WORKSPACE_OPTION,
14981
15125
  RUN_OPTION,
14982
15126
  ATTEMPT_OPTION,
14983
- { name: "finished", property: "finished", description: "The stage is done: what it collected becomes the candidate", type: "boolean" },
15127
+ { name: "finished", property: "finished", description: "The stage is done: the service writes what it produced", type: "boolean" },
14984
15128
  { name: "analysis", property: "analysis", description: "Analysis JSON (analyze runs, wish.analysis.v3)", type: "string" },
14985
15129
  { name: "analysis-file", property: "analysis_file", description: "Path of a JSON file holding the analysis", type: "string" },
14986
15130
  { name: "summary", property: "summary", description: "One paragraph on what was done", type: "string" },
14987
15131
  { name: "warning", property: "warnings", description: "A warning for the user (repeatable)", type: "string" },
14988
- { name: "error", property: "error", description: "Report a failure instead: its reason", type: "string" }
15132
+ { name: "error", property: "error", description: "Report a failure instead: its reason", type: "string" },
15133
+ { name: "model", property: "model", description: "The model that answered your last model turn (the stage's model when you cannot tell)", type: "string" },
15134
+ { name: "input-tokens", property: "input_tokens", description: "Input tokens of all your model turns in this stage", type: "integer" },
15135
+ { name: "output-tokens", property: "output_tokens", description: "Output tokens of all your model turns in this stage", type: "integer" },
15136
+ { name: "calls", property: "calls", description: "How many model turns this stage took", type: "integer" }
14989
15137
  ],
14990
- inputSchema: workspaceInput({ run_id: { type: "string", minLength: 1 }, attempt: { type: "integer", minimum: 1 }, finished: { type: "boolean" }, analysis: { type: "string" }, analysis_file: { type: "string" }, summary: { type: "string" }, warnings: { type: "string" }, error: { type: "string" } }, ["run_id", "attempt"]),
15138
+ inputSchema: workspaceInput({
15139
+ run_id: { type: "string", minLength: 1 },
15140
+ attempt: { type: "integer", minimum: 1 },
15141
+ finished: { type: "boolean" },
15142
+ analysis: { type: "string" },
15143
+ analysis_file: { type: "string" },
15144
+ summary: { type: "string" },
15145
+ warnings: { type: "string" },
15146
+ error: { type: "string" },
15147
+ model: { type: "string", minLength: 1 },
15148
+ input_tokens: { type: "integer", minimum: 0 },
15149
+ output_tokens: { type: "integer", minimum: 0 },
15150
+ calls: { type: "integer", minimum: 0 }
15151
+ }, ["run_id", "attempt"]),
14991
15152
  outputSchema: OBJECT_OUTPUT,
14992
15153
  resultSchemaVersion: 1,
14993
15154
  access: { mode: "fixed", level: "write" },
@@ -14995,6 +15156,7 @@ const runReportCommand = {
14995
15156
  requiresSession: true,
14996
15157
  examples: [
14997
15158
  "buckyos aiws run-report --workspace ws_abc --run run_xyz --attempt 1 --finished",
15159
+ "buckyos aiws run-report --workspace ws_abc --run run_xyz --attempt 1 --finished --model gpt-6-astra --input-tokens 12340 --output-tokens 1205 --calls 7",
14998
15160
  "buckyos aiws run-report --workspace ws_abc --run run_xyz --attempt 1 --analysis-file out/analysis.json",
14999
15161
  'buckyos aiws run-report --workspace ws_abc --run run_xyz --attempt 1 --error "the input table is empty"'
15000
15162
  ],
@@ -15014,9 +15176,36 @@ const runReportCommand = {
15014
15176
  const warning = inputString(input, "warnings");
15015
15177
  if (warning)
15016
15178
  params.warnings = [warning];
15179
+ const usage2 = {};
15180
+ const model = inputString(input, "model");
15181
+ if (model)
15182
+ usage2.model = model;
15183
+ for (const key of ["input_tokens", "output_tokens", "calls"])
15184
+ if (typeof input[key] === "number")
15185
+ usage2[key] = input[key];
15186
+ if (Object.keys(usage2).length)
15187
+ params.usage = usage2;
15017
15188
  return aiws(ctx, "proc.report", params);
15018
15189
  }
15019
15190
  };
15191
+ const runRollbackCommand = {
15192
+ verb: "run-rollback",
15193
+ summary: "Roll a wish run back: what it wrote (its analysis, its macro or its results) returns to the stage's previous version; only the run whose record is current for its stage",
15194
+ description: "Results the run updated return to what they were before it (a person's edits it overwrote included), results it created go with their Blocks; a macro or an analysis returns to the one of the previous record. When what the run wrote was changed since, nothing is written: the answer is `status: needs_confirm` with what would be lost (`lost`, `hidden_lost`); run it again with --confirm to go ahead. Otherwise one Commit: `commit` and the `rollback` record added to the history. Another record than the current one: INVALID_OPERATION / NOT_CURRENT_RECORD. Needs update on the wish.",
15195
+ options: [WORKSPACE_OPTION, RUN_OPTION, { name: "confirm", property: "confirm", description: "Go ahead although the later changes listed by a first try are lost", type: "boolean" }],
15196
+ inputSchema: workspaceInput({ run_id: { type: "string", minLength: 1 }, confirm: { type: "boolean" } }, ["run_id"]),
15197
+ outputSchema: OBJECT_OUTPUT,
15198
+ resultSchemaVersion: 1,
15199
+ access: { mode: "fixed", level: "write" },
15200
+ asyncMode: "sync",
15201
+ requiresSession: true,
15202
+ examples: ["buckyos aiws run-rollback --workspace ws_abc --run run_xyz", "buckyos aiws run-rollback --workspace ws_abc --run run_xyz --confirm"],
15203
+ handler: (ctx, input) => aiws(ctx, "proc.rollback", {
15204
+ workspace_id: requiredInputString(input, "workspace_id"),
15205
+ run_id: requiredInputString(input, "run_id"),
15206
+ ...input.confirm === true ? { confirm: true } : {}
15207
+ })
15208
+ };
15020
15209
  const controlsCommand = {
15021
15210
  verb: "controls",
15022
15211
  summary: "Block-controls a canvas offers: `list` (kind, what it is, when to use it), `describe <kind>` (the full self-description to follow)",
@@ -15731,8 +15920,8 @@ const templateCommand = {
15731
15920
  function createAiwsModule() {
15732
15921
  return {
15733
15922
  name: "aiws",
15734
- summary: "AI Workspace: find and read a workspace by path (ls, find, grep, stat, cat, resolve, read), its permissions (acl, acl-edit), query its tables in SQL (sql), write tables, rich text and common properties (table, text, mv, rename, set-prop), your to-do list and calendar (todo, cal), Block-controls (catalogue, import, export), extension controls (build, pull, export, library, import, upgrade), Workspace templates (list, create, export), and execute wish runs as their executor (claim, heartbeat, report)",
15735
- commands: [infoCommand, lsCommand, findCommand, grepCommand, statCommand, aclCommand, aclEditCommand, catCommand, resolveCommand, readCommand, sqlCommand, tableCommand, textCommand, mvCommand, renameCommand, setPropCommand, todoCommand, calCommand, placeCommand, controlsCommand, importCommand, exportCommand, buildCommand, pullCommand, extExportCommand, libraryCommand, extImportCommand, extUpgradeCommand, templateCommand, runGetCommand, runClaimCommand, runHeartbeatCommand, runFilesCommand, runToolCommand, runExecCommand, runProgramCommand, runReportCommand, runStartCommand]
15923
+ summary: "AI Workspace: find and read a workspace by path (ls, find, grep, stat, cat, resolve, read), its permissions (acl, acl-edit), query its tables in SQL (sql), write tables, rich text and common properties (table, text, mv, rename, set-prop), your to-do list and calendar (todo, cal), Block-controls (catalogue, import, export), extension controls (build, pull, export, library, import, upgrade), Workspace templates (list, create, export), and execute wish runs as their executor (claim, heartbeat, report) or roll one back",
15924
+ commands: [infoCommand, lsCommand, findCommand, grepCommand, statCommand, aclCommand, aclEditCommand, catCommand, resolveCommand, readCommand, sqlCommand, tableCommand, textCommand, mvCommand, renameCommand, setPropCommand, todoCommand, calCommand, placeCommand, controlsCommand, importCommand, exportCommand, buildCommand, pullCommand, extExportCommand, libraryCommand, extImportCommand, extUpgradeCommand, templateCommand, runGetCommand, runClaimCommand, runHeartbeatCommand, runFilesCommand, runToolCommand, runExecCommand, runProgramCommand, runReportCommand, runRollbackCommand, runStartCommand]
15736
15925
  };
15737
15926
  }
15738
15927
  const VERSION = TOOL_VERSION;