@somacheck/vibecheck 0.2.0 → 0.4.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/README.md +140 -0
- package/dist/api.js +207 -103
- package/dist/cli.js +236 -15
- package/dist/client-setup.js +206 -0
- package/dist/config.js +64 -6
- package/dist/constants.js +13 -0
- package/dist/link.js +52 -3
- package/dist/readiness.js +135 -0
- package/dist/server.js +168 -148
- package/dist/vibecheck.js +1 -64
- package/package.json +10 -4
- package/dist/api.js.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/constants.js.map +0 -1
- package/dist/link.js.map +0 -1
- package/dist/server.js.map +0 -1
- package/dist/vibecheck.js.map +0 -1
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { readConfig } from "./config.js";
|
|
2
|
+
import { SomaCheckCompatibilityError, SomaCheckHttpError } from "./api.js";
|
|
3
|
+
import { clientDisplayName, clientRegistrationState, detectLegacyHostedRegistration, isClientInstalled, manualLegacyHostedRemoveCommand, manualRemoveCommand, manualSetupCommand, } from "./client-setup.js";
|
|
4
|
+
export async function checkReadiness(dependencies) {
|
|
5
|
+
let token;
|
|
6
|
+
try {
|
|
7
|
+
token = (await readConfig(dependencies.home)).token;
|
|
8
|
+
dependencies.output("✓ Link credential found.");
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
dependencies.output("✗ This computer is not linked to SomaCheck.");
|
|
12
|
+
dependencies.output(" Open SomaCheck → Settings → Agent and run the command shown there.");
|
|
13
|
+
return {
|
|
14
|
+
linked: false,
|
|
15
|
+
backendReachable: false,
|
|
16
|
+
backendCompatible: false,
|
|
17
|
+
registeredClients: [],
|
|
18
|
+
readyClients: [],
|
|
19
|
+
ready: false,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
let statusProbeOk = false;
|
|
23
|
+
let contextProbeOk = false;
|
|
24
|
+
try {
|
|
25
|
+
await dependencies.api.statusRequest(token);
|
|
26
|
+
statusProbeOk = true;
|
|
27
|
+
await dependencies.api.contextRequest(token);
|
|
28
|
+
contextProbeOk = true;
|
|
29
|
+
dependencies.output("✓ SomaCheck can receive requests and return gesture context.");
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
if (error instanceof SomaCheckHttpError && (error.status === 401 || error.status === 403)) {
|
|
33
|
+
dependencies.output("✗ The SomaCheck link was rejected or revoked.");
|
|
34
|
+
dependencies.output(" Reconnect from SomaCheck → Settings → Agent.");
|
|
35
|
+
}
|
|
36
|
+
else if (error instanceof SomaCheckHttpError && error.status === 404) {
|
|
37
|
+
dependencies.output("✗ This link is valid, but the required agent backend version is not deployed.");
|
|
38
|
+
dependencies.output(" Your credential is safe. Run doctor again after the backend update.");
|
|
39
|
+
}
|
|
40
|
+
else if (error instanceof SomaCheckHttpError && error.status >= 500) {
|
|
41
|
+
dependencies.output("✗ SomaCheck's agent backend is temporarily unavailable.");
|
|
42
|
+
dependencies.output(" Your credential is safe. Try doctor again shortly.");
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
dependencies.output("✗ Could not reach SomaCheck's agent backend.");
|
|
46
|
+
dependencies.output(" Check this computer's internet connection, then run doctor again.");
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const backendReachable = statusProbeOk && contextProbeOk;
|
|
50
|
+
const clients = ["codex", "claude"];
|
|
51
|
+
let installedClientCount = 0;
|
|
52
|
+
let hasLegacyHostedRegistration = false;
|
|
53
|
+
const registeredClients = [];
|
|
54
|
+
for (const client of clients) {
|
|
55
|
+
if (!(await isClientInstalled(client, dependencies.runner)))
|
|
56
|
+
continue;
|
|
57
|
+
installedClientCount += 1;
|
|
58
|
+
const legacyHosted = await detectLegacyHostedRegistration(client, dependencies.runner);
|
|
59
|
+
if (legacyHosted !== null) {
|
|
60
|
+
hasLegacyHostedRegistration = true;
|
|
61
|
+
const authNote = legacyHosted.status === "needs_authentication"
|
|
62
|
+
? " It currently reports: Needs authentication."
|
|
63
|
+
: "";
|
|
64
|
+
dependencies.output(`○ ${clientDisplayName(client)} also has a separate legacy server named "somacheck".${authNote}`);
|
|
65
|
+
dependencies.output(' SomaCheck MCP 0.3 uses "vibecheck"; the legacy entry was not changed.');
|
|
66
|
+
dependencies.output(` Optional manual cleanup: ${manualLegacyHostedRemoveCommand(client)}`);
|
|
67
|
+
}
|
|
68
|
+
const registration = await clientRegistrationState(client, dependencies.runner);
|
|
69
|
+
if (registration === "current") {
|
|
70
|
+
registeredClients.push(client);
|
|
71
|
+
dependencies.output(`✓ ${clientDisplayName(client)} is configured.`);
|
|
72
|
+
}
|
|
73
|
+
else if (registration === "needs_update") {
|
|
74
|
+
dependencies.output(`✗ ${clientDisplayName(client)} is configured with a different SomaCheck command or version.`);
|
|
75
|
+
dependencies.output(` Run: ${manualRemoveCommand(client)}`);
|
|
76
|
+
dependencies.output(` Then: ${manualSetupCommand(client)}`);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
dependencies.output(`✗ ${clientDisplayName(client)} is installed but not configured.`);
|
|
80
|
+
dependencies.output(` Run: ${manualSetupCommand(client)}`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (registeredClients.length === 0) {
|
|
84
|
+
dependencies.output("✗ No supported agent client has the current SomaCheck 0.3 configuration.");
|
|
85
|
+
if (installedClientCount === 0) {
|
|
86
|
+
dependencies.output(" Install Codex or Claude Code, then run the matching setup command.");
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
let backendCompatible = false;
|
|
90
|
+
const readyClients = [];
|
|
91
|
+
if (backendReachable && !hasLegacyHostedRegistration) {
|
|
92
|
+
for (const client of registeredClients) {
|
|
93
|
+
try {
|
|
94
|
+
const handshake = await dependencies.api.clientHandshake(token, {
|
|
95
|
+
client_key: client,
|
|
96
|
+
client_label: clientDisplayName(client),
|
|
97
|
+
registration_exact: true,
|
|
98
|
+
status_probe_ok: true,
|
|
99
|
+
context_probe_ok: true,
|
|
100
|
+
});
|
|
101
|
+
if (handshake.readiness_status === "ready") {
|
|
102
|
+
backendCompatible = true;
|
|
103
|
+
readyClients.push(client);
|
|
104
|
+
dependencies.output(`✓ ${clientDisplayName(client)} completed the SomaCheck protocol-3 health check.`);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
dependencies.output(`✗ ${clientDisplayName(client)} is not ready yet (${handshake.readiness_status}).`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
if (error instanceof SomaCheckCompatibilityError) {
|
|
112
|
+
const packageText = error.requiredPackageVersion === null
|
|
113
|
+
? "the required package version"
|
|
114
|
+
: `@somacheck/vibecheck@${error.requiredPackageVersion}`;
|
|
115
|
+
dependencies.output(`✗ SomaCheck's backend requires ${packageText}; this package is not compatible.`);
|
|
116
|
+
}
|
|
117
|
+
else if (error instanceof SomaCheckHttpError && error.status >= 500) {
|
|
118
|
+
dependencies.output("✗ SomaCheck's protocol handshake is temporarily unavailable.");
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
dependencies.output(`✗ ${clientDisplayName(client)} could not complete the SomaCheck protocol handshake.`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (hasLegacyHostedRegistration) {
|
|
127
|
+
dependencies.output('✗ Remove the legacy "somacheck" connector before this setup can be Ready.');
|
|
128
|
+
}
|
|
129
|
+
const ready = readyClients.length > 0;
|
|
130
|
+
dependencies.output(ready
|
|
131
|
+
? "Ready. Restart your agent client, then ask it to check your SomaCheck status."
|
|
132
|
+
: "Setup is not complete yet. Fix the items marked ✗, then run: vibecheck doctor");
|
|
133
|
+
return { linked: true, backendReachable, backendCompatible, registeredClients, readyClients, ready };
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=readiness.js.map
|
package/dist/server.js
CHANGED
|
@@ -1,90 +1,103 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import { StatementPendingError } from "./vibecheck.js";
|
|
4
|
+
import { SomaCheckCompatibilityError, SomaCheckHttpError } from "./api.js";
|
|
5
|
+
import { PACKAGE_NAME, PACKAGE_SPEC, PACKAGE_VERSION } from "./constants.js";
|
|
6
|
+
const cadenceSchema = z.object({
|
|
7
|
+
reason: z.string(),
|
|
8
|
+
create_due_at: z.string().nullable(),
|
|
9
|
+
create_overdue: z.boolean(),
|
|
10
|
+
may_create_now: z.boolean(),
|
|
11
|
+
last_answered_at: z.string().nullable(),
|
|
12
|
+
blocking_request_id: z.string().nullable(),
|
|
13
|
+
stale_after_seconds: z.number(),
|
|
14
|
+
followup_within_seconds: z.number(),
|
|
15
|
+
});
|
|
9
16
|
const statusSchema = {
|
|
10
17
|
linked: z.literal(true),
|
|
11
18
|
no_prior_requests: z.boolean(),
|
|
12
19
|
prior_request_count: z.number().int(),
|
|
13
20
|
has_pending_request: z.boolean(),
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
may_create_now: z.boolean(),
|
|
21
|
-
reason: z.string(),
|
|
22
|
-
blocking_request: z
|
|
23
|
-
.object({ id: z.string(), created_at: z.string(), age_seconds: z.number() })
|
|
24
|
-
.nullable(),
|
|
25
|
-
last_answered_at: z.string().nullable(),
|
|
26
|
-
create_due_at: z.string().nullable(),
|
|
27
|
-
create_overdue: z.boolean(),
|
|
28
|
-
stale_after_hours: z.number(),
|
|
29
|
-
followup_within_hours: z.number(),
|
|
30
|
-
guidance: z.string(),
|
|
31
|
-
}),
|
|
21
|
+
pending_proposition_count: z.number().int(),
|
|
22
|
+
queued_proposition_count: z.number().int(),
|
|
23
|
+
propositions_needed: z.number().int(),
|
|
24
|
+
replenishment_requested_at: z.string().nullable(),
|
|
25
|
+
first_run_intro: z.object({ eligible: z.boolean(), should_offer_now: z.boolean() }),
|
|
26
|
+
cadence: cadenceSchema,
|
|
32
27
|
recommended_action: z.string(),
|
|
33
|
-
copy_guidance: z.object({
|
|
34
|
-
policy: z.string(),
|
|
35
|
-
framing: z.string(),
|
|
36
|
-
fallback: z.string(),
|
|
37
|
-
}),
|
|
28
|
+
copy_guidance: z.object({ policy: z.string(), framing: z.string(), fallback: z.string() }),
|
|
38
29
|
};
|
|
39
|
-
const
|
|
30
|
+
const createdPropositionSchema = z.object({
|
|
40
31
|
request_id: z.string(),
|
|
32
|
+
presentation_state: z.enum(["presented", "queued"]),
|
|
41
33
|
stale_at: z.string().nullable(),
|
|
34
|
+
});
|
|
35
|
+
const postSchema = { propositions: z.array(createdPropositionSchema) };
|
|
36
|
+
const resultSchema = {
|
|
37
|
+
request_id: z.string(),
|
|
38
|
+
status: z.enum(["queued", "pending", "answered", "expired", "cancelled"]),
|
|
39
|
+
verdict: z.enum(["aligned", "unaligned"]).nullable(),
|
|
40
|
+
confidence: z.number().nullable(),
|
|
41
|
+
latency_s: z.number().nullable(),
|
|
42
42
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (status.first_run_intro.should_offer_now) {
|
|
52
|
-
return "Linked: yes. No prior requests: yes. Offer the first-run intro now, then post the first statement.";
|
|
53
|
-
}
|
|
54
|
-
if (cadence.create_overdue) {
|
|
55
|
-
return `The channel is empty and the follow-up was due at ${cadence.create_due_at}. Post a statement now.`;
|
|
56
|
-
}
|
|
57
|
-
if (cadence.create_due_at !== null) {
|
|
58
|
-
return `They checked in. The channel is empty: post the next statement by ${cadence.create_due_at}.`;
|
|
59
|
-
}
|
|
60
|
-
return "The channel is empty. Post a statement drawn from your own context about this person.";
|
|
61
|
-
}
|
|
62
|
-
// Mike's direction (2026-07-29): one sentence, trust a capable model, do not
|
|
63
|
-
// hand it a ruleset. The single framing rule dissolves the fabrication risk.
|
|
64
|
-
//
|
|
65
|
-
// The cadence sentences are the exception: they are not a style ruleset, they
|
|
66
|
-
// are the protocol that keeps the channel alive. The server decides the three
|
|
67
|
-
// rules; these sentences only tell the agent when to read the decision and what
|
|
68
|
-
// to do about it. Statements themselves still come from the agent's own context
|
|
69
|
-
// about its user, which is the one thing the server cannot supply.
|
|
43
|
+
const contextItemSchema = z.object({
|
|
44
|
+
request_id: z.string(),
|
|
45
|
+
statement: z.string(),
|
|
46
|
+
verdict: z.enum(["aligned", "unaligned"]),
|
|
47
|
+
confidence: z.number().min(0).max(1),
|
|
48
|
+
answered_at: z.string().datetime({ offset: true }),
|
|
49
|
+
});
|
|
50
|
+
const contextSchema = { checkins: z.array(contextItemSchema) };
|
|
70
51
|
const SERVER_INSTRUCTIONS = [
|
|
71
|
-
"SomaCheck lets you
|
|
72
|
-
"Call get_vibecheck_status at the start of a session, and again
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"Fire once. If the user ignores or declines, do not nag.",
|
|
52
|
+
"SomaCheck lets you offer the person a statement to test through a quick phone check-in.",
|
|
53
|
+
"Call get_vibecheck_context and get_vibecheck_status at the start of a session or background run, and call status again after a completed check-in.",
|
|
54
|
+
"Treat gesture outcomes as contextual signals, never fixed facts or blanket authorization.",
|
|
55
|
+
"Maintain three distinct propositions drawn from your own context about this person.",
|
|
56
|
+
"When propositions_needed is greater than zero, post exactly that many in one call.",
|
|
57
|
+
"Offer each statement as something to test, never as a claim of fact about the user.",
|
|
58
|
+
"Retain every request_id returned by post_vibecheck_statement and call get_vibecheck_result later.",
|
|
59
|
+
"Do not poll continuously. Queued means the proposition is cached until the person advances their feed.",
|
|
80
60
|
].join(" ");
|
|
81
61
|
export function createVibecheckServer(dependencies) {
|
|
82
|
-
const server = new McpServer({ name:
|
|
62
|
+
const server = new McpServer({ name: PACKAGE_NAME, version: PACKAGE_VERSION }, { instructions: SERVER_INSTRUCTIONS });
|
|
63
|
+
server.registerTool("get_vibecheck_context", {
|
|
64
|
+
title: "Vibecheck Context",
|
|
65
|
+
description: "Read recent completed check-ins for this linked agent, newest first. Use the outcomes as contextual signals and replenish the feed when status requests it.",
|
|
66
|
+
inputSchema: {},
|
|
67
|
+
outputSchema: contextSchema,
|
|
68
|
+
annotations: {
|
|
69
|
+
readOnlyHint: true,
|
|
70
|
+
destructiveHint: false,
|
|
71
|
+
idempotentHint: true,
|
|
72
|
+
openWorldHint: false,
|
|
73
|
+
},
|
|
74
|
+
}, async () => {
|
|
75
|
+
try {
|
|
76
|
+
const token = await dependencies.loadToken();
|
|
77
|
+
const checkins = await dependencies.api.contextRequest(token);
|
|
78
|
+
const text = checkins.length === 0
|
|
79
|
+
? "No completed SomaCheck gestures yet."
|
|
80
|
+
: [
|
|
81
|
+
`Loaded ${checkins.length} completed gesture${checkins.length === 1 ? "" : "s"}. Treat them as contextual signals, not fixed conclusions:`,
|
|
82
|
+
...checkins.map((item) => `${Math.round(item.confidence * 100)}% ${item.verdict} — ${JSON.stringify(item.statement)}`),
|
|
83
|
+
].join("\n");
|
|
84
|
+
return { content: [{ type: "text", text }], structuredContent: { checkins } };
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
return failureMessage("read SomaCheck context", error);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
83
90
|
server.registerTool("get_vibecheck_status", {
|
|
84
91
|
title: "Vibecheck Status",
|
|
85
|
-
description: "
|
|
92
|
+
description: "Read the live SomaCheck cache before posting. Reports how many personalized propositions are needed, when routine replenishment is due, and whether this is the agent's first contact.",
|
|
86
93
|
inputSchema: {},
|
|
87
94
|
outputSchema: statusSchema,
|
|
95
|
+
annotations: {
|
|
96
|
+
readOnlyHint: true,
|
|
97
|
+
destructiveHint: false,
|
|
98
|
+
idempotentHint: true,
|
|
99
|
+
openWorldHint: false,
|
|
100
|
+
},
|
|
88
101
|
}, async () => {
|
|
89
102
|
try {
|
|
90
103
|
const token = await dependencies.loadToken();
|
|
@@ -95,108 +108,115 @@ export function createVibecheckServer(dependencies) {
|
|
|
95
108
|
};
|
|
96
109
|
}
|
|
97
110
|
catch (error) {
|
|
98
|
-
return
|
|
99
|
-
isError: true,
|
|
100
|
-
content: [
|
|
101
|
-
{
|
|
102
|
-
type: "text",
|
|
103
|
-
text: error instanceof BackendTooOldError
|
|
104
|
-
? "This SomaCheck backend does not report statement cadence yet, so the cadence rules cannot be enforced. Your link is fine. Ask the SomaCheck team to apply the cadence migration."
|
|
105
|
-
: "Could not read SomaCheck status. Check your link and try again.",
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
};
|
|
111
|
+
return failureMessage("read SomaCheck status", error);
|
|
109
112
|
}
|
|
110
113
|
});
|
|
111
|
-
// The cadence statement is asynchronous by nature: the agent posts it from its
|
|
112
|
-
// own context and the person checks in whenever they next pick up the phone.
|
|
113
|
-
// `vibecheck` blocks for an answer, which is the wrong shape for that -- it
|
|
114
|
-
// would hold the agent's turn open for minutes against a phone nobody is
|
|
115
|
-
// holding. This tool posts and returns.
|
|
116
114
|
server.registerTool("post_vibecheck_statement", {
|
|
117
115
|
title: "Post Vibecheck Statement",
|
|
118
|
-
description: "
|
|
116
|
+
description: "Fill the person's SomaCheck cache with one to three personalized statements and return immediately. Call get_vibecheck_status first and submit exactly propositions_needed statements.",
|
|
119
117
|
inputSchema: {
|
|
120
|
-
|
|
118
|
+
statements: z.array(z.string().min(1)).min(1).max(3)
|
|
119
|
+
.describe("Distinct personalized statements for this person to test, ordered most useful first."),
|
|
120
|
+
},
|
|
121
|
+
outputSchema: postSchema,
|
|
122
|
+
annotations: {
|
|
123
|
+
readOnlyHint: false,
|
|
124
|
+
destructiveHint: false,
|
|
125
|
+
idempotentHint: false,
|
|
126
|
+
openWorldHint: false,
|
|
121
127
|
},
|
|
122
|
-
|
|
123
|
-
}, async ({ statement }) => {
|
|
128
|
+
}, async ({ statements }) => {
|
|
124
129
|
try {
|
|
125
130
|
const token = await dependencies.loadToken();
|
|
126
|
-
const created = await dependencies.api.
|
|
127
|
-
const
|
|
131
|
+
const created = await dependencies.api.createRequests(token, statements.map((statement) => statement.trim()));
|
|
132
|
+
const presented = created.filter((item) => item.presentation_state === "presented").length;
|
|
133
|
+
const queued = created.length - presented;
|
|
128
134
|
return {
|
|
129
|
-
content: [
|
|
130
|
-
|
|
131
|
-
type: "text",
|
|
132
|
-
text: `Posted. It is waiting in SomaCheck for their next check-in.${staleNote}`,
|
|
133
|
-
},
|
|
134
|
-
],
|
|
135
|
-
structuredContent: { ...created, stale_at: created.stale_at },
|
|
135
|
+
content: [{ type: "text", text: `Added ${created.length}: ${presented} presented, ${queued} cached.` }],
|
|
136
|
+
structuredContent: { propositions: created },
|
|
136
137
|
};
|
|
137
138
|
}
|
|
138
139
|
catch (error) {
|
|
139
|
-
return
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
{
|
|
143
|
-
type: "text",
|
|
144
|
-
text: error instanceof StatementPendingError
|
|
145
|
-
? "A statement is already waiting for this person. Do not post another one until they check in."
|
|
146
|
-
: "Could not post the statement. Check your link and try again.",
|
|
147
|
-
},
|
|
148
|
-
],
|
|
149
|
-
};
|
|
140
|
+
return failure(error instanceof StatementPendingError
|
|
141
|
+
? "Three propositions are already available. Wait for a check-in, refresh, or expiry."
|
|
142
|
+
: operationalFailureText("add SomaCheck propositions", error));
|
|
150
143
|
}
|
|
151
144
|
});
|
|
152
|
-
server.registerTool("
|
|
153
|
-
title: "Vibecheck",
|
|
154
|
-
description: "
|
|
145
|
+
server.registerTool("get_vibecheck_result", {
|
|
146
|
+
title: "Get Vibecheck Result",
|
|
147
|
+
description: "Read one proposition by request_id. This is a single non-blocking read: queued is cached, and pending is presented but not answered.",
|
|
155
148
|
inputSchema: {
|
|
156
|
-
|
|
157
|
-
|
|
149
|
+
request_id: z.string().min(1).describe("The request_id returned by post_vibecheck_statement."),
|
|
150
|
+
},
|
|
151
|
+
outputSchema: resultSchema,
|
|
152
|
+
annotations: {
|
|
153
|
+
readOnlyHint: true,
|
|
154
|
+
destructiveHint: false,
|
|
155
|
+
idempotentHint: true,
|
|
156
|
+
openWorldHint: false,
|
|
158
157
|
},
|
|
159
|
-
|
|
160
|
-
}, async ({ question, timeout_s }) => {
|
|
161
|
-
const startedAt = dependencies.now?.() ?? Date.now();
|
|
158
|
+
}, async ({ request_id }) => {
|
|
162
159
|
try {
|
|
163
160
|
const token = await dependencies.loadToken();
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
return {
|
|
174
|
-
content: [{ type: "text", text: run.message }],
|
|
175
|
-
structuredContent,
|
|
176
|
-
};
|
|
161
|
+
const result = await dependencies.api.pollRequest(token, request_id);
|
|
162
|
+
const structuredContent = { request_id, ...result };
|
|
163
|
+
const text = result.status === "answered"
|
|
164
|
+
? `Answered: ${Math.round((result.confidence ?? 0) * 100)}% ${result.verdict}.`
|
|
165
|
+
: result.status === "queued"
|
|
166
|
+
? "Queued. The proposition is cached until the person advances their feed."
|
|
167
|
+
: result.status === "pending"
|
|
168
|
+
? "Pending. The person has not completed this check-in yet."
|
|
169
|
+
: `The request is ${result.status}.`;
|
|
170
|
+
return { content: [{ type: "text", text }], structuredContent };
|
|
177
171
|
}
|
|
178
172
|
catch (error) {
|
|
179
|
-
|
|
180
|
-
const latencySeconds = Math.max(0, (endedAt - startedAt) / 1_000);
|
|
181
|
-
const outcome = {
|
|
182
|
-
verdict: "inconclusive",
|
|
183
|
-
confidence: 0,
|
|
184
|
-
latency_s: latencySeconds,
|
|
185
|
-
};
|
|
186
|
-
return {
|
|
187
|
-
isError: true,
|
|
188
|
-
content: [
|
|
189
|
-
{
|
|
190
|
-
type: "text",
|
|
191
|
-
text: error instanceof StatementPendingError
|
|
192
|
-
? "A statement is already waiting for this person to check in. Wait for that one instead of asking again."
|
|
193
|
-
: "Vibecheck could not complete. Check your link and try again.",
|
|
194
|
-
},
|
|
195
|
-
],
|
|
196
|
-
structuredContent: outcome,
|
|
197
|
-
};
|
|
173
|
+
return failureMessage("read that SomaCheck result", error);
|
|
198
174
|
}
|
|
199
175
|
});
|
|
200
176
|
return server;
|
|
201
177
|
}
|
|
178
|
+
function summarise(status) {
|
|
179
|
+
const cadence = status.cadence;
|
|
180
|
+
if (status.first_run_intro.should_offer_now) {
|
|
181
|
+
return `This is your first contact. Introduce the SomaCheck ritual, then create exactly ${status.propositions_needed} distinct personalized propositions.`;
|
|
182
|
+
}
|
|
183
|
+
if (status.propositions_needed > 0) {
|
|
184
|
+
const requested = status.replenishment_requested_at === null
|
|
185
|
+
? ""
|
|
186
|
+
: ` The person requested replenishment at ${status.replenishment_requested_at}.`;
|
|
187
|
+
return `The cache has ${status.pending_proposition_count} of 3 propositions. Create exactly ${status.propositions_needed} distinct personalized proposition${status.propositions_needed === 1 ? "" : "s"} now.${requested}`;
|
|
188
|
+
}
|
|
189
|
+
return `The cache is full: one proposition is presented and ${status.queued_proposition_count} are queued. Routine replenishment uses a ${formatDuration(cadence.followup_within_seconds)} floor.`;
|
|
190
|
+
}
|
|
191
|
+
function formatDuration(seconds) {
|
|
192
|
+
const hours = seconds / 3600;
|
|
193
|
+
return Number.isInteger(hours) ? `${hours}-hour` : `${Math.round(seconds / 60)}-minute`;
|
|
194
|
+
}
|
|
195
|
+
function failure(text) {
|
|
196
|
+
return {
|
|
197
|
+
isError: true,
|
|
198
|
+
content: [{ type: "text", text }],
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
function failureMessage(operation, error) {
|
|
202
|
+
return failure(operationalFailureText(operation, error));
|
|
203
|
+
}
|
|
204
|
+
function operationalFailureText(operation, error) {
|
|
205
|
+
const doctor = `Run: npx -y ${PACKAGE_SPEC} doctor`;
|
|
206
|
+
if (error instanceof SomaCheckCompatibilityError) {
|
|
207
|
+
return `Could not ${operation}: this MCP package and the SomaCheck backend are incompatible. ${doctor}`;
|
|
208
|
+
}
|
|
209
|
+
if (error instanceof SomaCheckHttpError) {
|
|
210
|
+
if (error.status === 401 || error.status === 403) {
|
|
211
|
+
return `Could not ${operation}: this SomaCheck link was rejected or revoked. Reconnect in the app. ${doctor}`;
|
|
212
|
+
}
|
|
213
|
+
if (error.status === 404) {
|
|
214
|
+
return `Could not ${operation}: the required SomaCheck agent backend is not deployed. ${doctor}`;
|
|
215
|
+
}
|
|
216
|
+
if (error.status >= 500) {
|
|
217
|
+
return `Could not ${operation}: the SomaCheck backend is temporarily unavailable. Try again shortly. ${doctor}`;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return `Could not ${operation}: the local link or network check failed. ${doctor}`;
|
|
221
|
+
}
|
|
202
222
|
//# sourceMappingURL=server.js.map
|
package/dist/vibecheck.js
CHANGED
|
@@ -1,70 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The backend predates the cadence migration, so it cannot answer "may I create
|
|
3
|
-
* now?" and cannot enforce rule 1 either. Distinct from a link failure: nothing
|
|
4
|
-
* is wrong with the user's link and re-linking will not help.
|
|
5
|
-
*/
|
|
6
|
-
export class BackendTooOldError extends Error {
|
|
7
|
-
constructor() {
|
|
8
|
-
super("This SomaCheck backend does not report statement cadence yet.");
|
|
9
|
-
this.name = "BackendTooOldError";
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
/** Rule 1 refusal from the backend: a live statement is still unchecked. */
|
|
13
1
|
export class StatementPendingError extends Error {
|
|
14
2
|
constructor() {
|
|
15
|
-
super("A statement is already
|
|
3
|
+
super("A statement is already pending.");
|
|
16
4
|
this.name = "StatementPendingError";
|
|
17
5
|
}
|
|
18
6
|
}
|
|
19
|
-
const POLL_INTERVAL_MS = 2_000;
|
|
20
|
-
const defaultSleep = async (milliseconds) => {
|
|
21
|
-
await new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
22
|
-
};
|
|
23
|
-
export async function performVibecheck(options) {
|
|
24
|
-
const timeoutSeconds = options.timeoutSeconds ?? 120;
|
|
25
|
-
if (!Number.isFinite(timeoutSeconds) || timeoutSeconds <= 0) {
|
|
26
|
-
throw new Error("timeout_s must be a positive number.");
|
|
27
|
-
}
|
|
28
|
-
const now = options.now ?? Date.now;
|
|
29
|
-
const sleep = options.sleep ?? defaultSleep;
|
|
30
|
-
const calledAt = now();
|
|
31
|
-
const deadline = calledAt + timeoutSeconds * 1_000;
|
|
32
|
-
const created = await options.api.createRequest(options.token, options.question?.trim() || null);
|
|
33
|
-
const requestId = created.request_id;
|
|
34
|
-
while (now() < deadline) {
|
|
35
|
-
const waitMilliseconds = Math.min(POLL_INTERVAL_MS, deadline - now());
|
|
36
|
-
await sleep(waitMilliseconds);
|
|
37
|
-
// Always poll after sleeping, including the window that ends exactly on the
|
|
38
|
-
// deadline. Breaking out before this poll loses a gesture that landed during
|
|
39
|
-
// the final wait -- the answer is already recorded, so reporting it
|
|
40
|
-
// inconclusive would be wrong.
|
|
41
|
-
const response = await options.api.pollRequest(options.token, requestId);
|
|
42
|
-
if (response.status === "pending") {
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
if (response.status === "answered") {
|
|
46
|
-
if (response.verdict === null || response.confidence === null || response.latency_s === null) {
|
|
47
|
-
throw new Error("SomaCheck returned an incomplete answer.");
|
|
48
|
-
}
|
|
49
|
-
const outcome = {
|
|
50
|
-
verdict: response.verdict,
|
|
51
|
-
confidence: response.confidence,
|
|
52
|
-
latency_s: response.latency_s,
|
|
53
|
-
};
|
|
54
|
-
return {
|
|
55
|
-
outcome,
|
|
56
|
-
message: `Your embodied answer is ${outcome.verdict} (${Math.round(outcome.confidence * 100)}% confidence, ${outcome.latency_s}s).`,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
const elapsedSeconds = (now() - calledAt) / 1_000;
|
|
60
|
-
return {
|
|
61
|
-
outcome: { verdict: "inconclusive", confidence: 0, latency_s: elapsedSeconds },
|
|
62
|
-
message: `The vibecheck request ${response.status}. Open SomaCheck and try again.`,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
return {
|
|
66
|
-
outcome: { verdict: "inconclusive", confidence: 0, latency_s: timeoutSeconds },
|
|
67
|
-
message: `No gesture arrived within ${timeoutSeconds} seconds. Open SomaCheck and try again.`,
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
7
|
//# sourceMappingURL=vibecheck.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@somacheck/vibecheck",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Ask your embodied sense for an answer through SomaCheck.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/sensie-app/Somacheck.git",
|
|
8
|
+
"directory": "packages/vibecheck"
|
|
9
|
+
},
|
|
5
10
|
"type": "module",
|
|
6
11
|
"bin": {
|
|
7
12
|
"vibecheck": "dist/cli.js"
|
|
@@ -10,11 +15,12 @@
|
|
|
10
15
|
".": "./dist/server.js"
|
|
11
16
|
},
|
|
12
17
|
"files": [
|
|
13
|
-
"dist"
|
|
18
|
+
"dist/*.js"
|
|
14
19
|
],
|
|
15
20
|
"scripts": {
|
|
16
|
-
"build": "tsc -p tsconfig.json",
|
|
17
|
-
"test": "npm run build && node --import tsx --test test
|
|
21
|
+
"build": "rm -rf dist && tsc -p tsconfig.json",
|
|
22
|
+
"test": "npm run build && node --import tsx --test test/*.test.ts && node --test test/*.test.mjs",
|
|
23
|
+
"test:release-artifacts": "bash ./verify-release-artifacts.sh",
|
|
18
24
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
19
25
|
"prepack": "npm run build"
|
|
20
26
|
},
|
package/dist/api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":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