agentfootprint 9.35.0 → 9.37.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/dist/adapters/hosting/firestoreSessions.js +28 -6
- package/dist/adapters/hosting/firestoreSessions.js.map +1 -1
- package/dist/adapters/hosting/googleAgentEngine.js +64 -0
- package/dist/adapters/hosting/googleAgentEngine.js.map +1 -1
- package/dist/adapters/memory/agentcore.js +7 -1
- package/dist/adapters/memory/agentcore.js.map +1 -1
- package/dist/adapters/memory/memoryBank.js +29 -8
- package/dist/adapters/memory/memoryBank.js.map +1 -1
- package/dist/adapters/memory/redis.js +28 -1
- package/dist/adapters/memory/redis.js.map +1 -1
- package/dist/artifacts/scopePath.js +13 -2
- package/dist/artifacts/scopePath.js.map +1 -1
- package/dist/core/agent/AgentBuilder.js +85 -0
- package/dist/core/agent/AgentBuilder.js.map +1 -1
- package/dist/core/agent/buildToolRegistry.js +7 -0
- package/dist/core/agent/buildToolRegistry.js.map +1 -1
- package/dist/core/agent/toolsFromActiveSkill.js +79 -0
- package/dist/core/agent/toolsFromActiveSkill.js.map +1 -0
- package/dist/esm/adapters/hosting/firestoreSessions.js +29 -7
- package/dist/esm/adapters/hosting/firestoreSessions.js.map +1 -1
- package/dist/esm/adapters/hosting/googleAgentEngine.js +64 -0
- package/dist/esm/adapters/hosting/googleAgentEngine.js.map +1 -1
- package/dist/esm/adapters/memory/agentcore.js +7 -1
- package/dist/esm/adapters/memory/agentcore.js.map +1 -1
- package/dist/esm/adapters/memory/memoryBank.d.ts +13 -3
- package/dist/esm/adapters/memory/memoryBank.js +29 -8
- package/dist/esm/adapters/memory/memoryBank.js.map +1 -1
- package/dist/esm/adapters/memory/redis.d.ts +25 -0
- package/dist/esm/adapters/memory/redis.js +28 -1
- package/dist/esm/adapters/memory/redis.js.map +1 -1
- package/dist/esm/artifacts/scopePath.d.ts +9 -1
- package/dist/esm/artifacts/scopePath.js +13 -2
- package/dist/esm/artifacts/scopePath.js.map +1 -1
- package/dist/esm/core/agent/AgentBuilder.d.ts +62 -0
- package/dist/esm/core/agent/AgentBuilder.js +85 -0
- package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
- package/dist/esm/core/agent/buildToolRegistry.js +7 -0
- package/dist/esm/core/agent/buildToolRegistry.js.map +1 -1
- package/dist/esm/core/agent/toolsFromActiveSkill.d.ts +55 -0
- package/dist/esm/core/agent/toolsFromActiveSkill.js +75 -0
- package/dist/esm/core/agent/toolsFromActiveSkill.js.map +1 -0
- package/dist/esm/hosting/conformance/cases.d.ts +15 -0
- package/dist/esm/hosting/conformance/cases.js +395 -0
- package/dist/esm/hosting/conformance/cases.js.map +1 -0
- package/dist/esm/hosting/conformance/index.d.ts +11 -0
- package/dist/esm/hosting/conformance/index.js +11 -0
- package/dist/esm/hosting/conformance/index.js.map +1 -0
- package/dist/esm/hosting/conformance/run.d.ts +46 -0
- package/dist/esm/hosting/conformance/run.js +182 -0
- package/dist/esm/hosting/conformance/run.js.map +1 -0
- package/dist/esm/hosting/conformance/types.d.ts +140 -0
- package/dist/esm/hosting/conformance/types.js +6 -0
- package/dist/esm/hosting/conformance/types.js.map +1 -0
- package/dist/esm/hosting/errors.d.ts +34 -0
- package/dist/esm/hosting/errors.js +47 -0
- package/dist/esm/hosting/errors.js.map +1 -1
- package/dist/esm/hosting/index.d.ts +4 -1
- package/dist/esm/hosting/index.js +11 -1
- package/dist/esm/hosting/index.js.map +1 -1
- package/dist/esm/hosting/memorySessions.d.ts +5 -0
- package/dist/esm/hosting/memorySessions.js +25 -17
- package/dist/esm/hosting/memorySessions.js.map +1 -1
- package/dist/esm/hosting/sessionOwnership.d.ts +86 -0
- package/dist/esm/hosting/sessionOwnership.js +106 -0
- package/dist/esm/hosting/sessionOwnership.js.map +1 -0
- package/dist/esm/hosting/sqliteSessions.js +41 -10
- package/dist/esm/hosting/sqliteSessions.js.map +1 -1
- package/dist/esm/hosting/types.d.ts +68 -4
- package/dist/esm/hosting/types.js.map +1 -1
- package/dist/esm/lib/injection-engine/factories/defineSkill.d.ts +7 -0
- package/dist/esm/lib/injection-engine/factories/defineSkill.js.map +1 -1
- package/dist/esm/lib/injection-engine/skillsFromDir.d.ts +80 -17
- package/dist/esm/lib/injection-engine/skillsFromDir.js +348 -46
- package/dist/esm/lib/injection-engine/skillsFromDir.js.map +1 -1
- package/dist/esm/memory/identity/encode.d.ts +67 -0
- package/dist/esm/memory/identity/encode.js +91 -0
- package/dist/esm/memory/identity/encode.js.map +1 -0
- package/dist/esm/memory/identity/index.d.ts +1 -0
- package/dist/esm/memory/identity/index.js +1 -0
- package/dist/esm/memory/identity/index.js.map +1 -1
- package/dist/esm/memory/identity/types.d.ts +21 -4
- package/dist/esm/memory/identity/types.js +27 -7
- package/dist/esm/memory/identity/types.js.map +1 -1
- package/dist/hosting/conformance/cases.js +398 -0
- package/dist/hosting/conformance/cases.js.map +1 -0
- package/dist/hosting/conformance/index.js +18 -0
- package/dist/hosting/conformance/index.js.map +1 -0
- package/dist/hosting/conformance/run.js +188 -0
- package/dist/hosting/conformance/run.js.map +1 -0
- package/dist/hosting/conformance/types.js +7 -0
- package/dist/hosting/conformance/types.js.map +1 -0
- package/dist/hosting/errors.js +49 -1
- package/dist/hosting/errors.js.map +1 -1
- package/dist/hosting/index.js +18 -2
- package/dist/hosting/index.js.map +1 -1
- package/dist/hosting/memorySessions.js +25 -17
- package/dist/hosting/memorySessions.js.map +1 -1
- package/dist/hosting/sessionOwnership.js +110 -0
- package/dist/hosting/sessionOwnership.js.map +1 -0
- package/dist/hosting/sqliteSessions.js +41 -10
- package/dist/hosting/sqliteSessions.js.map +1 -1
- package/dist/hosting/types.js.map +1 -1
- package/dist/lib/injection-engine/factories/defineSkill.js.map +1 -1
- package/dist/lib/injection-engine/skillsFromDir.js +348 -46
- package/dist/lib/injection-engine/skillsFromDir.js.map +1 -1
- package/dist/memory/identity/encode.js +96 -0
- package/dist/memory/identity/encode.js.map +1 -0
- package/dist/memory/identity/index.js +5 -1
- package/dist/memory/identity/index.js.map +1 -1
- package/dist/memory/identity/types.js +27 -7
- package/dist/memory/identity/types.js.map +1 -1
- package/dist/types/adapters/hosting/firestoreSessions.d.ts.map +1 -1
- package/dist/types/adapters/hosting/googleAgentEngine.d.ts.map +1 -1
- package/dist/types/adapters/memory/agentcore.d.ts.map +1 -1
- package/dist/types/adapters/memory/memoryBank.d.ts +13 -3
- package/dist/types/adapters/memory/memoryBank.d.ts.map +1 -1
- package/dist/types/adapters/memory/redis.d.ts +25 -0
- package/dist/types/adapters/memory/redis.d.ts.map +1 -1
- package/dist/types/artifacts/scopePath.d.ts +9 -1
- package/dist/types/artifacts/scopePath.d.ts.map +1 -1
- package/dist/types/core/agent/AgentBuilder.d.ts +62 -0
- package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
- package/dist/types/core/agent/buildToolRegistry.d.ts.map +1 -1
- package/dist/types/core/agent/toolsFromActiveSkill.d.ts +56 -0
- package/dist/types/core/agent/toolsFromActiveSkill.d.ts.map +1 -0
- package/dist/types/hosting/conformance/cases.d.ts +16 -0
- package/dist/types/hosting/conformance/cases.d.ts.map +1 -0
- package/dist/types/hosting/conformance/index.d.ts +12 -0
- package/dist/types/hosting/conformance/index.d.ts.map +1 -0
- package/dist/types/hosting/conformance/run.d.ts +47 -0
- package/dist/types/hosting/conformance/run.d.ts.map +1 -0
- package/dist/types/hosting/conformance/types.d.ts +141 -0
- package/dist/types/hosting/conformance/types.d.ts.map +1 -0
- package/dist/types/hosting/errors.d.ts +34 -0
- package/dist/types/hosting/errors.d.ts.map +1 -1
- package/dist/types/hosting/index.d.ts +4 -1
- package/dist/types/hosting/index.d.ts.map +1 -1
- package/dist/types/hosting/memorySessions.d.ts +5 -0
- package/dist/types/hosting/memorySessions.d.ts.map +1 -1
- package/dist/types/hosting/sessionOwnership.d.ts +87 -0
- package/dist/types/hosting/sessionOwnership.d.ts.map +1 -0
- package/dist/types/hosting/sqliteSessions.d.ts.map +1 -1
- package/dist/types/hosting/types.d.ts +68 -4
- package/dist/types/hosting/types.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/factories/defineSkill.d.ts +7 -0
- package/dist/types/lib/injection-engine/factories/defineSkill.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/skillsFromDir.d.ts +80 -17
- package/dist/types/lib/injection-engine/skillsFromDir.d.ts.map +1 -1
- package/dist/types/memory/identity/encode.d.ts +68 -0
- package/dist/types/memory/identity/encode.d.ts.map +1 -0
- package/dist/types/memory/identity/index.d.ts +1 -0
- package/dist/types/memory/identity/index.d.ts.map +1 -1
- package/dist/types/memory/identity/types.d.ts +21 -4
- package/dist/types/memory/identity/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hosting/conformance/run — running the battery, and saying honestly how it
|
|
3
|
+
* went.
|
|
4
|
+
*
|
|
5
|
+
* The runner owns exactly three decisions, and all three are about the ways a
|
|
6
|
+
* case can NOT run:
|
|
7
|
+
*
|
|
8
|
+
* 1. the case is about an OPTIONAL port member this store does not implement
|
|
9
|
+
* → `'not-applicable'`, naming the member. Feature detection, which is the
|
|
10
|
+
* port's own rule applied to its own battery.
|
|
11
|
+
* 2. the store implements it and cannot satisfy the case, and the harness said
|
|
12
|
+
* so by name → `'declared'`, carrying the reason. It is run ANYWAY, so a
|
|
13
|
+
* declaration that has quietly become untrue is visible rather than
|
|
14
|
+
* permanent.
|
|
15
|
+
* 3. the case needs a harness hook nobody supplied and nobody declared →
|
|
16
|
+
* `'failed'`. This is the one that matters: an undeclared skip is a pass
|
|
17
|
+
* with the evidence removed, which is the same shape as every defect this
|
|
18
|
+
* suite exists to catch.
|
|
19
|
+
*/
|
|
20
|
+
import { sessionLifecycleConformance } from './cases.js';
|
|
21
|
+
/** Unique enough that two runs against one shared backend cannot collide. */
|
|
22
|
+
let counter = 0;
|
|
23
|
+
function kitFor(harness) {
|
|
24
|
+
const run = `cnf-${Date.now().toString(36)}-${(++counter).toString(36)}`;
|
|
25
|
+
let nth = 0;
|
|
26
|
+
return {
|
|
27
|
+
harness,
|
|
28
|
+
id: (suffix) => `${run}-${(++nth).toString(36)}-${suffix}`,
|
|
29
|
+
envelope: (text, principal, savedAt) => buildEnvelope(text, principal, savedAt),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A minimal, VALID stored conversation.
|
|
34
|
+
*
|
|
35
|
+
* Built here rather than through `toEnvelope` so `savedAt` is the caller's —
|
|
36
|
+
* the paging case needs several conversations to share one timestamp, which is
|
|
37
|
+
* the only way to make a listing's tie-break the thing under test.
|
|
38
|
+
*/
|
|
39
|
+
function buildEnvelope(text, principal, savedAt) {
|
|
40
|
+
return {
|
|
41
|
+
format: 'conversation-v1',
|
|
42
|
+
savedAt: savedAt ?? 1_700_000_000_000,
|
|
43
|
+
data: {
|
|
44
|
+
version: 1,
|
|
45
|
+
runId: `run-${text.replace(/\W+/g, '-')}`,
|
|
46
|
+
history: [
|
|
47
|
+
{ role: 'user', content: text },
|
|
48
|
+
{ role: 'assistant', content: `re: ${text}` },
|
|
49
|
+
],
|
|
50
|
+
lastCompletedIteration: 1,
|
|
51
|
+
originalInput: { message: text },
|
|
52
|
+
checkpointedAt: savedAt ?? 1_700_000_000_000,
|
|
53
|
+
...(principal !== undefined && { identity: { principal } }),
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/** Is this member there to be called? The same detection every door uses. */
|
|
58
|
+
function has(store, member) {
|
|
59
|
+
return typeof store[member] === 'function';
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Run ONE case against one store, building and disposing the store around it.
|
|
63
|
+
*
|
|
64
|
+
* Exported because a test framework wants one assertion per case: iterate
|
|
65
|
+
* {@link sessionLifecycleConformance}, call this, and turn the outcome into a
|
|
66
|
+
* `it()`. That gives per-case granularity in any framework without this module
|
|
67
|
+
* knowing what a framework is.
|
|
68
|
+
*/
|
|
69
|
+
export async function runSessionLifecycleCase(testCase, harness) {
|
|
70
|
+
const head = { case: testCase.name, law: testCase.law };
|
|
71
|
+
const declaredReason = harness.declared?.[testCase.name];
|
|
72
|
+
let store;
|
|
73
|
+
try {
|
|
74
|
+
store = await harness.createStore();
|
|
75
|
+
for (const member of testCase.members ?? []) {
|
|
76
|
+
// Not applicable BEFORE declared: a store that does not implement
|
|
77
|
+
// `ownerOf` at all has nothing to declare about it, and reporting a
|
|
78
|
+
// declaration there would make the store look like it fell short of
|
|
79
|
+
// something the port never asked it for.
|
|
80
|
+
if (!has(store, member))
|
|
81
|
+
return { ...head, status: 'not-applicable', missing: member };
|
|
82
|
+
}
|
|
83
|
+
if (testCase.harnessNeeds?.includes('corrupt') && harness.corrupt === undefined) {
|
|
84
|
+
if (declaredReason !== undefined) {
|
|
85
|
+
return { ...head, status: 'declared', reason: declaredReason, stillFails: true };
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
...head,
|
|
89
|
+
status: 'failed',
|
|
90
|
+
error: new Error(`[conformance] '${testCase.name}' needs harness.corrupt() and this harness has ` +
|
|
91
|
+
`none — so the case did not run, and a case that did not run must never look ` +
|
|
92
|
+
`like one that passed. Supply the hook, or DECLARE this case by name with the ` +
|
|
93
|
+
`reason your store cannot be corrupted from outside:\n` +
|
|
94
|
+
` declared: { '${testCase.name}': 'why not' }`),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
await testCase.run(store, kitFor(harness));
|
|
98
|
+
}
|
|
99
|
+
catch (err) {
|
|
100
|
+
const error = err instanceof Error ? err : new Error(String(err));
|
|
101
|
+
// A declared case that still fails is the harness telling the truth.
|
|
102
|
+
if (declaredReason !== undefined) {
|
|
103
|
+
return { ...head, status: 'declared', reason: declaredReason, stillFails: true };
|
|
104
|
+
}
|
|
105
|
+
return { ...head, status: 'failed', error };
|
|
106
|
+
}
|
|
107
|
+
finally {
|
|
108
|
+
if (store !== undefined) {
|
|
109
|
+
try {
|
|
110
|
+
await harness.disposeStore?.(store);
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
/* A store that could not be torn down must not rewrite the verdict of
|
|
114
|
+
the case that was using it — the case's own result is the finding. */
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// It PASSED. If it was declared, the declaration is stale — worth saying,
|
|
119
|
+
// because a suppression nobody revisits is how a fixed defect keeps its
|
|
120
|
+
// exemption and a real one inherits it later.
|
|
121
|
+
if (declaredReason !== undefined) {
|
|
122
|
+
return { ...head, status: 'declared', reason: declaredReason, stillFails: false };
|
|
123
|
+
}
|
|
124
|
+
return { ...head, status: 'passed' };
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Run the whole battery against one store and report.
|
|
128
|
+
*
|
|
129
|
+
* @example Claiming the port for a store of your own
|
|
130
|
+
* const report = await runSessionLifecycleConformance({
|
|
131
|
+
* name: 'ourOwnSessions',
|
|
132
|
+
* createStore: () => ourOwnSessions({ pool }),
|
|
133
|
+
* disposeStore: (store) => store.close(),
|
|
134
|
+
* });
|
|
135
|
+
* if (!report.ok) throw new Error(formatConformanceReport(report));
|
|
136
|
+
*/
|
|
137
|
+
export async function runSessionLifecycleConformance(harness) {
|
|
138
|
+
const outcomes = [];
|
|
139
|
+
for (const testCase of sessionLifecycleConformance) {
|
|
140
|
+
outcomes.push(await runSessionLifecycleCase(testCase, harness));
|
|
141
|
+
}
|
|
142
|
+
const count = (status) => outcomes.filter((o) => o.status === status).length;
|
|
143
|
+
const failed = count('failed');
|
|
144
|
+
return {
|
|
145
|
+
store: harness.name,
|
|
146
|
+
outcomes,
|
|
147
|
+
passed: count('passed'),
|
|
148
|
+
notApplicable: count('not-applicable'),
|
|
149
|
+
declared: count('declared'),
|
|
150
|
+
failed,
|
|
151
|
+
ok: failed === 0,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* The report as something to put in a failure message or a log — one line per
|
|
156
|
+
* case, with the reason a case did not simply pass.
|
|
157
|
+
*/
|
|
158
|
+
export function formatConformanceReport(report) {
|
|
159
|
+
const lines = [
|
|
160
|
+
`SessionLifecycle conformance — ${report.store}: ${report.passed} passed, ` +
|
|
161
|
+
`${report.declared} declared, ${report.notApplicable} n/a, ${report.failed} FAILED`,
|
|
162
|
+
];
|
|
163
|
+
for (const outcome of report.outcomes) {
|
|
164
|
+
if (outcome.status === 'passed') {
|
|
165
|
+
lines.push(` ok ${outcome.case}`);
|
|
166
|
+
}
|
|
167
|
+
else if (outcome.status === 'not-applicable') {
|
|
168
|
+
lines.push(` n/a ${outcome.case} — no ${outcome.missing}() on this store`);
|
|
169
|
+
}
|
|
170
|
+
else if (outcome.status === 'declared') {
|
|
171
|
+
lines.push(` declared ${outcome.case} — ${outcome.reason}` +
|
|
172
|
+
(outcome.stillFails ? '' : ' [STALE: it passes now]'));
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
lines.push(` FAILED ${outcome.case}`);
|
|
176
|
+
lines.push(` law: ${outcome.law}`);
|
|
177
|
+
lines.push(` ${outcome.error.message.split('\n').join('\n ')}`);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return lines.join('\n');
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../../src/hosting/conformance/run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAWzD,6EAA6E;AAC7E,IAAI,OAAO,GAAG,CAAC,CAAC;AAEhB,SAAS,MAAM,CAAC,OAA4B;IAC1C,MAAM,GAAG,GAAG,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;IACzE,IAAI,GAAG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AAC,0BAA0B,CAAC,CACzD,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,eAAe,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;YAC1C,KAAK,CAAC,IAAI,CAAC,oBAAoB,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;YAC9C,KAAK,CAAC,IAAI,CAAC,eAAe,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hosting/conformance/types — what a store presents to the battery, and what
|
|
3
|
+
* the battery hands back.
|
|
4
|
+
*/
|
|
5
|
+
import type { CheckpointEnvelope, SessionLifecycle } from '../types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Every case in the battery, by name.
|
|
8
|
+
*
|
|
9
|
+
* A closed union on purpose. A harness DECLARES the cases it cannot satisfy by
|
|
10
|
+
* writing their names down, and a name that is a free-form string is a name
|
|
11
|
+
* that goes stale silently — a declaration for a case that was renamed would
|
|
12
|
+
* keep suppressing nothing at all, which is the same shape as the bug this
|
|
13
|
+
* whole suite exists to catch.
|
|
14
|
+
*/
|
|
15
|
+
export type SessionLifecycleCaseName = 'absent-session-hydrates-undefined' | 'persist-hydrate-round-trip' | 'unreadable-is-not-absent' | 'forget-removes-the-conversation' | 'ownership-is-derived-from-the-envelope' | 'ownership-fills-in-on-a-later-signed-turn' | 'ownership-survives-a-leaner-turn' | 'ownership-is-not-taken-by-a-different-signer' | 'contested-write-leaves-no-split-brain' | 'owner-of-is-undefined-for-missing-and-unowned' | 'list-by-user-pages-with-a-stable-tie-break' | 'awkward-session-ids-round-trip' | 'optional-members-are-feature-detected';
|
|
16
|
+
/**
|
|
17
|
+
* Members a case cannot run without.
|
|
18
|
+
*
|
|
19
|
+
* `listByUser` and `ownerOf` are OPTIONAL on the port, and `forget` is not on
|
|
20
|
+
* it at all — so a store that lacks one is not failing anything, and a case
|
|
21
|
+
* about it is reported `'not-applicable'` rather than passed or failed. That
|
|
22
|
+
* distinction is the port's own feature-detection rule, applied to its own
|
|
23
|
+
* test battery.
|
|
24
|
+
*/
|
|
25
|
+
export type SessionStoreMember = 'listByUser' | 'ownerOf' | 'forget';
|
|
26
|
+
/**
|
|
27
|
+
* How the battery reaches one store.
|
|
28
|
+
*
|
|
29
|
+
* A factory rather than an instance, because most of the battery needs a store
|
|
30
|
+
* with NOTHING in it — a listing case that saw another case's rows would be
|
|
31
|
+
* asserting on somebody else's fixtures — and because a store that has been
|
|
32
|
+
* closed, or whose file was removed, cannot be reset in place. One store per
|
|
33
|
+
* case, disposed after it, is the only shape that holds for a `Map`, a file, a
|
|
34
|
+
* transaction and a managed service at once.
|
|
35
|
+
*/
|
|
36
|
+
export interface SessionStoreHarness {
|
|
37
|
+
/** What this store is called in a report. */
|
|
38
|
+
readonly name: string;
|
|
39
|
+
/**
|
|
40
|
+
* A fresh store holding no sessions. Called once per case.
|
|
41
|
+
*
|
|
42
|
+
* May be sync or async: some stores open a file, some await a connection,
|
|
43
|
+
* and a battery that demanded one shape would exclude half the stores it is
|
|
44
|
+
* here to check.
|
|
45
|
+
*/
|
|
46
|
+
createStore(): SessionLifecycle | Promise<SessionLifecycle>;
|
|
47
|
+
/**
|
|
48
|
+
* Release what `createStore` acquired. Called after every case, including
|
|
49
|
+
* the ones that failed — a store left open by a failing case is a file
|
|
50
|
+
* handle leak that shows up three cases later as a confusing second failure.
|
|
51
|
+
*/
|
|
52
|
+
disposeStore?(store: SessionLifecycle): void | Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Replace one session's stored bytes with something that is NOT a readable
|
|
55
|
+
* envelope, behind the store's back.
|
|
56
|
+
*
|
|
57
|
+
* There is no portable way to do this — it is a poke at the backing table,
|
|
58
|
+
* the file, or the document — so it is the harness's job. A store that
|
|
59
|
+
* cannot be corrupted from outside must DECLARE
|
|
60
|
+
* `'unreadable-is-not-absent'` with the reason.
|
|
61
|
+
*/
|
|
62
|
+
corrupt?(store: SessionLifecycle, sessionId: string): void | Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Cases this store cannot satisfy, BY NAME, each with the reason.
|
|
65
|
+
*
|
|
66
|
+
* The reason is required, and it is the point. A store may legitimately be
|
|
67
|
+
* unable to satisfy a case — a service whose owner field is immutable at
|
|
68
|
+
* creation cannot fill one in on turn two — and the honest way to record
|
|
69
|
+
* that is a sentence somebody can disagree with. A silent skip is a pass
|
|
70
|
+
* with the evidence removed.
|
|
71
|
+
*
|
|
72
|
+
* A declared case still RUNS. If it turns out to pass, the report says so,
|
|
73
|
+
* and the declaration is stale: a gate that absolves itself is worth
|
|
74
|
+
* catching, and so is a gate nobody needed.
|
|
75
|
+
*/
|
|
76
|
+
readonly declared?: Partial<Record<SessionLifecycleCaseName, string>>;
|
|
77
|
+
}
|
|
78
|
+
/** The helpers a case is handed, beside the store. */
|
|
79
|
+
export interface ConformanceKit {
|
|
80
|
+
/** A session id nothing else in this run uses. */
|
|
81
|
+
id(suffix: string): string;
|
|
82
|
+
/** A stored conversation, signed by `principal` when one is given. */
|
|
83
|
+
envelope(text: string, principal?: string, savedAt?: number): CheckpointEnvelope;
|
|
84
|
+
/** The harness, for the cases that need one of its hooks. */
|
|
85
|
+
readonly harness: SessionStoreHarness;
|
|
86
|
+
}
|
|
87
|
+
/** One case in the battery. */
|
|
88
|
+
export interface SessionLifecycleCase {
|
|
89
|
+
readonly name: SessionLifecycleCaseName;
|
|
90
|
+
/** The law it holds, in one sentence — printed beside a failure. */
|
|
91
|
+
readonly law: string;
|
|
92
|
+
/** Store members without which this case does not apply. */
|
|
93
|
+
readonly members?: readonly SessionStoreMember[];
|
|
94
|
+
/** Harness hooks without which this case cannot run at all. */
|
|
95
|
+
readonly harnessNeeds?: readonly 'corrupt'[];
|
|
96
|
+
run(store: SessionLifecycle, kit: ConformanceKit): Promise<void>;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* How one case came out.
|
|
100
|
+
*
|
|
101
|
+
* - `'passed'` — the store holds the law.
|
|
102
|
+
* - `'not-applicable'` — the case is about an OPTIONAL member this store does
|
|
103
|
+
* not implement. Feature detection, not a gap.
|
|
104
|
+
* - `'declared'` — the store implements the member and cannot satisfy the
|
|
105
|
+
* case, and said so by name. `stillFails: false` means the declaration is
|
|
106
|
+
* stale: it passes now.
|
|
107
|
+
* - `'failed'` — including "needed a harness hook nobody provided and nobody
|
|
108
|
+
* declared", because an undeclared skip is exactly what this suite refuses
|
|
109
|
+
* to let look like a pass.
|
|
110
|
+
*/
|
|
111
|
+
export type SessionLifecycleOutcome = {
|
|
112
|
+
readonly case: SessionLifecycleCaseName;
|
|
113
|
+
readonly law: string;
|
|
114
|
+
} & ({
|
|
115
|
+
readonly status: 'passed';
|
|
116
|
+
} | {
|
|
117
|
+
readonly status: 'not-applicable';
|
|
118
|
+
readonly missing: SessionStoreMember;
|
|
119
|
+
} | {
|
|
120
|
+
readonly status: 'declared';
|
|
121
|
+
readonly reason: string;
|
|
122
|
+
readonly stillFails: boolean;
|
|
123
|
+
} | {
|
|
124
|
+
readonly status: 'failed';
|
|
125
|
+
readonly error: Error;
|
|
126
|
+
});
|
|
127
|
+
/** What one store's whole run came to. */
|
|
128
|
+
export interface SessionLifecycleReport {
|
|
129
|
+
/** The harness name. */
|
|
130
|
+
readonly store: string;
|
|
131
|
+
readonly outcomes: readonly SessionLifecycleOutcome[];
|
|
132
|
+
readonly passed: number;
|
|
133
|
+
readonly notApplicable: number;
|
|
134
|
+
readonly declared: number;
|
|
135
|
+
readonly failed: number;
|
|
136
|
+
/** True when nothing failed. Declarations do not make a store non-conformant
|
|
137
|
+
* — they make it conformant WITH STATED LIMITS, which is a different claim
|
|
138
|
+
* and the report prints both. */
|
|
139
|
+
readonly ok: boolean;
|
|
140
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/hosting/conformance/types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -390,6 +390,40 @@ export declare class SessionNotFoundError extends Error {
|
|
|
390
390
|
readonly sessionId: string;
|
|
391
391
|
constructor(sessionId: string);
|
|
392
392
|
}
|
|
393
|
+
/**
|
|
394
|
+
* A `persist` would have left the ownership index naming one person and the
|
|
395
|
+
* stored conversation naming another (9.36.1).
|
|
396
|
+
*
|
|
397
|
+
* ── The split brain this exists to prevent ──────────────────────────────────
|
|
398
|
+
* The write-once rule protects the INDEX and said nothing about the PAYLOAD.
|
|
399
|
+
* Two writers signing the same fresh session therefore produced a store where
|
|
400
|
+
* `ownerOf(session)` answered the FIRST writer and the stored envelope carried
|
|
401
|
+
* the SECOND writer's whole conversation — and the envelope carries its own
|
|
402
|
+
* identity. The first writer lists the session, opens it, and reads somebody
|
|
403
|
+
* else's conversation. That is not a race in one backend: it was reproduced in
|
|
404
|
+
* a live trial and then found, by inspection, in every store implementing this
|
|
405
|
+
* contract, because the flaw was in the contract rather than in any of them.
|
|
406
|
+
*
|
|
407
|
+
* So the rule gained its missing half: **a different non-empty identity is
|
|
408
|
+
* refused, and an absent one is allowed.** A leaner turn claims nobody and
|
|
409
|
+
* cannot contradict anybody — the contract explicitly blesses it — while a
|
|
410
|
+
* turn signed by somebody else is a contradiction, and a store that stored it
|
|
411
|
+
* would be a store where ownership is decided by who wrote last.
|
|
412
|
+
*
|
|
413
|
+
* ── What this refusal will not tell you ─────────────────────────────────────
|
|
414
|
+
* Neither name. Not the owner, not the caller, not a line of either
|
|
415
|
+
* conversation. An error is read by whoever provoked it, and a refusal that
|
|
416
|
+
* names the person who owns a session is an oracle for who is signed in — the
|
|
417
|
+
* same law {@link SessionNotFoundError} and {@link ArtifactNotFoundError}
|
|
418
|
+
* follow. The session id is here because it is the caller's own string, which
|
|
419
|
+
* is the one thing the message teaches nobody anything by repeating.
|
|
420
|
+
*/
|
|
421
|
+
export declare class SessionOwnershipConflictError extends Error {
|
|
422
|
+
readonly code: "ERR_SESSION_OWNERSHIP_CONFLICT";
|
|
423
|
+
/** The id that was written to — the caller's own string, nothing learned. */
|
|
424
|
+
readonly sessionId: string;
|
|
425
|
+
constructor(sessionId: string);
|
|
426
|
+
}
|
|
393
427
|
/**
|
|
394
428
|
* A session-history result resolved and the reply cannot describe it.
|
|
395
429
|
*
|
|
@@ -593,6 +593,53 @@ export class SessionNotFoundError extends Error {
|
|
|
593
593
|
this.sessionId = sessionId;
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
+
/**
|
|
597
|
+
* A `persist` would have left the ownership index naming one person and the
|
|
598
|
+
* stored conversation naming another (9.36.1).
|
|
599
|
+
*
|
|
600
|
+
* ── The split brain this exists to prevent ──────────────────────────────────
|
|
601
|
+
* The write-once rule protects the INDEX and said nothing about the PAYLOAD.
|
|
602
|
+
* Two writers signing the same fresh session therefore produced a store where
|
|
603
|
+
* `ownerOf(session)` answered the FIRST writer and the stored envelope carried
|
|
604
|
+
* the SECOND writer's whole conversation — and the envelope carries its own
|
|
605
|
+
* identity. The first writer lists the session, opens it, and reads somebody
|
|
606
|
+
* else's conversation. That is not a race in one backend: it was reproduced in
|
|
607
|
+
* a live trial and then found, by inspection, in every store implementing this
|
|
608
|
+
* contract, because the flaw was in the contract rather than in any of them.
|
|
609
|
+
*
|
|
610
|
+
* So the rule gained its missing half: **a different non-empty identity is
|
|
611
|
+
* refused, and an absent one is allowed.** A leaner turn claims nobody and
|
|
612
|
+
* cannot contradict anybody — the contract explicitly blesses it — while a
|
|
613
|
+
* turn signed by somebody else is a contradiction, and a store that stored it
|
|
614
|
+
* would be a store where ownership is decided by who wrote last.
|
|
615
|
+
*
|
|
616
|
+
* ── What this refusal will not tell you ─────────────────────────────────────
|
|
617
|
+
* Neither name. Not the owner, not the caller, not a line of either
|
|
618
|
+
* conversation. An error is read by whoever provoked it, and a refusal that
|
|
619
|
+
* names the person who owns a session is an oracle for who is signed in — the
|
|
620
|
+
* same law {@link SessionNotFoundError} and {@link ArtifactNotFoundError}
|
|
621
|
+
* follow. The session id is here because it is the caller's own string, which
|
|
622
|
+
* is the one thing the message teaches nobody anything by repeating.
|
|
623
|
+
*/
|
|
624
|
+
export class SessionOwnershipConflictError extends Error {
|
|
625
|
+
code = 'ERR_SESSION_OWNERSHIP_CONFLICT';
|
|
626
|
+
/** The id that was written to — the caller's own string, nothing learned. */
|
|
627
|
+
sessionId;
|
|
628
|
+
constructor(sessionId) {
|
|
629
|
+
super(`[hosting] refusing to persist session '${sessionId}': it already belongs to a ` +
|
|
630
|
+
`different signed-in person than the one this conversation is signed by. ` +
|
|
631
|
+
`Ownership is established by the FIRST turn that signs for a conversation and no ` +
|
|
632
|
+
`later write moves it, so storing this envelope would leave the ownership index ` +
|
|
633
|
+
`naming one person and the stored conversation naming another — and the person the ` +
|
|
634
|
+
`index names would open it and read the other one's conversation. ` +
|
|
635
|
+
`Neither name appears in this message on purpose. ` +
|
|
636
|
+
`What to do: write this turn under a NEW session id, or continue the existing one ` +
|
|
637
|
+
`under the identity that already owns it. Configuring 'identity' on standingAgent ` +
|
|
638
|
+
`refuses a foreign turn at the door, before it ever reaches the store.`);
|
|
639
|
+
this.name = 'SessionOwnershipConflictError';
|
|
640
|
+
this.sessionId = sessionId;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
596
643
|
/**
|
|
597
644
|
* A session-history result resolved and the reply cannot describe it.
|
|
598
645
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/hosting/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD;;;;;GAKG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAC/B,IAAI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M,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACjF,MAAM,IAAI,KAAK,CACb,kBAAkB,IAAI,CAAC,IAAI,4BAA4B,UAAU,KAAK;QACpE,eAAe,GAAG,wBAAwB;QAC1C,+BAA+B,UAAU,uCAAuC;QAChF,oFAAoF,CACvF,CAAC;AACJ,CAAC"}
|
|
@@ -95,8 +95,11 @@ export type { SqliteSessions, SqliteSessionsOptions } from './sqliteSessions.js'
|
|
|
95
95
|
export { toEnvelope, envelopeOwner, envelopeTranscript, toPausedEnvelope, readEnvelope, readPausedRun, checkEnvelope, } from './envelope.js';
|
|
96
96
|
export { standingAgent } from './standingAgent.js';
|
|
97
97
|
export { DEFAULT_MAX_ACTIVE_SESSIONS } from './types.js';
|
|
98
|
-
export { requireCapability, HostClosedError, ConcurrentRunError, PauseNotCarriedError, AwaitingDecisionError, NoPendingAskError, UnreadableEnvelopeError, ConversationClosedError, FrameTooLargeError, InvalidWireOpError, ArtifactSessionRequiredError, NoArtifactStoreError, ArtifactNotFoundError, ArtifactNotCarriedError, IdentityNotVerifiedError, VerifierUnavailableError, AdmissionRefusedError, SessionOpNeedsIdentityError, SessionIndexUnavailableError, SessionNotFoundError, SessionsNotCarriedError, } from './errors.js';
|
|
98
|
+
export { requireCapability, HostClosedError, ConcurrentRunError, PauseNotCarriedError, AwaitingDecisionError, NoPendingAskError, UnreadableEnvelopeError, ConversationClosedError, FrameTooLargeError, InvalidWireOpError, ArtifactSessionRequiredError, NoArtifactStoreError, ArtifactNotFoundError, ArtifactNotCarriedError, IdentityNotVerifiedError, VerifierUnavailableError, AdmissionRefusedError, SessionOpNeedsIdentityError, SessionIndexUnavailableError, SessionNotFoundError, SessionOwnershipConflictError, SessionsNotCarriedError, } from './errors.js';
|
|
99
99
|
export type { IdentityFailureClass } from './errors.js';
|
|
100
|
+
export { resolveSessionOwner } from './sessionOwnership.js';
|
|
101
|
+
export { formatConformanceReport, runSessionLifecycleCase, runSessionLifecycleConformance, sessionLifecycleConformance, } from './conformance/index.js';
|
|
102
|
+
export type { ConformanceKit, SessionLifecycleCase, SessionLifecycleCaseName, SessionLifecycleOutcome, SessionLifecycleReport, SessionStoreHarness, SessionStoreMember, } from './conformance/index.js';
|
|
100
103
|
export { bearerToken, verifyRequestIdentity } from './identityVerification.js';
|
|
101
104
|
export type { IdentityVerificationOptions, IdentityVerifier, VerifiedIdentity, } from './identityVerification.js';
|
|
102
105
|
export { spendKeyFor, spendLedger, turnsPerHour } from './admission.js';
|
|
@@ -98,7 +98,17 @@ export { sqliteSessions, SqliteUnavailableError, UnreadableSessionFileError, } f
|
|
|
98
98
|
export { toEnvelope, envelopeOwner, envelopeTranscript, toPausedEnvelope, readEnvelope, readPausedRun, checkEnvelope, } from './envelope.js';
|
|
99
99
|
export { standingAgent } from './standingAgent.js';
|
|
100
100
|
export { DEFAULT_MAX_ACTIVE_SESSIONS } from './types.js';
|
|
101
|
-
export { requireCapability, HostClosedError, ConcurrentRunError, PauseNotCarriedError, AwaitingDecisionError, NoPendingAskError, UnreadableEnvelopeError, ConversationClosedError, FrameTooLargeError, InvalidWireOpError, ArtifactSessionRequiredError, NoArtifactStoreError, ArtifactNotFoundError, ArtifactNotCarriedError, IdentityNotVerifiedError, VerifierUnavailableError, AdmissionRefusedError, SessionOpNeedsIdentityError, SessionIndexUnavailableError, SessionNotFoundError, SessionsNotCarriedError, } from './errors.js';
|
|
101
|
+
export { requireCapability, HostClosedError, ConcurrentRunError, PauseNotCarriedError, AwaitingDecisionError, NoPendingAskError, UnreadableEnvelopeError, ConversationClosedError, FrameTooLargeError, InvalidWireOpError, ArtifactSessionRequiredError, NoArtifactStoreError, ArtifactNotFoundError, ArtifactNotCarriedError, IdentityNotVerifiedError, VerifierUnavailableError, AdmissionRefusedError, SessionOpNeedsIdentityError, SessionIndexUnavailableError, SessionNotFoundError, SessionOwnershipConflictError, SessionsNotCarriedError, } from './errors.js';
|
|
102
|
+
// The one owner-transition rule (9.36.1) — shared by every store here, and
|
|
103
|
+
// available to any store anybody else writes. Four adapters each spelling this
|
|
104
|
+
// rule out in their own dialect is how all four came to be missing the same
|
|
105
|
+
// half of it.
|
|
106
|
+
export { resolveSessionOwner } from './sessionOwnership.js';
|
|
107
|
+
// The battery a store must pass to CLAIM the port (9.36.1), exported beside
|
|
108
|
+
// the port itself so an out-of-tree store imports the check the same way it
|
|
109
|
+
// imports the interface it is implementing.
|
|
110
|
+
// See src/hosting/conformance/README.md.
|
|
111
|
+
export { formatConformanceReport, runSessionLifecycleCase, runSessionLifecycleConformance, sessionLifecycleConformance, } from './conformance/index.js';
|
|
102
112
|
// Verified identity at the door (9.26.0) — the badge is CHECKED instead of
|
|
103
113
|
// read off. `IdentityVerifier` is the port; `jwksIdentity` (from
|
|
104
114
|
// `agentfootprint/security`) is the shipped adapter; `bearerToken` is the one
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hosting/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsFG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEzF,6EAA6E;AAC7E,2EAA2E;AAC3E,+EAA+E;AAC/E,0EAA0E;AAC1E,+EAA+E;AAC/E,oCAAoC;AAEpC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAWtD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EACL,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EA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C5C,yCAAyC;AACzC,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,wBAAwB,CAAC;AAWhC,2EAA2E;AAC3E,iEAAiE;AACjE,8EAA8E;AAC9E,yDAAyD;AACzD,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAO/E,+EAA+E;AAC/E,uEAAuE;AACvE,2DAA2D;AAC3D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAuBxE,+EAA+E;AAC/E,yEAAyE;AACzE,qBAAqB;AACrB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGrF,8EAA8E;AAC9E,6EAA6E;AAC7E,yEAAyE;AACzE,0EAA0E;AAC1E,2EAA2E;AAC3E,2BAA2B;AAC3B,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,mBAAmB,CAAC"}
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
* a store that let you state an owner is a store where owning somebody's
|
|
23
23
|
* session is a matter of asking. A conversation that ran anonymously has no
|
|
24
24
|
* owner and appears in nobody's list.
|
|
25
|
+
*
|
|
26
|
+
* Since 9.36.1 the owner rule is not written out here at all: it is
|
|
27
|
+
* `resolveSessionOwner`, shared with every other store, because four stores
|
|
28
|
+
* each spelling the same rule in their own dialect is how all four came to be
|
|
29
|
+
* missing the same half of it.
|
|
25
30
|
*/
|
|
26
31
|
import type { SessionLifecycle } from './types.js';
|
|
27
32
|
/**
|
|
@@ -22,8 +22,14 @@
|
|
|
22
22
|
* a store that let you state an owner is a store where owning somebody's
|
|
23
23
|
* session is a matter of asking. A conversation that ran anonymously has no
|
|
24
24
|
* owner and appears in nobody's list.
|
|
25
|
+
*
|
|
26
|
+
* Since 9.36.1 the owner rule is not written out here at all: it is
|
|
27
|
+
* `resolveSessionOwner`, shared with every other store, because four stores
|
|
28
|
+
* each spelling the same rule in their own dialect is how all four came to be
|
|
29
|
+
* missing the same half of it.
|
|
25
30
|
*/
|
|
26
31
|
import { envelopeOwner } from './envelope.js';
|
|
32
|
+
import { resolveSessionOwner } from './sessionOwnership.js';
|
|
27
33
|
/** How many rows one `listByUser` page carries when the caller names no limit. */
|
|
28
34
|
const DEFAULT_PAGE = 50;
|
|
29
35
|
/**
|
|
@@ -60,25 +66,27 @@ export function memorySessions() {
|
|
|
60
66
|
};
|
|
61
67
|
return {
|
|
62
68
|
hydrate: (sessionId) => Promise.resolve(stored.get(sessionId)),
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
// `async` so the ownership refusal below arrives as a REJECTION. This
|
|
70
|
+
// method returns a promise on the happy path, and one that threw
|
|
71
|
+
// synchronously on the sad one would need two error handlers from every
|
|
72
|
+
// caller — and the one they forget is the one that fires at 3am. The
|
|
73
|
+
// sibling file store states the same rule over its three methods.
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
75
|
+
persist: async (sessionId, envelope) => {
|
|
76
|
+
// DECIDE BEFORE WRITING. The order is the whole fix (9.36.1): this used
|
|
77
|
+
// to store the envelope first and then guard only the index, so a turn
|
|
78
|
+
// signed by somebody else kept the first writer's `owner` and stored the
|
|
79
|
+
// second writer's entire conversation — index and payload naming
|
|
80
|
+
// different people, and the one the index named reading the other's
|
|
81
|
+
// conversation. `resolveSessionOwner` is the one rule; see its table.
|
|
68
82
|
//
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
//
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
//
|
|
76
|
-
// The composer refuses a foreign turn long before this line is reached;
|
|
77
|
-
// this is the store keeping its own promise, for every caller that holds
|
|
78
|
-
// it directly.
|
|
79
|
-
if (owner !== undefined && !owners.has(sessionId))
|
|
83
|
+
// A conflict throws out of here having touched nothing. Single-threaded
|
|
84
|
+
// is all the atomicity a `Map` needs: no `await` sits between the read
|
|
85
|
+
// and the writes below, so nothing can interleave into them.
|
|
86
|
+
const owner = resolveSessionOwner(sessionId, owners.get(sessionId), envelopeOwner(envelope));
|
|
87
|
+
stored.set(sessionId, envelope);
|
|
88
|
+
if (owner !== undefined)
|
|
80
89
|
owners.set(sessionId, owner);
|
|
81
|
-
return Promise.resolve();
|
|
82
90
|
},
|
|
83
91
|
listByUser: (userId, options) => {
|
|
84
92
|
const rows = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memorySessions.js","sourceRoot":"","sources":["../../../src/hosting/memorySessions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"memorySessions.js","sourceRoot":"","sources":["../../../src/hosting/memorySessions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAQ5D,kFAAkF;AAClF,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,MAAM,GAAG,IAAI,GAAG,EAA8B,CAAC;IACrD;;;+BAG2B;IAC3B,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEzC;;gEAE4D;IAC5D,MAAM,OAAO,GAAG,CAAC,QAA4B,EAAU,EAAE;QACvD,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAmE,CAAC;QAC1F,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,KAAK,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,I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