@ouro.bot/cli 0.1.0-alpha.342 → 0.1.0-alpha.343
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/README.md +5 -5
- package/SerpentGuide.ouro/psyche/identities/the-serpent.md +1 -1
- package/changelog.json +7 -0
- package/dist/heart/attachments/sources/bluebubbles.js +1 -1
- package/dist/heart/attachments/store.js +2 -2
- package/dist/heart/bundle-state.js +1 -1
- package/dist/heart/config-registry.js +2 -2
- package/dist/heart/core.js +10 -2
- package/dist/heart/daemon/agent-service.js +18 -18
- package/dist/heart/daemon/daemon-tombstone.js +1 -1
- package/dist/heart/daemon/daemon.js +2 -2
- package/dist/heart/daemon/hooks/bundle-meta.js +4 -4
- package/dist/heart/hatch/hatch-flow.js +1 -1
- package/dist/heart/hatch/specialist-prompt.js +1 -1
- package/dist/heart/hatch/specialist-tools.js +7 -7
- package/dist/heart/kept-notes.js +357 -0
- package/dist/heart/mcp/mcp-server.js +10 -10
- package/dist/heart/outlook/outlook-http-hooks.js +2 -2
- package/dist/heart/outlook/outlook-http-routes.js +4 -4
- package/dist/heart/outlook/outlook-read.js +3 -3
- package/dist/heart/outlook/readers/continuity-readers.js +3 -3
- package/dist/heart/outlook/readers/runtime-readers.js +2 -2
- package/dist/heart/session-events.js +3 -2
- package/dist/heart/{session-recall.js → session-transcript.js} +4 -4
- package/dist/heart/target-resolution.js +5 -5
- package/dist/heart/tool-description.js +4 -4
- package/dist/mind/diary.js +3 -3
- package/dist/mind/embedding-provider.js +1 -1
- package/dist/mind/file-state.js +1 -1
- package/dist/mind/friends/resolver.js +1 -1
- package/dist/mind/friends/types.js +1 -1
- package/dist/mind/{associative-recall.js → note-search.js} +17 -17
- package/dist/mind/prompt.js +12 -12
- package/dist/nerves/coverage/file-completeness.js +2 -2
- package/dist/outlook-ui/assets/{index-DC7sZefn.js → index-xTdv64BV.js} +2 -2
- package/dist/outlook-ui/index.html +1 -1
- package/dist/repertoire/bitwarden-store.js +1 -1
- package/dist/repertoire/bundle-templates.js +1 -1
- package/dist/repertoire/skills.js +1 -1
- package/dist/repertoire/tools-base.js +3 -3
- package/dist/repertoire/tools-bridge.js +9 -9
- package/dist/repertoire/tools-continuity.js +2 -2
- package/dist/repertoire/{tools-memory.js → tools-notes.js} +6 -6
- package/dist/repertoire/tools-session.js +12 -12
- package/dist/senses/bluebubbles/attachment-cache.js +3 -3
- package/dist/senses/bluebubbles/index.js +1 -1
- package/dist/senses/bluebubbles/media.js +1 -1
- package/dist/senses/cli/image-paste.js +4 -4
- package/dist/senses/inner-dialog.js +2 -2
- package/dist/senses/surface-tool.js +1 -1
- package/package.json +1 -1
- package/skills/agent-commerce.md +1 -1
- package/skills/configure-dev-tools.md +2 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta name="color-scheme" content="dark" />
|
|
7
7
|
<title>Ouro Outlook</title>
|
|
8
8
|
<meta name="description" content="The daemon-hosted shared orientation surface for agents alive on this machine." />
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-xTdv64BV.js"></script>
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/assets/index-LwChZTgL.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* this store authenticates directly as the agent using its own master password.
|
|
7
7
|
* The agent owns the vault, so no human-in-the-loop is needed.
|
|
8
8
|
*
|
|
9
|
-
* Requires the `bw` CLI to be installed. Session tokens are cached
|
|
9
|
+
* Requires the `bw` CLI to be installed. Session tokens are cached process-local.
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.BitwardenCredentialStore = void 0;
|
|
@@ -64,7 +64,7 @@ function listMarkdownBasenames(dir) {
|
|
|
64
64
|
.map((f) => path.basename(f, ".md"))
|
|
65
65
|
.sort();
|
|
66
66
|
}
|
|
67
|
-
//
|
|
67
|
+
// process-local store for loaded skills
|
|
68
68
|
const loadedSkills = [];
|
|
69
69
|
function listSkills() {
|
|
70
70
|
(0, runtime_1.emitNervesEvent)({
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.tools = exports.baseToolDefinitions = exports.editFileReadTracker = exports.renderInnerProgressStatus = exports.restTool = exports.settleTool = exports.observeTool = exports.ponderTool = void 0;
|
|
4
4
|
const tools_files_1 = require("./tools-files");
|
|
5
5
|
const tools_shell_1 = require("./tools-shell");
|
|
6
|
-
const
|
|
6
|
+
const tools_notes_1 = require("./tools-notes");
|
|
7
7
|
const tools_bridge_1 = require("./tools-bridge");
|
|
8
8
|
const tools_session_1 = require("./tools-session");
|
|
9
9
|
const tools_continuity_1 = require("./tools-continuity");
|
|
@@ -29,11 +29,11 @@ Object.defineProperty(exports, "renderInnerProgressStatus", { enumerable: true,
|
|
|
29
29
|
// edit_file requires a file to be read first (must-read-first guard).
|
|
30
30
|
exports.editFileReadTracker = new Set();
|
|
31
31
|
// Combined base tool definitions — assembled from category modules.
|
|
32
|
-
// Order preserved: files, shell,
|
|
32
|
+
// Order preserved: files, shell, notes, bridge, session, continuity, config, coding.
|
|
33
33
|
exports.baseToolDefinitions = [
|
|
34
34
|
...tools_files_1.fileToolDefinitions,
|
|
35
35
|
...tools_shell_1.shellToolDefinitions,
|
|
36
|
-
...
|
|
36
|
+
...tools_notes_1.notesToolDefinitions,
|
|
37
37
|
...tools_bridge_1.bridgeToolDefinitions,
|
|
38
38
|
...tools_session_1.sessionToolDefinitions,
|
|
39
39
|
...tools_continuity_1.continuityToolDefinitions,
|
|
@@ -4,19 +4,19 @@ exports.bridgeToolDefinitions = void 0;
|
|
|
4
4
|
const config_1 = require("../heart/config");
|
|
5
5
|
const manager_1 = require("../heart/bridges/manager");
|
|
6
6
|
const runtime_1 = require("../nerves/runtime");
|
|
7
|
-
const
|
|
7
|
+
const session_transcript_1 = require("../heart/session-transcript");
|
|
8
8
|
const NO_SESSION_FOUND_MESSAGE = "no session found for that friend/channel/key combination.";
|
|
9
9
|
const EMPTY_SESSION_MESSAGE = "session exists but has no non-system messages.";
|
|
10
|
-
async function
|
|
10
|
+
async function summarizeSessionTailSafely(options) {
|
|
11
11
|
try {
|
|
12
|
-
return await (0,
|
|
12
|
+
return await (0, session_transcript_1.summarizeSessionTail)(options);
|
|
13
13
|
}
|
|
14
14
|
catch (error) {
|
|
15
15
|
if (options.summarize) {
|
|
16
16
|
(0, runtime_1.emitNervesEvent)({
|
|
17
17
|
component: "daemon",
|
|
18
|
-
event: "daemon.
|
|
19
|
-
message: "session
|
|
18
|
+
event: "daemon.session_tail_summary_summary_fallback",
|
|
19
|
+
message: "session tail summarization failed; using raw transcript",
|
|
20
20
|
meta: {
|
|
21
21
|
friendId: options.friendId,
|
|
22
22
|
channel: options.channel,
|
|
@@ -26,7 +26,7 @@ async function recallSessionSafely(options) {
|
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
try {
|
|
29
|
-
return await (0,
|
|
29
|
+
return await (0, session_transcript_1.summarizeSessionTail)({
|
|
30
30
|
...options,
|
|
31
31
|
summarize: undefined,
|
|
32
32
|
});
|
|
@@ -95,7 +95,7 @@ exports.bridgeToolDefinitions = [
|
|
|
95
95
|
return "friendId and channel are required for bridge attach.";
|
|
96
96
|
}
|
|
97
97
|
const sessionPath = (0, config_1.resolveSessionPath)(friendId, channel, key);
|
|
98
|
-
const
|
|
98
|
+
const sessionTail = await summarizeSessionTailSafely({
|
|
99
99
|
sessionPath,
|
|
100
100
|
friendId,
|
|
101
101
|
channel,
|
|
@@ -104,7 +104,7 @@ exports.bridgeToolDefinitions = [
|
|
|
104
104
|
trustLevel: ctx?.context?.friend?.trustLevel,
|
|
105
105
|
summarize: ctx?.summarize,
|
|
106
106
|
});
|
|
107
|
-
if (
|
|
107
|
+
if (sessionTail.kind === "missing") {
|
|
108
108
|
return NO_SESSION_FOUND_MESSAGE;
|
|
109
109
|
}
|
|
110
110
|
return (0, manager_1.formatBridgeStatus)(manager.attachSession(bridgeId, {
|
|
@@ -112,7 +112,7 @@ exports.bridgeToolDefinitions = [
|
|
|
112
112
|
channel,
|
|
113
113
|
key,
|
|
114
114
|
sessionPath,
|
|
115
|
-
snapshot:
|
|
115
|
+
snapshot: sessionTail.kind === "ok" ? sessionTail.snapshot : EMPTY_SESSION_MESSAGE,
|
|
116
116
|
}));
|
|
117
117
|
}
|
|
118
118
|
if (action === "status") {
|
|
@@ -14,7 +14,7 @@ exports.continuityToolDefinitions = [
|
|
|
14
14
|
type: "function",
|
|
15
15
|
function: {
|
|
16
16
|
name: "query_episodes",
|
|
17
|
-
description: "Query recent episodes from my continuity
|
|
17
|
+
description: "Query recent episodes from my continuity log. Returns timestamped records of significant events (obligation shifts, coding milestones, bridge events, care events, turning points).",
|
|
18
18
|
parameters: {
|
|
19
19
|
type: "object",
|
|
20
20
|
properties: {
|
|
@@ -200,7 +200,7 @@ exports.continuityToolDefinitions = [
|
|
|
200
200
|
parameters: {
|
|
201
201
|
type: "object",
|
|
202
202
|
properties: {
|
|
203
|
-
content: { type: "string", description: "What I want to
|
|
203
|
+
content: { type: "string", description: "What I want to keep track of" },
|
|
204
204
|
salience: { type: "string", description: "low, medium, or high (default: low)" },
|
|
205
205
|
nudgeAfter: { type: "string", description: "ISO timestamp — nudge me after this time" },
|
|
206
206
|
},
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
36
|
+
exports.notesToolDefinitions = void 0;
|
|
37
37
|
const fs = __importStar(require("fs"));
|
|
38
38
|
const path = __importStar(require("path"));
|
|
39
39
|
const child_process_1 = require("child_process");
|
|
@@ -43,7 +43,7 @@ const identity_1 = require("../heart/identity");
|
|
|
43
43
|
const runtime_1 = require("../nerves/runtime");
|
|
44
44
|
const diary_1 = require("../mind/diary");
|
|
45
45
|
const provenance_trust_1 = require("../mind/provenance-trust");
|
|
46
|
-
exports.
|
|
46
|
+
exports.notesToolDefinitions = [
|
|
47
47
|
{
|
|
48
48
|
tool: {
|
|
49
49
|
type: "function",
|
|
@@ -155,8 +155,8 @@ exports.memoryToolDefinitions = [
|
|
|
155
155
|
tool: {
|
|
156
156
|
type: "function",
|
|
157
157
|
function: {
|
|
158
|
-
name: "
|
|
159
|
-
description: "Search my diary and journal for facts, thoughts, and working notes matching a query. Uses semantic similarity -- phrasing matters. Try different angles if the first query doesn't find what you're looking for.
|
|
158
|
+
name: "search_notes",
|
|
159
|
+
description: "Search my diary and journal for facts, thoughts, and working notes matching a query. Uses semantic similarity -- phrasing matters. Try different angles if the first query doesn't find what you're looking for. Search written notes before asking the human something the notes may already answer.",
|
|
160
160
|
parameters: {
|
|
161
161
|
type: "object",
|
|
162
162
|
properties: { query: { type: "string" } },
|
|
@@ -195,7 +195,7 @@ exports.memoryToolDefinitions = [
|
|
|
195
195
|
// Substring match on preview and filename
|
|
196
196
|
const lowerQuery = query.toLowerCase();
|
|
197
197
|
for (const entry of journalEntries) {
|
|
198
|
-
/* v8 ignore next 4 -- both sides tested (filename-only match in
|
|
198
|
+
/* v8 ignore next 4 -- both sides tested (filename-only match in search_notes-journal.test.ts); v8 misreports || short-circuit @preserve */
|
|
199
199
|
if (entry.preview.toLowerCase().includes(lowerQuery) ||
|
|
200
200
|
entry.filename.toLowerCase().includes(lowerQuery)) {
|
|
201
201
|
resultLines.push(`[journal] ${entry.filename}: ${entry.preview}`);
|
|
@@ -219,7 +219,7 @@ exports.memoryToolDefinitions = [
|
|
|
219
219
|
type: "function",
|
|
220
220
|
function: {
|
|
221
221
|
name: "diary_write",
|
|
222
|
-
description: "Write an entry in my diary -- something I learned, noticed, or concluded that I want
|
|
222
|
+
description: "Write an entry in my diary -- something I learned, noticed, or concluded that I want available later. Use 'about' to tag the entry to a person, topic, or context. Write for my future self: include enough context that the entry makes sense without the surrounding conversation. Prefer durable conclusions over passing noise. Don't duplicate what already belongs in friend notes.",
|
|
223
223
|
parameters: {
|
|
224
224
|
type: "object",
|
|
225
225
|
properties: {
|
|
@@ -43,7 +43,7 @@ const runtime_1 = require("../nerves/runtime");
|
|
|
43
43
|
const socket_client_1 = require("../heart/daemon/socket-client");
|
|
44
44
|
const thoughts_1 = require("../heart/daemon/thoughts");
|
|
45
45
|
const manager_1 = require("../heart/bridges/manager");
|
|
46
|
-
const
|
|
46
|
+
const session_transcript_1 = require("../heart/session-transcript");
|
|
47
47
|
const session_activity_1 = require("../heart/session-activity");
|
|
48
48
|
const active_work_1 = require("../heart/active-work");
|
|
49
49
|
const coding_1 = require("./coding");
|
|
@@ -54,16 +54,16 @@ const progress_story_1 = require("../heart/progress-story");
|
|
|
54
54
|
const cross_chat_delivery_1 = require("../heart/cross-chat-delivery");
|
|
55
55
|
const NO_SESSION_FOUND_MESSAGE = "no session found for that friend/channel/key combination.";
|
|
56
56
|
const EMPTY_SESSION_MESSAGE = "session exists but has no non-system messages.";
|
|
57
|
-
async function
|
|
57
|
+
async function summarizeSessionTailSafely(options) {
|
|
58
58
|
try {
|
|
59
|
-
return await (0,
|
|
59
|
+
return await (0, session_transcript_1.summarizeSessionTail)(options);
|
|
60
60
|
}
|
|
61
61
|
catch (error) {
|
|
62
62
|
if (options.summarize) {
|
|
63
63
|
(0, runtime_1.emitNervesEvent)({
|
|
64
64
|
component: "daemon",
|
|
65
|
-
event: "daemon.
|
|
66
|
-
message: "session
|
|
65
|
+
event: "daemon.session_tail_summary_summary_fallback",
|
|
66
|
+
message: "session tail summarization failed; using raw transcript",
|
|
67
67
|
meta: {
|
|
68
68
|
friendId: options.friendId,
|
|
69
69
|
channel: options.channel,
|
|
@@ -72,11 +72,11 @@ async function recallSessionSafely(options) {
|
|
|
72
72
|
},
|
|
73
73
|
});
|
|
74
74
|
try {
|
|
75
|
-
return await (0,
|
|
75
|
+
return await (0, session_transcript_1.summarizeSessionTail)({
|
|
76
76
|
...options,
|
|
77
77
|
summarize: undefined,
|
|
78
78
|
});
|
|
79
|
-
/* v8 ignore start -- defensive: session
|
|
79
|
+
/* v8 ignore start -- defensive: session tail fallback @preserve */
|
|
80
80
|
}
|
|
81
81
|
catch {
|
|
82
82
|
return { kind: "missing" };
|
|
@@ -88,7 +88,7 @@ async function recallSessionSafely(options) {
|
|
|
88
88
|
}
|
|
89
89
|
async function searchSessionSafely(options) {
|
|
90
90
|
try {
|
|
91
|
-
return await (0,
|
|
91
|
+
return await (0, session_transcript_1.searchSessionTranscript)(options);
|
|
92
92
|
}
|
|
93
93
|
catch {
|
|
94
94
|
return { kind: "missing" };
|
|
@@ -398,7 +398,7 @@ exports.sessionToolDefinitions = [
|
|
|
398
398
|
].join("\n\n");
|
|
399
399
|
}
|
|
400
400
|
const sessFile = (0, config_1.resolveSessionPath)(friendId, channel, key);
|
|
401
|
-
const
|
|
401
|
+
const sessionTail = await summarizeSessionTailSafely({
|
|
402
402
|
sessionPath: sessFile,
|
|
403
403
|
friendId,
|
|
404
404
|
channel,
|
|
@@ -407,13 +407,13 @@ exports.sessionToolDefinitions = [
|
|
|
407
407
|
trustLevel: ctx?.context?.friend?.trustLevel,
|
|
408
408
|
summarize: ctx?.summarize,
|
|
409
409
|
});
|
|
410
|
-
if (
|
|
410
|
+
if (sessionTail.kind === "missing") {
|
|
411
411
|
return NO_SESSION_FOUND_MESSAGE;
|
|
412
412
|
}
|
|
413
|
-
if (
|
|
413
|
+
if (sessionTail.kind === "empty") {
|
|
414
414
|
return EMPTY_SESSION_MESSAGE;
|
|
415
415
|
}
|
|
416
|
-
return
|
|
416
|
+
return sessionTail.summary;
|
|
417
417
|
},
|
|
418
418
|
},
|
|
419
419
|
{
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.cacheBlueBubblesAttachment = cacheBlueBubblesAttachment;
|
|
4
4
|
exports.lookupBlueBubblesAttachment = lookupBlueBubblesAttachment;
|
|
5
5
|
exports.resetBlueBubblesAttachmentCache = resetBlueBubblesAttachmentCache;
|
|
6
6
|
const runtime_1 = require("../../nerves/runtime");
|
|
7
7
|
/**
|
|
8
|
-
* Bounded
|
|
8
|
+
* Bounded process-local cache of recently-seen BlueBubbles attachment summaries.
|
|
9
9
|
*
|
|
10
10
|
* Populated at attachment-hydration time so the `describe_image` tool can
|
|
11
11
|
* look up a guid → summary later in the same turn (or a few turns later)
|
|
@@ -20,7 +20,7 @@ const runtime_1 = require("../../nerves/runtime");
|
|
|
20
20
|
*/
|
|
21
21
|
const MAX_CACHED_ATTACHMENTS = 50;
|
|
22
22
|
const cache = new Map();
|
|
23
|
-
function
|
|
23
|
+
function cacheBlueBubblesAttachment(summary) {
|
|
24
24
|
const guid = summary.guid?.trim();
|
|
25
25
|
if (!guid)
|
|
26
26
|
return;
|
|
@@ -269,7 +269,7 @@ function buildConversationScopePrefix(event, existingMessages, repliedToText) {
|
|
|
269
269
|
if (repliedToText) {
|
|
270
270
|
lines.push(`[replying to: "${repliedToText}"]`);
|
|
271
271
|
}
|
|
272
|
-
lines.push(`[if you need more context about what was being discussed, use query_session to search your session history, or
|
|
272
|
+
lines.push(`[if you need more context about what was being discussed, use query_session to search your session history, or search_notes to search diary/journal notes.]`);
|
|
273
273
|
}
|
|
274
274
|
else {
|
|
275
275
|
lines.push("[conversation scope: existing chat trunk | current inbound lane: top_level | default outbound target for this turn: top_level]");
|
|
@@ -257,7 +257,7 @@ async function hydrateBlueBubblesAttachments(attachments, config, channelConfig,
|
|
|
257
257
|
for (const attachment of attachments) {
|
|
258
258
|
const name = describeAttachment(attachment);
|
|
259
259
|
const initialRecord = attachment.guid?.trim()
|
|
260
|
-
? (0, store_1.
|
|
260
|
+
? (0, store_1.cacheRecentAttachment)(agentName, (0, bluebubbles_1.buildBlueBubblesAttachmentRecord)(attachment), agentRoot)
|
|
261
261
|
: null;
|
|
262
262
|
try {
|
|
263
263
|
const downloaded = await (0, attachment_download_1.downloadBlueBubblesAttachment)(attachment, config, channelConfig, fetchImpl);
|
|
@@ -231,7 +231,7 @@ async function resolveImageContent(text, images) {
|
|
|
231
231
|
const agentName = (0, identity_1.getAgentName)();
|
|
232
232
|
const agentRoot = (0, identity_1.getAgentRoot)(agentName);
|
|
233
233
|
const parts = [];
|
|
234
|
-
const
|
|
234
|
+
const cachedAttachments = [];
|
|
235
235
|
// Read all images in parallel
|
|
236
236
|
const entries = Array.from(images.entries());
|
|
237
237
|
const results = await Promise.all(entries.map(async ([, absolutePath]) => {
|
|
@@ -241,12 +241,12 @@ async function resolveImageContent(text, images) {
|
|
|
241
241
|
const sourcePath = image.fromClipboard || !await pathExists(absolutePath)
|
|
242
242
|
? await persistClipboardImage(agentRoot, absolutePath, image)
|
|
243
243
|
: absolutePath;
|
|
244
|
-
const attachment = (0, store_1.
|
|
244
|
+
const attachment = (0, store_1.cacheRecentAttachment)(agentName, (0, cli_local_file_1.buildCliLocalFileAttachmentRecord)({
|
|
245
245
|
path: sourcePath,
|
|
246
246
|
mimeType: image.mediaType,
|
|
247
247
|
byteCount: image.buffer.length,
|
|
248
248
|
}), agentRoot);
|
|
249
|
-
|
|
249
|
+
cachedAttachments.push(attachment);
|
|
250
250
|
try {
|
|
251
251
|
const materialized = await (0, materialize_1.materializeAttachment)(agentName, attachment.id, {
|
|
252
252
|
agentRoot,
|
|
@@ -276,7 +276,7 @@ async function resolveImageContent(text, images) {
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
// Always include the text part
|
|
279
|
-
const attachmentBlock = (0, render_1.renderAttachmentBlock)(
|
|
279
|
+
const attachmentBlock = (0, render_1.renderAttachmentBlock)(cachedAttachments);
|
|
280
280
|
const textWithAttachments = [text, attachmentBlock].filter(Boolean).join("\n");
|
|
281
281
|
parts.push({ type: "text", text: textWithAttachments || text });
|
|
282
282
|
// If no images resolved, return just text
|
|
@@ -127,7 +127,7 @@ function buildInstinctUserMessage(instincts, _reason, state) {
|
|
|
127
127
|
const checkpoint = displayCheckpoint(state.checkpoint);
|
|
128
128
|
const lines = [active.prompt];
|
|
129
129
|
if (checkpoint) {
|
|
130
|
-
lines.push(`\nlast
|
|
130
|
+
lines.push(`\nlast checkpoint: ${checkpoint}`);
|
|
131
131
|
}
|
|
132
132
|
return lines.join("\n");
|
|
133
133
|
}
|
|
@@ -156,7 +156,7 @@ function buildTaskTriggeredMessage(taskId, taskContent, checkpoint) {
|
|
|
156
156
|
}
|
|
157
157
|
const renderedCheckpoint = displayCheckpoint(checkpoint);
|
|
158
158
|
if (renderedCheckpoint) {
|
|
159
|
-
lines.push("", `last
|
|
159
|
+
lines.push("", `last checkpoint: ${renderedCheckpoint}`);
|
|
160
160
|
}
|
|
161
161
|
return lines.join("\n");
|
|
162
162
|
}
|
|
@@ -38,7 +38,7 @@ async function handleSurface(input) {
|
|
|
38
38
|
});
|
|
39
39
|
// On successful routing with delegationId:
|
|
40
40
|
// 1. Advance obligation to "returned" (disk FIRST — crash safety)
|
|
41
|
-
// 2. Dequeue from
|
|
41
|
+
// 2. Dequeue from process-local queue (AFTER obligation advance)
|
|
42
42
|
if (delegationId && queueItem && result.status !== "failed") {
|
|
43
43
|
if (queueItem.obligationId) {
|
|
44
44
|
advanceObligation(queueItem.obligationId, {
|
package/package.json
CHANGED
package/skills/agent-commerce.md
CHANGED
|
@@ -84,7 +84,7 @@ Card numbers must NEVER appear in:
|
|
|
84
84
|
- Tool return values shown to the model
|
|
85
85
|
- Nerves events or logs
|
|
86
86
|
- Chat messages to the human
|
|
87
|
-
- Any stored state or
|
|
87
|
+
- Any stored state or written notes
|
|
88
88
|
|
|
89
89
|
The only place card numbers exist is inside the Stripe client's internal payment flow functions, scoped to a single function call. The model only ever sees card IDs and last-4 digits.
|
|
90
90
|
|
|
@@ -43,11 +43,11 @@ Once connected, these tools are available:
|
|
|
43
43
|
- **check_response** -- Check for pending messages from the agent (after ponder or proactive surface)
|
|
44
44
|
|
|
45
45
|
### Read-only tools
|
|
46
|
-
- **ask** -- Ask the agent a question (uses
|
|
46
|
+
- **ask** -- Ask the agent a question (uses diary, journal, and context)
|
|
47
47
|
- **status** -- Get agent's current status and activity
|
|
48
48
|
- **catchup** -- Get recent activity summary
|
|
49
49
|
- **get_context** -- Get agent's current working context
|
|
50
|
-
- **
|
|
50
|
+
- **search_notes** -- Search the agent's diary for specific topics
|
|
51
51
|
- **get_task** -- Get details of the agent's current task
|
|
52
52
|
- **check_scope** -- Verify if something is in scope for current work
|
|
53
53
|
- **check_guidance** -- Get guidance on how to approach something
|