buckyos 0.7.184 → 0.7.185
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/cli/dist/cli.mjs +62 -10
- package/cli/dist/cli.mjs.map +1 -1
- package/cli/modules/aiws.ts +44 -9
- package/cli/modules/pikg_protocol.ts +1 -1
- package/cli/version.ts +1 -1
- package/dist/aiworkspace_client.d.ts +19 -5
- package/dist/aiworkspace_client.d.ts.map +1 -1
- package/dist/{aiws_bind-82bace11.js → aiws_bind-0654c24e.js} +2 -2
- package/dist/aiws_bind-0654c24e.js.map +1 -0
- package/dist/{aiws_bind-3b874f77.mjs → aiws_bind-0885ff99.mjs} +7 -5
- package/dist/aiws_bind-0885ff99.mjs.map +1 -0
- package/dist/aiws_ext.cjs +1 -1
- package/dist/aiws_ext.mjs +1 -1
- package/dist/{aiws_write-ed4f0ec4.mjs → aiws_write-675664eb.mjs} +2 -2
- package/dist/{aiws_write-ed4f0ec4.mjs.map → aiws_write-675664eb.mjs.map} +1 -1
- package/dist/{aiws_write-1c748f36.js → aiws_write-b0333ca1.js} +2 -2
- package/dist/{aiws_write-1c748f36.js.map → aiws_write-b0333ca1.js.map} +1 -1
- package/dist/browser.cjs +1 -1
- package/dist/browser.mjs +4 -4
- package/dist/{content_objid-8a793481.js → content_objid-252bd154.js} +2 -2
- package/dist/{content_objid-8a793481.js.map → content_objid-252bd154.js.map} +1 -1
- package/dist/{content_objid-c25fec12.mjs → content_objid-39f4f273.mjs} +2 -2
- package/dist/{content_objid-c25fec12.mjs.map → content_objid-39f4f273.mjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +4 -4
- package/dist/node.cjs +1 -1
- package/dist/node.mjs +3 -3
- package/package.json +1 -1
- package/dist/aiws_bind-3b874f77.mjs.map +0 -1
- 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",
|
|
@@ -6115,7 +6116,7 @@ async function readSkillDirectory(root, limit) {
|
|
|
6115
6116
|
await walk(realRoot, "");
|
|
6116
6117
|
return { files, ignored };
|
|
6117
6118
|
}
|
|
6118
|
-
const PACKAGE_VERSION = "0.7.
|
|
6119
|
+
const PACKAGE_VERSION = "0.7.185";
|
|
6119
6120
|
const TOOL_VERSION = PACKAGE_VERSION;
|
|
6120
6121
|
const SDK_VERSION = PACKAGE_VERSION;
|
|
6121
6122
|
const PROTOCOL_VERSION = "1";
|
|
@@ -14624,7 +14625,7 @@ const infoCommand = {
|
|
|
14624
14625
|
};
|
|
14625
14626
|
const runGetCommand = {
|
|
14626
14627
|
verb: "run-get",
|
|
14627
|
-
summary: "A wish run: state, execution context, the brief an executor starts from,
|
|
14628
|
+
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
14629
|
options: [WORKSPACE_OPTION, RUN_OPTION],
|
|
14629
14630
|
inputSchema: workspaceInput({ run_id: { type: "string", minLength: 1 } }, ["run_id"]),
|
|
14630
14631
|
outputSchema: OBJECT_OUTPUT,
|
|
@@ -14770,7 +14771,13 @@ function sessionInfer(ctx) {
|
|
|
14770
14771
|
allow_tool_calls: false,
|
|
14771
14772
|
signal: ctx.signal
|
|
14772
14773
|
});
|
|
14773
|
-
|
|
14774
|
+
const model = r.extra?.model;
|
|
14775
|
+
return {
|
|
14776
|
+
text: r.message.content.map((c) => c.type === "text" ? c.text ?? "" : "").join(""),
|
|
14777
|
+
tokens: r.usage?.output_tokens,
|
|
14778
|
+
input_tokens: r.usage?.input_tokens,
|
|
14779
|
+
...typeof model === "string" && model ? { model } : {}
|
|
14780
|
+
};
|
|
14774
14781
|
} catch (error) {
|
|
14775
14782
|
throw refusalOf(error);
|
|
14776
14783
|
}
|
|
@@ -14974,20 +14981,37 @@ const runStartCommand = {
|
|
|
14974
14981
|
};
|
|
14975
14982
|
const runReportCommand = {
|
|
14976
14983
|
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
|
|
14984
|
+
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",
|
|
14985
|
+
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
14986
|
options: [
|
|
14980
14987
|
WORKSPACE_OPTION,
|
|
14981
14988
|
RUN_OPTION,
|
|
14982
14989
|
ATTEMPT_OPTION,
|
|
14983
|
-
{ name: "finished", property: "finished", description: "The stage is done:
|
|
14990
|
+
{ name: "finished", property: "finished", description: "The stage is done: the service writes what it produced", type: "boolean" },
|
|
14984
14991
|
{ name: "analysis", property: "analysis", description: "Analysis JSON (analyze runs, wish.analysis.v3)", type: "string" },
|
|
14985
14992
|
{ name: "analysis-file", property: "analysis_file", description: "Path of a JSON file holding the analysis", type: "string" },
|
|
14986
14993
|
{ name: "summary", property: "summary", description: "One paragraph on what was done", type: "string" },
|
|
14987
14994
|
{ 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" }
|
|
14995
|
+
{ name: "error", property: "error", description: "Report a failure instead: its reason", type: "string" },
|
|
14996
|
+
{ name: "model", property: "model", description: "The model that answered your last model turn (the stage's model when you cannot tell)", type: "string" },
|
|
14997
|
+
{ name: "input-tokens", property: "input_tokens", description: "Input tokens of all your model turns in this stage", type: "integer" },
|
|
14998
|
+
{ name: "output-tokens", property: "output_tokens", description: "Output tokens of all your model turns in this stage", type: "integer" },
|
|
14999
|
+
{ name: "calls", property: "calls", description: "How many model turns this stage took", type: "integer" }
|
|
14989
15000
|
],
|
|
14990
|
-
inputSchema: workspaceInput({
|
|
15001
|
+
inputSchema: workspaceInput({
|
|
15002
|
+
run_id: { type: "string", minLength: 1 },
|
|
15003
|
+
attempt: { type: "integer", minimum: 1 },
|
|
15004
|
+
finished: { type: "boolean" },
|
|
15005
|
+
analysis: { type: "string" },
|
|
15006
|
+
analysis_file: { type: "string" },
|
|
15007
|
+
summary: { type: "string" },
|
|
15008
|
+
warnings: { type: "string" },
|
|
15009
|
+
error: { type: "string" },
|
|
15010
|
+
model: { type: "string", minLength: 1 },
|
|
15011
|
+
input_tokens: { type: "integer", minimum: 0 },
|
|
15012
|
+
output_tokens: { type: "integer", minimum: 0 },
|
|
15013
|
+
calls: { type: "integer", minimum: 0 }
|
|
15014
|
+
}, ["run_id", "attempt"]),
|
|
14991
15015
|
outputSchema: OBJECT_OUTPUT,
|
|
14992
15016
|
resultSchemaVersion: 1,
|
|
14993
15017
|
access: { mode: "fixed", level: "write" },
|
|
@@ -14995,6 +15019,7 @@ const runReportCommand = {
|
|
|
14995
15019
|
requiresSession: true,
|
|
14996
15020
|
examples: [
|
|
14997
15021
|
"buckyos aiws run-report --workspace ws_abc --run run_xyz --attempt 1 --finished",
|
|
15022
|
+
"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
15023
|
"buckyos aiws run-report --workspace ws_abc --run run_xyz --attempt 1 --analysis-file out/analysis.json",
|
|
14999
15024
|
'buckyos aiws run-report --workspace ws_abc --run run_xyz --attempt 1 --error "the input table is empty"'
|
|
15000
15025
|
],
|
|
@@ -15014,9 +15039,36 @@ const runReportCommand = {
|
|
|
15014
15039
|
const warning = inputString(input, "warnings");
|
|
15015
15040
|
if (warning)
|
|
15016
15041
|
params.warnings = [warning];
|
|
15042
|
+
const usage2 = {};
|
|
15043
|
+
const model = inputString(input, "model");
|
|
15044
|
+
if (model)
|
|
15045
|
+
usage2.model = model;
|
|
15046
|
+
for (const key of ["input_tokens", "output_tokens", "calls"])
|
|
15047
|
+
if (typeof input[key] === "number")
|
|
15048
|
+
usage2[key] = input[key];
|
|
15049
|
+
if (Object.keys(usage2).length)
|
|
15050
|
+
params.usage = usage2;
|
|
15017
15051
|
return aiws(ctx, "proc.report", params);
|
|
15018
15052
|
}
|
|
15019
15053
|
};
|
|
15054
|
+
const runRollbackCommand = {
|
|
15055
|
+
verb: "run-rollback",
|
|
15056
|
+
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",
|
|
15057
|
+
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.",
|
|
15058
|
+
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" }],
|
|
15059
|
+
inputSchema: workspaceInput({ run_id: { type: "string", minLength: 1 }, confirm: { type: "boolean" } }, ["run_id"]),
|
|
15060
|
+
outputSchema: OBJECT_OUTPUT,
|
|
15061
|
+
resultSchemaVersion: 1,
|
|
15062
|
+
access: { mode: "fixed", level: "write" },
|
|
15063
|
+
asyncMode: "sync",
|
|
15064
|
+
requiresSession: true,
|
|
15065
|
+
examples: ["buckyos aiws run-rollback --workspace ws_abc --run run_xyz", "buckyos aiws run-rollback --workspace ws_abc --run run_xyz --confirm"],
|
|
15066
|
+
handler: (ctx, input) => aiws(ctx, "proc.rollback", {
|
|
15067
|
+
workspace_id: requiredInputString(input, "workspace_id"),
|
|
15068
|
+
run_id: requiredInputString(input, "run_id"),
|
|
15069
|
+
...input.confirm === true ? { confirm: true } : {}
|
|
15070
|
+
})
|
|
15071
|
+
};
|
|
15020
15072
|
const controlsCommand = {
|
|
15021
15073
|
verb: "controls",
|
|
15022
15074
|
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 +15783,8 @@ const templateCommand = {
|
|
|
15731
15783
|
function createAiwsModule() {
|
|
15732
15784
|
return {
|
|
15733
15785
|
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]
|
|
15786
|
+
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",
|
|
15787
|
+
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
15788
|
};
|
|
15737
15789
|
}
|
|
15738
15790
|
const VERSION = TOOL_VERSION;
|