@orkestrel/agent 0.0.44 → 0.0.45

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.
@@ -6702,20 +6702,20 @@ var BUILTIN_LIMITS = Object.freeze({
6702
6702
  * definitions `collectBuiltinDefinitions` returns both read their text and annotations here.
6703
6703
  */
6704
6704
  var BUILTIN_TOOLS = Object.freeze({
6705
- load: Object.freeze({ description: "Loads one skill from the skills index, so its instructions join yours and its tools become callable from your next step. Example: {\"skill\":\"refunds\"}. Replies with a short acknowledgement, not the instructions; call unload when you no longer need the skill." }),
6706
- unload: Object.freeze({ description: "Unloads one skill you loaded, so its instructions and tools leave from your next step. Example: {\"skill\":\"refunds\"}. Replies with a short acknowledgement." }),
6705
+ load: Object.freeze({ description: "Loads one skill from the skills index, so its instructions join yours and its tools become callable from your next step. Example: {\"skill\":\"refunds\"}. A number given as the skill reads as its digits, so {\"skill\":7} loads the skill \"7\". Replies with a short acknowledgement, not the instructions; call unload when you no longer need the skill." }),
6706
+ unload: Object.freeze({ description: "Unloads one skill you loaded, so its instructions and tools leave from your next step. Example: {\"skill\":\"refunds\"}. A number given as the skill reads as its digits, so {\"skill\":7} unloads the skill \"7\". Replies with a short acknowledgement." }),
6707
6707
  memo: Object.freeze({
6708
- description: "Reads one memo from the memos index and replies with its full text. Example: {\"name\":\"tone\"}. Reading changes nothing; call remember to write a memo.",
6708
+ description: "Reads one memo from the memos index and replies with its full text. Example: {\"name\":\"tone\"}. A number given as the name reads as its digits, so {\"name\":7} reads the memo \"7\". Reading changes nothing; call remember to write a memo.",
6709
6709
  annotations: Object.freeze({
6710
6710
  pure: true,
6711
6711
  untrusted: true
6712
6712
  })
6713
6713
  }),
6714
6714
  remember: Object.freeze({
6715
- description: "Saves one memo under a name you are allowed to write: a one-line description for the memos index, and the content. Example: {\"name\":\"tone\",\"description\":\"Reply tone\",\"content\":\"Keep replies brief, because the user asked for that.\"}. Replies with a short acknowledgement; call memo to read a memo back.",
6715
+ description: "Saves one memo under a name you are allowed to write: a one-line description for the memos index, and the content. Example: {\"name\":\"tone\",\"description\":\"Reply tone\",\"content\":\"Keep replies brief, because the user asked for that.\"}. A number given for any of the three reads as its digits, so a name of 7 saves the memo \"7\". Replies with a short acknowledgement; call memo to read a memo back.",
6716
6716
  annotations: Object.freeze({ consequential: true })
6717
6717
  }),
6718
- switch: Object.freeze({ description: "Selects one workspace from the workspaces index, so its files join your context from your next step. Example: {\"workspace\":\"orders\"}. Replies with a short acknowledgement." })
6718
+ switch: Object.freeze({ description: "Selects one workspace from the workspaces index, so its files join your context from your next step. Example: {\"workspace\":\"orders\"}. A number given as the workspace reads as its digits, so {\"workspace\":7} selects the workspace \"7\". Replies with a short acknowledgement." })
6719
6719
  });
6720
6720
  /**
6721
6721
  * Matches one control, format, line-separator, or paragraph-separator code point — the class
@@ -8605,8 +8605,8 @@ function resolveDisclosure(context, conversation, workspace, ceiling, builtins)
8605
8605
  * {@link findToolCall}. It then folds the pairs in message order: a `load` whose message content
8606
8606
  * equals `BUILTIN_NOTES.loaded` adds its `skill`, an `unload` with `BUILTIN_NOTES.unloaded` removes
8607
8607
  * it, and a `switch` with `BUILTIN_NOTES.switched` selects its `workspace`. Each call's arguments
8608
- * are admitted through the built-in's contract in `builtinToolContracts`, lossless repairs
8609
- * included, as its tool's door admits them, so a `{ skill: 1 }` the door repaired to `'1'` counts
8608
+ * are repaired through the built-in's contract in `builtinToolContracts` by `repairValue`, as
8609
+ * its tool's door repairs them, so a `{ skill: 1 }` the door repaired to `'1'` counts
8610
8610
  * as `'1'`; arguments the contract refuses change nothing. A skill loaded again while shown keeps
8611
8611
  * its place, and one loaded again after its unload goes last. Any other message and a denied or
8612
8612
  * refused call change nothing. The result holds `workspace` only when a switch succeeded.
@@ -8642,9 +8642,9 @@ function collectDisclosure(conversation, builtins) {
8642
8642
  if (call === void 0 || !isAgentBuiltin(name) || !counted.has(name)) return shown;
8643
8643
  const note = name === "load" ? BUILTIN_NOTES.loaded : name === "unload" ? BUILTIN_NOTES.unloaded : BUILTIN_NOTES.switched;
8644
8644
  if (message.content !== note) return shown;
8645
- const admitted = (0, _orkestrel_contract.admitValue)(builtinToolContracts[name].contract, { ...call.arguments });
8646
- const skill = admitted.success ? admitted.value.value["skill"] : void 0;
8647
- const workspace = admitted.success ? admitted.value.value["workspace"] : void 0;
8645
+ const repaired = (0, _orkestrel_contract.repairValue)(builtinToolContracts[name].contract, { ...call.arguments });
8646
+ const skill = repaired.success ? repaired.value.value["skill"] : void 0;
8647
+ const workspace = repaired.success ? repaired.value.value["workspace"] : void 0;
8648
8648
  if (name === "load") return !(0, _orkestrel_contract.isString)(skill) || shown.skills.includes(skill) ? shown : {
8649
8649
  ...shown,
8650
8650
  skills: [...shown.skills, skill]
@@ -13478,7 +13478,7 @@ var Ledger = class {
13478
13478
  }));
13479
13479
  tools.add((0, _orkestrel_tool.createTool)({
13480
13480
  name: "recall",
13481
- description: `Find something said earlier that isn't in the messages you can see, by an owner name, an id, or one of the topics ${renderTopicNames(options.topics)}. Returns statements and lookup findings first, then earlier requests and replies labeled by origin; newest first within each group.`,
13481
+ description: `Find something said earlier that isn't in the messages you can see, by an owner name, an id, or one of the topics ${renderTopicNames(options.topics)}. A number given as the topic reads as its digits, so {"topic":7} searches for "7". Returns statements and lookup findings first, then earlier requests and replies labeled by origin; newest first within each group.`,
13482
13482
  contract: (0, _orkestrel_contract.objectShape)({ topic: (0, _orkestrel_contract.stringShape)({
13483
13483
  min: 1,
13484
13484
  description: "An owner name, an id, or a topic"
@@ -13880,8 +13880,8 @@ var Ledger = class {
13880
13880
  const gauge = this.#gauge;
13881
13881
  if (gauge === void 0) return void 0;
13882
13882
  const room = gauge.remainder(request.calls) - this.#predict;
13883
- const admitted = (0, _orkestrel_contract.admitValue)(builtinToolContracts[name].contract, { ...args });
13884
- const values = admitted.success ? admitted.value.value : {};
13883
+ const repaired = (0, _orkestrel_contract.repairValue)(builtinToolContracts[name].contract, { ...args });
13884
+ const values = repaired.success ? repaired.value.value : {};
13885
13885
  if (name === "remember") {
13886
13886
  const line = (0, _orkestrel_contract.isString)(values["name"]) && (0, _orkestrel_contract.isString)(values["description"]) ? renderIndexEntry({
13887
13887
  name: values["name"],