@synap-core/cli 1.12.2 → 1.13.0
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/LICENSE +21 -0
- package/README.md +25 -8
- package/dist/build-info.json +2 -2
- package/dist/commands/agents.d.ts +0 -1
- package/dist/commands/agents.js +1 -1
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/app.js +2 -1
- package/dist/commands/app.js.map +1 -1
- package/dist/commands/automation.js +46 -41
- package/dist/commands/automation.js.map +1 -1
- package/dist/commands/box.d.ts +42 -0
- package/dist/commands/box.js +89 -0
- package/dist/commands/box.js.map +1 -0
- package/dist/commands/bridge-setup.js +3 -1
- package/dist/commands/bridge-setup.js.map +1 -1
- package/dist/commands/capability.d.ts +1 -1
- package/dist/commands/capability.js +57 -34
- package/dist/commands/capability.js.map +1 -1
- package/dist/commands/close-questions.d.ts +27 -0
- package/dist/commands/close-questions.js +49 -0
- package/dist/commands/close-questions.js.map +1 -0
- package/dist/commands/close-questions.test.d.ts +1 -0
- package/dist/commands/close-questions.test.js +52 -0
- package/dist/commands/close-questions.test.js.map +1 -0
- package/dist/commands/connect.d.ts +1 -3
- package/dist/commands/connect.js +2 -2
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/context.js +72 -43
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/data-extra.js +12 -4
- package/dist/commands/data-extra.js.map +1 -1
- package/dist/commands/data.js +2 -1
- package/dist/commands/data.js.map +1 -1
- package/dist/commands/doctor.d.ts +21 -0
- package/dist/commands/doctor.js +108 -13
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/hooks.d.ts +19 -0
- package/dist/commands/hooks.js +70 -0
- package/dist/commands/hooks.js.map +1 -0
- package/dist/commands/import.d.ts +25 -0
- package/dist/commands/import.js +98 -12
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/init.d.ts +14 -0
- package/dist/commands/init.js +59 -19
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/knowledge.js +4 -2
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/lens.js +2 -1
- package/dist/commands/lens.js.map +1 -1
- package/dist/commands/market-authoring.js +1 -1
- package/dist/commands/market-authoring.js.map +1 -1
- package/dist/commands/mcp.js +2 -2
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/observe.category.test.d.ts +1 -0
- package/dist/commands/observe.category.test.js +59 -0
- package/dist/commands/observe.category.test.js.map +1 -0
- package/dist/commands/observe.d.ts +3 -0
- package/dist/commands/observe.js +7 -5
- package/dist/commands/observe.js.map +1 -1
- package/dist/commands/observe.title.test.d.ts +1 -0
- package/dist/commands/observe.title.test.js +37 -0
- package/dist/commands/observe.title.test.js.map +1 -0
- package/dist/commands/playbook.js +9 -0
- package/dist/commands/playbook.js.map +1 -1
- package/dist/commands/pods.d.ts +6 -1
- package/dist/commands/pods.js +32 -15
- package/dist/commands/pods.js.map +1 -1
- package/dist/commands/proton-setup.js +3 -1
- package/dist/commands/proton-setup.js.map +1 -1
- package/dist/commands/session-feed-wait.d.ts +48 -0
- package/dist/commands/session-feed-wait.js +261 -0
- package/dist/commands/session-feed-wait.js.map +1 -0
- package/dist/commands/session-post.d.ts +40 -0
- package/dist/commands/session-post.js +96 -0
- package/dist/commands/session-post.js.map +1 -0
- package/dist/commands/session-wait.d.ts +9 -4
- package/dist/commands/session-wait.js +20 -5
- package/dist/commands/session-wait.js.map +1 -1
- package/dist/commands/sessions.d.ts +2 -0
- package/dist/commands/sessions.js +23 -0
- package/dist/commands/sessions.js.map +1 -1
- package/dist/commands/skills-commands.d.ts +2 -0
- package/dist/commands/skills-commands.js +9 -1
- package/dist/commands/skills-commands.js.map +1 -1
- package/dist/commands/skills-commands.test.d.ts +1 -0
- package/dist/commands/skills-commands.test.js +57 -0
- package/dist/commands/skills-commands.test.js.map +1 -0
- package/dist/commands/status.js +1 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/template.d.ts +42 -0
- package/dist/commands/template.js +191 -0
- package/dist/commands/template.js.map +1 -0
- package/dist/commands/tracks.d.ts +67 -6
- package/dist/commands/tracks.js +268 -16
- package/dist/commands/tracks.js.map +1 -1
- package/dist/commands/whoami.d.ts +7 -0
- package/dist/commands/whoami.js +17 -0
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/worker-accounts.d.ts +149 -0
- package/dist/commands/worker-accounts.js +339 -0
- package/dist/commands/worker-accounts.js.map +1 -0
- package/dist/commands/worker-accounts.test.d.ts +1 -0
- package/dist/commands/worker-accounts.test.js +224 -0
- package/dist/commands/worker-accounts.test.js.map +1 -0
- package/dist/commands/worker.d.ts +219 -10
- package/dist/commands/worker.js +749 -117
- package/dist/commands/worker.js.map +1 -1
- package/dist/commands/worker.test.js +321 -10
- package/dist/commands/worker.test.js.map +1 -1
- package/dist/index.js +164 -27
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-door.d.ts +1 -3
- package/dist/lib/agent-door.js +10 -7
- package/dist/lib/agent-door.js.map +1 -1
- package/dist/lib/auth.d.ts +3 -2
- package/dist/lib/auth.js +3 -3
- package/dist/lib/auth.js.map +1 -1
- package/dist/lib/box/egress.d.ts +82 -0
- package/dist/lib/box/egress.js +264 -0
- package/dist/lib/box/egress.js.map +1 -0
- package/dist/lib/box/evidence.d.ts +86 -0
- package/dist/lib/box/evidence.js +121 -0
- package/dist/lib/box/evidence.js.map +1 -0
- package/dist/lib/box/job-server.d.ts +72 -0
- package/dist/lib/box/job-server.js +246 -0
- package/dist/lib/box/job-server.js.map +1 -0
- package/dist/lib/box/provisioner.d.ts +83 -0
- package/dist/lib/box/provisioner.js +312 -0
- package/dist/lib/box/provisioner.js.map +1 -0
- package/dist/lib/box/proxmox.d.ts +112 -0
- package/dist/lib/box/proxmox.js +211 -0
- package/dist/lib/box/proxmox.js.map +1 -0
- package/dist/lib/box/wire.d.ts +98 -0
- package/dist/lib/box/wire.js +70 -0
- package/dist/lib/box/wire.js.map +1 -0
- package/dist/lib/browser-auth.d.ts +35 -0
- package/dist/lib/browser-auth.js +170 -0
- package/dist/lib/browser-auth.js.map +1 -0
- package/dist/lib/client-header.test.d.ts +1 -0
- package/dist/lib/client-header.test.js +85 -0
- package/dist/lib/client-header.test.js.map +1 -0
- package/dist/lib/conversation-headers.d.ts +24 -9
- package/dist/lib/conversation-headers.js +40 -3
- package/dist/lib/conversation-headers.js.map +1 -1
- package/dist/lib/credential-class.d.ts +28 -1
- package/dist/lib/credential-class.js +28 -6
- package/dist/lib/credential-class.js.map +1 -1
- package/dist/lib/exporter-coverage.d.ts +1 -1
- package/dist/lib/exporter-coverage.js +1 -1
- package/dist/lib/goal-words.d.ts +38 -0
- package/dist/lib/goal-words.js +112 -0
- package/dist/lib/goal-words.js.map +1 -0
- package/dist/lib/hub-client.d.ts +28 -7
- package/dist/lib/hub-client.js +75 -34
- package/dist/lib/hub-client.js.map +1 -1
- package/dist/lib/init-handoff.d.ts +8 -0
- package/dist/lib/init-handoff.js +9 -2
- package/dist/lib/init-handoff.js.map +1 -1
- package/dist/lib/key-source.d.ts +3 -1
- package/dist/lib/key-source.js +7 -4
- package/dist/lib/key-source.js.map +1 -1
- package/dist/lib/knowledge-title.d.ts +3 -2
- package/dist/lib/knowledge-title.js +3 -2
- package/dist/lib/knowledge-title.js.map +1 -1
- package/dist/lib/mcp-bridge.d.ts +7 -0
- package/dist/lib/mcp-bridge.js +34 -1
- package/dist/lib/mcp-bridge.js.map +1 -1
- package/dist/lib/mcp-bridge.test.js +31 -3
- package/dist/lib/mcp-bridge.test.js.map +1 -1
- package/dist/lib/openclaw.d.ts +32 -0
- package/dist/lib/openclaw.js +165 -0
- package/dist/lib/openclaw.js.map +1 -0
- package/dist/lib/pod-moved.d.ts +70 -0
- package/dist/lib/pod-moved.js +146 -0
- package/dist/lib/pod-moved.js.map +1 -0
- package/dist/lib/pod-reach.d.ts +39 -0
- package/dist/lib/pod-reach.js +117 -0
- package/dist/lib/pod-reach.js.map +1 -0
- package/dist/lib/pod-reach.test.d.ts +1 -0
- package/dist/lib/pod-reach.test.js +67 -0
- package/dist/lib/pod-reach.test.js.map +1 -0
- package/dist/lib/pod.d.ts +8 -0
- package/dist/lib/pod.js +12 -3
- package/dist/lib/pod.js.map +1 -1
- package/dist/lib/register-claude-code-mcp.test.d.ts +1 -0
- package/dist/lib/register-claude-code-mcp.test.js +78 -0
- package/dist/lib/register-claude-code-mcp.test.js.map +1 -0
- package/dist/lib/review-credential.js +3 -1
- package/dist/lib/review-credential.js.map +1 -1
- package/dist/lib/seed.d.ts +13 -0
- package/dist/lib/seed.js +135 -0
- package/dist/lib/seed.js.map +1 -0
- package/dist/lib/session-feed.d.ts +185 -0
- package/dist/lib/session-feed.js +257 -0
- package/dist/lib/session-feed.js.map +1 -0
- package/dist/lib/targets.d.ts +21 -3
- package/dist/lib/targets.js +52 -107
- package/dist/lib/targets.js.map +1 -1
- package/dist/lib/wake-hook-settings.d.ts +57 -0
- package/dist/lib/wake-hook-settings.js +153 -0
- package/dist/lib/wake-hook-settings.js.map +1 -0
- package/dist/lib/wake-state.d.ts +65 -0
- package/dist/lib/wake-state.js +122 -0
- package/dist/lib/wake-state.js.map +1 -0
- package/package.json +5 -2
- package/skills/README.md +1 -1
- package/skills/agent-os/SKILL.md +8 -8
- package/skills/synap/SKILL.md +141 -84
- package/skills/synap/code-skills.md +70 -0
- package/skills/synap/concepts.md +28 -20
- package/skills/synap/creative-loop.md +1 -1
- package/skills/synap/document-embeds.md +3 -1
- package/skills/synap/focus-sessions.md +16 -7
- package/skills/synap/from-intent.md +32 -16
- package/skills/synap/governance-rules.md +1 -1
- package/skills/synap/lenses.md +4 -4
- package/skills/synap/linking.md +2 -2
- package/skills/synap/mental-model.md +1 -1
- package/skills/synap/operating-mode-rules.md +1 -1
- package/skills/synap/quick-reference.md +2 -1
- package/skills/synap/reflexes.md +6 -6
- package/skills/synap/viewframe-cells.md +1 -1
- package/skills/synap/work-model.md +24 -10
- package/skills/synap/workspace-design.md +5 -5
- package/skills/synap/writes.md +16 -9
- package/skills/synap-app/SKILL.md +148 -66
- package/skills/synap-app/creating-the-base-app.md +12 -7
- package/skills/synap-app/governance.md +27 -16
- package/skills/synap-app/install-commands.md +18 -9
- package/skills/synap-app/overview.md +16 -9
- package/skills/synap-app/using-the-sdk.md +75 -25
- package/skills/synap-schema/SKILL.md +21 -21
- package/skills/synap-schema/intent-vocabulary-ssot.md +21 -21
- package/templates/box/runner.py +206 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The wake hook's memory between runs — `~/.synap/wake/<key>.json`.
|
|
3
|
+
*
|
|
4
|
+
* Claude Code runs an `asyncRewake` Stop hook as a NEW background process on
|
|
5
|
+
* every Stop, and never kills the previous one ("Each execution creates a
|
|
6
|
+
* separate background process", code.claude.com/docs/en/hooks). So two waiters
|
|
7
|
+
* for one terminal overlap whenever the person types again before the first
|
|
8
|
+
* gives up. This file keeps them honest:
|
|
9
|
+
*
|
|
10
|
+
* - `owner`: the newest waiter's token. An older waiter sees it change and
|
|
11
|
+
* exits quietly at its next read — the terminal has one doorbell, not two.
|
|
12
|
+
* - `since`: the feed cursor, so the next run resumes where the last one
|
|
13
|
+
* read (never a replay, never a gap) — the pod's `nextSince`.
|
|
14
|
+
* - `delivered`: event ids already handed to the agent, so an older waiter
|
|
15
|
+
* whose read was in flight and a newer one cannot both wake it for the
|
|
16
|
+
* same event.
|
|
17
|
+
* - `carried`: events read (and so marked read by the pod) that do not wake
|
|
18
|
+
* — an fyi, a done, a held wake — kept until the next wake shows them.
|
|
19
|
+
*
|
|
20
|
+
* Best-effort by design: a lost write costs at most one duplicate line, and a
|
|
21
|
+
* file that cannot be read is a fresh start, never a crash in someone's hook.
|
|
22
|
+
* The read-modify-writes are unlocked: two waiters racing inside the same
|
|
23
|
+
* milliseconds can both wake the agent once.
|
|
24
|
+
*
|
|
25
|
+
* Stated limits, both from the pod's contract rather than this file:
|
|
26
|
+
* - the pod marks a message read when it HANDS it out (there is no ack), so
|
|
27
|
+
* a hook killed between that read and its stderr write (the session ended,
|
|
28
|
+
* the hook's timeout) loses that one wake — the message stays in the room;
|
|
29
|
+
* - after the first run the hook reads in CURSOR mode (`since`), which sees
|
|
30
|
+
* owner messages written while the agent worked its turn, but not a post
|
|
31
|
+
* whose row commits after a concurrent read already moved the cursor past
|
|
32
|
+
* its timestamp (unread mode would; it would also drop those owner messages).
|
|
33
|
+
*/
|
|
34
|
+
import type { SessionFeedEvent } from "./session-feed.js";
|
|
35
|
+
export interface WakeState {
|
|
36
|
+
owner?: string;
|
|
37
|
+
pid?: number;
|
|
38
|
+
since?: string | null;
|
|
39
|
+
delivered?: string[];
|
|
40
|
+
carried?: SessionFeedEvent[];
|
|
41
|
+
updatedAt?: string;
|
|
42
|
+
}
|
|
43
|
+
/** One file per (Claude Code conversation, focus session). */
|
|
44
|
+
export declare function wakeStatePath(conversationId: string | undefined, sessionId: string): string;
|
|
45
|
+
export declare function readWakeState(file: string): WakeState;
|
|
46
|
+
/** Claim the doorbell: this run becomes the owner. Returns its token. */
|
|
47
|
+
export declare function claimWake(file: string): string;
|
|
48
|
+
export declare function isWakeOwner(file: string, owner: string): boolean;
|
|
49
|
+
/** Advance the cursor (never backwards) and carry events that did not wake. */
|
|
50
|
+
export declare function recordRead(file: string, p: {
|
|
51
|
+
since: string | null;
|
|
52
|
+
carry?: SessionFeedEvent[];
|
|
53
|
+
}): void;
|
|
54
|
+
/**
|
|
55
|
+
* Hand events to the agent: drop any already delivered (by another waiter),
|
|
56
|
+
* mark the rest delivered, and release the carried ones with them. Returns
|
|
57
|
+
* what to show; `events` empty = someone else already woke the agent for them.
|
|
58
|
+
*/
|
|
59
|
+
export declare function takeDelivery(file: string, p: {
|
|
60
|
+
events: SessionFeedEvent[];
|
|
61
|
+
since: string | null;
|
|
62
|
+
}): {
|
|
63
|
+
events: SessionFeedEvent[];
|
|
64
|
+
carried: SessionFeedEvent[];
|
|
65
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The wake hook's memory between runs — `~/.synap/wake/<key>.json`.
|
|
3
|
+
*
|
|
4
|
+
* Claude Code runs an `asyncRewake` Stop hook as a NEW background process on
|
|
5
|
+
* every Stop, and never kills the previous one ("Each execution creates a
|
|
6
|
+
* separate background process", code.claude.com/docs/en/hooks). So two waiters
|
|
7
|
+
* for one terminal overlap whenever the person types again before the first
|
|
8
|
+
* gives up. This file keeps them honest:
|
|
9
|
+
*
|
|
10
|
+
* - `owner`: the newest waiter's token. An older waiter sees it change and
|
|
11
|
+
* exits quietly at its next read — the terminal has one doorbell, not two.
|
|
12
|
+
* - `since`: the feed cursor, so the next run resumes where the last one
|
|
13
|
+
* read (never a replay, never a gap) — the pod's `nextSince`.
|
|
14
|
+
* - `delivered`: event ids already handed to the agent, so an older waiter
|
|
15
|
+
* whose read was in flight and a newer one cannot both wake it for the
|
|
16
|
+
* same event.
|
|
17
|
+
* - `carried`: events read (and so marked read by the pod) that do not wake
|
|
18
|
+
* — an fyi, a done, a held wake — kept until the next wake shows them.
|
|
19
|
+
*
|
|
20
|
+
* Best-effort by design: a lost write costs at most one duplicate line, and a
|
|
21
|
+
* file that cannot be read is a fresh start, never a crash in someone's hook.
|
|
22
|
+
* The read-modify-writes are unlocked: two waiters racing inside the same
|
|
23
|
+
* milliseconds can both wake the agent once.
|
|
24
|
+
*
|
|
25
|
+
* Stated limits, both from the pod's contract rather than this file:
|
|
26
|
+
* - the pod marks a message read when it HANDS it out (there is no ack), so
|
|
27
|
+
* a hook killed between that read and its stderr write (the session ended,
|
|
28
|
+
* the hook's timeout) loses that one wake — the message stays in the room;
|
|
29
|
+
* - after the first run the hook reads in CURSOR mode (`since`), which sees
|
|
30
|
+
* owner messages written while the agent worked its turn, but not a post
|
|
31
|
+
* whose row commits after a concurrent read already moved the cursor past
|
|
32
|
+
* its timestamp (unread mode would; it would also drop those owner messages).
|
|
33
|
+
*/
|
|
34
|
+
import fs from "node:fs";
|
|
35
|
+
import os from "node:os";
|
|
36
|
+
import path from "node:path";
|
|
37
|
+
import { randomBytes } from "node:crypto";
|
|
38
|
+
import { writeFileAtomic } from "./atomic-file.js";
|
|
39
|
+
/** Ids remembered as delivered (the newest win). */
|
|
40
|
+
const DELIVERED_MAX = 200;
|
|
41
|
+
/** Events carried to the next wake (the newest win). */
|
|
42
|
+
const CARRIED_MAX = 20;
|
|
43
|
+
function wakeDir() {
|
|
44
|
+
return path.join(os.homedir(), ".synap", "wake");
|
|
45
|
+
}
|
|
46
|
+
/** One file per (Claude Code conversation, focus session). */
|
|
47
|
+
export function wakeStatePath(conversationId, sessionId) {
|
|
48
|
+
const safe = (s) => s.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
49
|
+
return path.join(wakeDir(), `${safe(conversationId ?? "terminal")}__${safe(sessionId)}.json`);
|
|
50
|
+
}
|
|
51
|
+
export function readWakeState(file) {
|
|
52
|
+
try {
|
|
53
|
+
const v = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
54
|
+
return v && typeof v === "object" && !Array.isArray(v) ? v : {};
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return {};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function writeWakeState(file, state) {
|
|
61
|
+
try {
|
|
62
|
+
writeFileAtomic(file, JSON.stringify({ ...state, updatedAt: new Date().toISOString() }, null, 2) + "\n", {
|
|
63
|
+
mode: 0o600,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
/* best-effort — see the header */
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/** The later of two millisecond ISO cursors (they compare as strings). */
|
|
71
|
+
function laterCursor(a, b) {
|
|
72
|
+
if (!a)
|
|
73
|
+
return b ?? null;
|
|
74
|
+
if (!b)
|
|
75
|
+
return a;
|
|
76
|
+
return a > b ? a : b;
|
|
77
|
+
}
|
|
78
|
+
/** Claim the doorbell: this run becomes the owner. Returns its token. */
|
|
79
|
+
export function claimWake(file) {
|
|
80
|
+
const owner = randomBytes(8).toString("hex");
|
|
81
|
+
writeWakeState(file, { ...readWakeState(file), owner, pid: process.pid });
|
|
82
|
+
return owner;
|
|
83
|
+
}
|
|
84
|
+
export function isWakeOwner(file, owner) {
|
|
85
|
+
return readWakeState(file).owner === owner;
|
|
86
|
+
}
|
|
87
|
+
/** Advance the cursor (never backwards) and carry events that did not wake. */
|
|
88
|
+
export function recordRead(file, p) {
|
|
89
|
+
const s = readWakeState(file);
|
|
90
|
+
const delivered = new Set(s.delivered ?? []);
|
|
91
|
+
const carried = [...(s.carried ?? [])];
|
|
92
|
+
for (const e of p.carry ?? []) {
|
|
93
|
+
if (!delivered.has(e.id) && !carried.some((c) => c.id === e.id))
|
|
94
|
+
carried.push(e);
|
|
95
|
+
}
|
|
96
|
+
writeWakeState(file, {
|
|
97
|
+
...s,
|
|
98
|
+
since: laterCursor(s.since, p.since),
|
|
99
|
+
carried: carried.slice(-CARRIED_MAX),
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Hand events to the agent: drop any already delivered (by another waiter),
|
|
104
|
+
* mark the rest delivered, and release the carried ones with them. Returns
|
|
105
|
+
* what to show; `events` empty = someone else already woke the agent for them.
|
|
106
|
+
*/
|
|
107
|
+
export function takeDelivery(file, p) {
|
|
108
|
+
const s = readWakeState(file);
|
|
109
|
+
const delivered = new Set(s.delivered ?? []);
|
|
110
|
+
const events = p.events.filter((e) => !delivered.has(e.id));
|
|
111
|
+
const carried = events.length > 0 ? (s.carried ?? []).filter((e) => !delivered.has(e.id)) : [];
|
|
112
|
+
for (const e of [...events, ...carried])
|
|
113
|
+
delivered.add(e.id);
|
|
114
|
+
writeWakeState(file, {
|
|
115
|
+
...s,
|
|
116
|
+
since: laterCursor(s.since, p.since),
|
|
117
|
+
delivered: [...delivered].slice(-DELIVERED_MAX),
|
|
118
|
+
carried: events.length > 0 ? [] : s.carried,
|
|
119
|
+
});
|
|
120
|
+
return { events, carried: carried.filter((c) => !events.some((e) => e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AC,OAAO,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/F,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC;QAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC7D,cAAc,CAAC,IAAI,EAAE;QACnB,GAAG,CAAC;QACJ,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;QACpC,SAAS,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC;QAC/C,OAAO,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO;KAC5C,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AACxF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synap-core/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Connect any AI agent (Claude Code, Codex, Cursor and more) to your own Synap data pod: shared memory, structured data and human-approved changes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -13,10 +13,13 @@
|
|
|
13
13
|
"prepublishOnly": "npm run sync-skills && npm run build",
|
|
14
14
|
"postbuild": "chmod +x dist/index.js",
|
|
15
15
|
"test": "vitest run",
|
|
16
|
-
"verify-artifact": "node scripts/verify-artifact.mjs"
|
|
16
|
+
"verify-artifact": "node scripts/verify-artifact.mjs",
|
|
17
|
+
"docs:cli": "node scripts/gen-cli-reference.mjs",
|
|
18
|
+
"docs:cli:check": "node scripts/gen-cli-reference.mjs --check"
|
|
17
19
|
},
|
|
18
20
|
"dependencies": {
|
|
19
21
|
"@synap-core/hub-rest-client": "^1.1.1",
|
|
22
|
+
"@synap-core/types": "^1.12.1",
|
|
20
23
|
"@synap-core/workspace-templates": ">=0.12.0 <1.0.0",
|
|
21
24
|
"chalk": "^5.4.0",
|
|
22
25
|
"commander": "^13.0.0",
|
package/skills/README.md
CHANGED
|
@@ -71,7 +71,7 @@ Each skill is portable and works unchanged in:
|
|
|
71
71
|
- **Any agent that reads skill folders** — drop into its skill directory; env vars pick up the pod URL and key
|
|
72
72
|
- **Claude Code** — install to `~/.claude/skills/synap/`
|
|
73
73
|
- **Claude Desktop** — does NOT read local skill folders. Skills in Claude Desktop sync from claude.ai — upload the three skill directories there (Settings → Skills → Upload). Claude Desktop CAN still use the pod via an MCP bridge — see `synap-cli/src/lib/targets.ts` `installClaudeDesktop` for the stdio-bridge config.
|
|
74
|
-
- **Raycast** — the
|
|
74
|
+
- **Raycast** — Raycast AI connects to the pod's `/mcp` as an HTTP MCP server (`synap connect --target=raycast`) and reads these skills through `synap_load_skill`, like any MCP client
|
|
75
75
|
|
|
76
76
|
The install metadata (required env, capabilities) is namespaced under `metadata.synap`, so consumers that don't recognize it ignore it cleanly.
|
|
77
77
|
|
package/skills/agent-os/SKILL.md
CHANGED
|
@@ -6,7 +6,7 @@ description: >
|
|
|
6
6
|
my company", "launch agent OS", "build my company OS", "onboard my company",
|
|
7
7
|
"add a Marketing workspace", "this project doesn't have a CRM". NOT for a
|
|
8
8
|
lasting goal a project pursues (grow the newsletter, the build) — that is a
|
|
9
|
-
|
|
9
|
+
goal (synap_start_track), not a workspace. Find existing
|
|
10
10
|
workspace → marketplace template → confirm → packages/apply. NOT the skill
|
|
11
11
|
for "the user stated an intent, what graph should exist" — that conductor is
|
|
12
12
|
system/synap/from-intent (orient, questions, extend-first, then load THIS
|
|
@@ -179,7 +179,7 @@ For each domain slug, apply the template's `PackageDefinition`. If you have a
|
|
|
179
179
|
stamps `project --uses--> workspace` as an INDEX** of domains this engagement
|
|
180
180
|
runs through — not an ACL, and not a nested project. Seed entities still file
|
|
181
181
|
via `belongs_to_project`. **Do not invent a child/nested project** for "the
|
|
182
|
-
Marketing half" — that index edge is enough; a lasting goal is a track, a unit of
|
|
182
|
+
Marketing half" — that index edge is enough; a lasting goal is a goal (a track), a unit of
|
|
183
183
|
work is a session (below).
|
|
184
184
|
|
|
185
185
|
Templates come from `@synap-core/workspace-templates` (shared by CLI, CP
|
|
@@ -262,22 +262,22 @@ skill for the exact sequence.)
|
|
|
262
262
|
the **<project>** project when one exists, otherwise pod-wide. Then: "I've
|
|
263
263
|
onboarded CRM (pipeline + 4 accounts). Want to onboard the others now, or later?"
|
|
264
264
|
|
|
265
|
-
## Goals
|
|
265
|
+
## Goals (tracks); "sub-project", blockers → sessions (never nested projects)
|
|
266
266
|
|
|
267
267
|
There are **no nested projects**, and a workspace never stands for a goal or a method.
|
|
268
268
|
|
|
269
269
|
- **A lasting goal the project pursues** ("grow the newsletter", "the
|
|
270
|
-
build") is a **
|
|
270
|
+
build") is a **goal** (a _track_ in tool names; say "goal" to the person): `synap_list_tracks` → none? `synap_start_track`
|
|
271
271
|
(`name`, `direction`; no method, no stages). Work in it = `synap_start_session`
|
|
272
272
|
with `trackId`. A repeatable way to do that work is a playbook a session or
|
|
273
|
-
worker follows (`work-model`). Installing a pack does not start its
|
|
273
|
+
worker follows (`work-model`). Installing a pack does not start its goals —
|
|
274
274
|
start each one.
|
|
275
275
|
- **"Sub-project", "blocked on X", one bounded piece of work** is a
|
|
276
276
|
**session**: `synap_start_session` with `projectId` and a clear `goal`, plus
|
|
277
|
-
`trackId` when it belongs to a
|
|
277
|
+
`trackId` when it belongs to a goal. Decompose with `parentSessionId` and/or
|
|
278
278
|
`blockedBySessionIds` (edges `spawned_from` / `blocked_by`).
|
|
279
279
|
|
|
280
|
-
Keep the project as the long-lived commitment; tracks are
|
|
280
|
+
Keep the project as the long-lived commitment; goals (tracks) are what it pursues;
|
|
281
281
|
sessions are the short work.
|
|
282
282
|
|
|
283
283
|
## Adding ONE domain to an existing project (the common in-conversation case)
|
|
@@ -286,7 +286,7 @@ You don't only run this for whole-company setup. The frequent case: you're
|
|
|
286
286
|
working inside a project and notice it's **missing an operational domain it
|
|
287
287
|
needs** — new kinds of things must be recorded that no workspace owns (see the
|
|
288
288
|
"notice a missing method or domain" reflex in the core `synap` skill; a missing
|
|
289
|
-
_goal_ is
|
|
289
|
+
_goal_ is `synap_start_track`, not this loop) —
|
|
290
290
|
you're logging leads but there's no CRM, or drafting posts with no Content OS to hold them. Offer it
|
|
291
291
|
in one line; if the user says yes, run a **trimmed Loop 1** for that single
|
|
292
292
|
domain:
|