@vellumai/assistant 0.10.1-dev.202606240206.7c2bca6 → 0.10.1-staging.2
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/eslint-rules/cli-no-daemon-internals.js +0 -6
- package/node_modules/@vellumai/gateway-client/src/__tests__/trust-verdict-contract.test.ts +0 -31
- package/node_modules/@vellumai/gateway-client/src/index.ts +0 -14
- package/node_modules/@vellumai/gateway-client/src/trust-verdict-contract.ts +0 -17
- package/openapi.yaml +0 -23
- package/package.json +1 -1
- package/scripts/test.sh +15 -36
- package/src/__tests__/actor-token-service.test.ts +14 -36
- package/src/__tests__/anthropic-provider.test.ts +0 -67
- package/src/__tests__/call-controller.test.ts +0 -19
- package/src/__tests__/channel-guardian.test.ts +0 -26
- package/src/__tests__/config-loader-backfill.test.ts +1 -5
- package/src/__tests__/config-schema.test.ts +0 -1
- package/src/__tests__/conversation-agent-loop.test.ts +0 -4
- package/src/__tests__/conversation-queue.test.ts +0 -89
- package/src/__tests__/conversation-routes-guardian-reply.test.ts +0 -12
- package/src/__tests__/conversation-routes-slash-commands.test.ts +0 -12
- package/src/__tests__/conversation-surfaces-activation-emit.test.ts +3 -3
- package/src/__tests__/conversation-surfaces-task-progress.test.ts +0 -352
- package/src/__tests__/conversation-tool-setup-attribution.test.ts +0 -47
- package/src/__tests__/deterministic-verification-control-plane.test.ts +2 -4
- package/src/__tests__/dynamic-page-surface.test.ts +94 -0
- package/src/__tests__/emit-signal-routing-intent.test.ts +5 -10
- package/src/__tests__/events-dev-bypass-actor.test.ts +1 -7
- package/src/__tests__/guardian-binding-drift-heal.test.ts +10 -75
- package/src/__tests__/guardian-dispatch.test.ts +1 -95
- package/src/__tests__/guardian-outbound-http.test.ts +0 -13
- package/src/__tests__/helpers/channel-test-adapter.ts +7 -1
- package/src/__tests__/host-app-control-routes.test.ts +30 -24
- package/src/__tests__/host-bash-routes.test.ts +41 -31
- package/src/__tests__/host-browser-routes.test.ts +32 -26
- package/src/__tests__/host-cu-routes-targeted.test.ts +33 -25
- package/src/__tests__/host-file-routes-targeted.test.ts +52 -40
- package/src/__tests__/host-transfer-routes-targeted.test.ts +43 -31
- package/src/__tests__/http-user-message-parity.test.ts +8 -165
- package/src/__tests__/llm-context-normalization.test.ts +0 -105
- package/src/__tests__/llm-resolver.test.ts +5 -205
- package/src/__tests__/llm-usage-store.test.ts +0 -25
- package/src/__tests__/media-stream-server-integration.test.ts +0 -127
- package/src/__tests__/non-member-access-request.test.ts +17 -189
- package/src/__tests__/notification-broadcaster.test.ts +0 -4
- package/src/__tests__/notification-decision-recipient-context.test.ts +32 -33
- package/src/__tests__/notification-deep-link.test.ts +0 -4
- package/src/__tests__/notification-guardian-path.test.ts +0 -19
- package/src/__tests__/pending-interactions-resolved-event.test.ts +4 -7
- package/src/__tests__/relay-server.test.ts +22 -674
- package/src/__tests__/runtime-attachment-metadata.test.ts +1 -0
- package/src/__tests__/secret-ingress-http.test.ts +0 -12
- package/src/__tests__/send-endpoint-busy.test.ts +8 -30
- package/src/__tests__/skills.test.ts +0 -44
- package/src/__tests__/slack-inbound-verification.test.ts +2 -47
- package/src/__tests__/stt-hints.test.ts +13 -44
- package/src/__tests__/subagent-detail.test.ts +0 -27
- package/src/__tests__/subagent-disposal.test.ts +0 -65
- package/src/__tests__/tool-executor.test.ts +11 -16
- package/src/__tests__/twilio-routes.test.ts +0 -96
- package/src/api/events/ui-surface-show.ts +3 -8
- package/src/api/index.ts +0 -7
- package/src/api/responses/conversation-message.ts +0 -4
- package/src/api/responses/llm-request-log-entry.ts +0 -25
- package/src/api/responses/subagent-detail.ts +0 -17
- package/src/calls/__tests__/relay-setup-router.test.ts +4 -262
- package/src/calls/guardian-dispatch.ts +8 -10
- package/src/calls/inbound-trust-reader.ts +1 -17
- package/src/calls/media-stream-server.ts +0 -21
- package/src/calls/relay-server.ts +49 -166
- package/src/calls/relay-setup-router.ts +7 -37
- package/src/calls/stt-hints.ts +12 -9
- package/src/calls/twilio-routes.ts +3 -13
- package/src/cli/commands/__tests__/cache.test.ts +1 -8
- package/src/cli/commands/cache.ts +181 -194
- package/src/cli/commands/mcp.ts +218 -252
- package/src/cli/commands/memory/index.ts +0 -2
- package/src/cli/commands/plugins.ts +3 -75
- package/src/cli/lib/__tests__/list-installed-plugins.test.ts +1 -160
- package/src/cli/lib/list-installed-plugins.ts +1 -179
- package/src/config/llm-resolver.ts +14 -151
- package/src/config/loader.ts +5 -36
- package/src/config/schemas/__tests__/memory-v3.test.ts +0 -1
- package/src/config/schemas/memory-lifecycle.ts +0 -12
- package/src/config/schemas/memory-v3.ts +0 -7
- package/src/config/schemas/memory.ts +0 -4
- package/src/config/schemas/timeouts.ts +0 -8
- package/src/config/seed-inference-profiles.ts +5 -14
- package/src/config/skills.ts +5 -27
- package/src/contacts/contacts-write.ts +0 -3
- package/src/daemon/conversation-agent-loop.ts +0 -9
- package/src/daemon/conversation-process.ts +16 -35
- package/src/daemon/conversation-surfaces.ts +18 -273
- package/src/daemon/conversation-tool-setup.ts +1 -4
- package/src/daemon/conversation.ts +0 -1
- package/src/daemon/handlers/config-channels.ts +9 -9
- package/src/daemon/handlers/conversations.ts +0 -77
- package/src/daemon/lifecycle.ts +2 -28
- package/src/daemon/memory-v2-startup.test.ts +0 -72
- package/src/daemon/memory-v2-startup.ts +19 -87
- package/src/daemon/message-types/surfaces.ts +20 -11
- package/src/daemon/shutdown-handlers.ts +0 -20
- package/src/daemon/tool-setup-types.ts +0 -9
- package/src/ipc/__tests__/clients-list-ipc.test.ts +1 -1
- package/src/ipc/assistant-server.ts +2 -2
- package/src/memory/embedding-gemini.ts +1 -1
- package/src/memory/llm-usage-store.ts +20 -48
- package/src/memory/migrations/014-backfill-inbox-thread-state.ts +3 -13
- package/src/memory/migrations/136-drop-assistant-id-columns.ts +27 -52
- package/src/memory/migrations/209-strip-thinking-from-consolidated.ts +56 -130
- package/src/memory/migrations/schema-introspection.ts +0 -14
- package/src/memory/v2/__tests__/cli-command-store.test.ts +0 -25
- package/src/memory/v2/__tests__/skill-store.test.ts +0 -80
- package/src/memory/v2/cli-command-store.ts +38 -75
- package/src/memory/v2/prompts/consolidation.ts +82 -13
- package/src/memory/v2/prompts/router.ts +93 -21
- package/src/memory/v2/skill-store.ts +31 -68
- package/src/notifications/__tests__/broadcaster.test.ts +8 -16
- package/src/notifications/__tests__/decision-engine.test.ts +9 -78
- package/src/notifications/broadcaster.ts +1 -8
- package/src/notifications/decision-engine.ts +7 -15
- package/src/notifications/destination-resolver.ts +24 -68
- package/src/notifications/emit-signal.ts +14 -39
- package/src/permissions/question-prompter.test.ts +1 -1
- package/src/permissions/question-prompter.ts +4 -7
- package/src/plugin-api/index.ts +6 -6
- package/src/plugin-api/vision-support.test.ts +4 -28
- package/src/plugin-api/vision-support.ts +31 -66
- package/src/plugins/defaults/advisor/__tests__/consult.test.ts +0 -46
- package/src/plugins/defaults/advisor/consult.ts +1 -18
- package/src/plugins/defaults/advisor/tools/advisor.ts +0 -4
- package/src/plugins/defaults/image-fallback/__tests__/image-fallback.test.ts +7 -47
- package/src/plugins/defaults/image-fallback/hooks/post-tool-use.ts +11 -10
- package/src/plugins/defaults/image-fallback/hooks/user-prompt-submit.ts +20 -12
- package/src/plugins/defaults/image-fallback/src/caption-blocks.ts +11 -42
- package/src/plugins/defaults/memory-v3-shadow/orchestrate.ts +2 -11
- package/src/plugins/defaults/memory-v3-shadow/pool-select.ts +1 -29
- package/src/plugins/defaults/memory-v3-shadow/shadow-plugin.ts +1 -8
- package/src/providers/anthropic/client.ts +0 -31
- package/src/providers/model-catalog.ts +0 -16
- package/src/runtime/__tests__/trust-verdict-consumer.test.ts +3 -256
- package/src/runtime/access-request-helper.ts +39 -19
- package/src/runtime/actor-trust-resolver.ts +2 -2
- package/src/runtime/assistant-stream-state.ts +2 -9
- package/src/runtime/auth/require-bound-guardian.ts +11 -21
- package/src/runtime/channel-verification-service.ts +0 -24
- package/src/runtime/guardian-vellum-migration.ts +7 -66
- package/src/runtime/local-actor-identity.ts +11 -76
- package/src/runtime/pending-interactions.ts +1 -11
- package/src/runtime/routes/__tests__/channel-verification-routes.test.ts +1 -1
- package/src/runtime/routes/__tests__/surface-action-routes.test.ts +0 -163
- package/src/runtime/routes/browser-routes.ts +1 -1
- package/src/runtime/routes/channel-verification-routes.ts +1 -1
- package/src/runtime/routes/conversation-routes.ts +81 -74
- package/src/runtime/routes/events-routes.ts +2 -2
- package/src/runtime/routes/host-app-control-routes.ts +4 -5
- package/src/runtime/routes/host-bash-routes.ts +4 -5
- package/src/runtime/routes/host-browser-routes.ts +11 -9
- package/src/runtime/routes/host-cu-routes.ts +4 -5
- package/src/runtime/routes/host-file-routes.ts +4 -5
- package/src/runtime/routes/host-transfer-routes.ts +6 -6
- package/src/runtime/routes/http-adapter.ts +1 -1
- package/src/runtime/routes/inbound-message-handler.ts +1 -1
- package/src/runtime/routes/inbound-stages/acl-enforcement.test.ts +2 -93
- package/src/runtime/routes/inbound-stages/acl-enforcement.ts +31 -42
- package/src/runtime/routes/inbound-stages/background-dispatch.ts +4 -16
- package/src/runtime/routes/inbound-stages/guardian-activation-intercept.test.ts +8 -21
- package/src/runtime/routes/inbound-stages/guardian-activation-intercept.ts +3 -14
- package/src/runtime/routes/llm-context-normalization.ts +0 -71
- package/src/runtime/routes/mcp-auth-routes.ts +15 -38
- package/src/runtime/routes/subagents-routes.ts +0 -5
- package/src/runtime/routes/surface-action-routes.ts +51 -39
- package/src/runtime/trust-verdict-consumer.ts +9 -47
- package/src/signals/user-message.ts +0 -16
- package/src/subagent/manager.ts +0 -9
- package/src/tools/ask-question/ask-question-tool.test.ts +0 -29
- package/src/tools/ask-question/ask-question-tool.ts +0 -13
- package/src/tools/executor.ts +4 -4
- package/src/tools/ui-surface/definitions.ts +43 -0
- package/src/util/platform.ts +0 -5
- package/node_modules/@vellumai/gateway-client/src/__tests__/guardian-delivery-contract.test.ts +0 -91
- package/node_modules/@vellumai/gateway-client/src/guardian-delivery-contract.ts +0 -48
- package/src/__tests__/card-surface-data.test.ts +0 -60
- package/src/__tests__/sse-actor-principal-guardian-source.test.ts +0 -102
- package/src/__tests__/steer-on-enqueue-question.test.ts +0 -181
- package/src/api/constants/sse-replay.ts +0 -41
- package/src/api/surfaces.ts +0 -33
- package/src/cli/commands/memory/__tests__/worker.test.ts +0 -302
- package/src/cli/commands/memory/worker.ts +0 -175
- package/src/config/__tests__/loader-callsite-strip-fallback.test.ts +0 -143
- package/src/contacts/__tests__/guardian-delivery-reader.test.ts +0 -312
- package/src/contacts/guardian-delivery-reader.ts +0 -223
- package/src/memory/__tests__/prompt-override.test.ts +0 -192
- package/src/memory/migrations/__tests__/014-backfill-inbox-thread-state.test.ts +0 -108
- package/src/memory/migrations/__tests__/136-drop-assistant-id-columns.test.ts +0 -82
- package/src/memory/migrations/__tests__/209-strip-thinking-from-consolidated.test.ts +0 -224
- package/src/memory/prompt-override.ts +0 -129
- package/src/memory/worker-control.ts +0 -118
- package/src/memory/worker-process.ts +0 -72
- package/src/notifications/__tests__/connected-channels.test.ts +0 -114
- package/src/notifications/__tests__/destination-resolver.test.ts +0 -256
- package/src/plugins/defaults/memory-v3-shadow/pool-select.test.ts +0 -146
- package/src/runtime/__tests__/guardian-vellum-migration.test.ts +0 -181
- package/src/runtime/__tests__/is-guardian-bound-for-channel.test.ts +0 -64
- package/src/runtime/__tests__/local-principal-trust.test.ts +0 -164
- package/src/runtime/anchored-guardian.test.ts +0 -156
- package/src/runtime/anchored-guardian.ts +0 -135
- package/src/runtime/auth/__tests__/require-bound-guardian.test.ts +0 -99
- package/src/runtime/local-principal-trust.ts +0 -52
|
@@ -51,17 +51,11 @@ const ALLOWED_PREFIXES = {
|
|
|
51
51
|
"../../config/schema",
|
|
52
52
|
"../../config/env",
|
|
53
53
|
"../../util/platform",
|
|
54
|
-
"../../../util/platform",
|
|
55
54
|
// Memory retrospective — the retrospective CLI runs the fork-based
|
|
56
55
|
// retrospective in-process (no daemon, no IPC), so it imports the
|
|
57
56
|
// job handler directly. Depth-2 for commands/memory/ nesting.
|
|
58
57
|
"../../memory/memory-retrospective-job",
|
|
59
58
|
"../../../memory/memory-retrospective-job",
|
|
60
|
-
// Memory worker control — the `memory worker` CLI spawns/probes/stops
|
|
61
|
-
// the worker OS process directly (no daemon, no IPC), so it imports the
|
|
62
|
-
// shared PID-file control helpers. Depth-2 for commands/memory/ nesting.
|
|
63
|
-
"../../memory/worker-control",
|
|
64
|
-
"../../../memory/worker-control",
|
|
65
59
|
"../logger",
|
|
66
60
|
"../output",
|
|
67
61
|
"../../logger",
|
|
@@ -7,7 +7,6 @@ import { describe, expect, test } from "bun:test";
|
|
|
7
7
|
|
|
8
8
|
import { SourceMetadataSchema } from "../inbound-contract.js";
|
|
9
9
|
import {
|
|
10
|
-
makeResolutionFailedVerdict,
|
|
11
10
|
TrustVerdictSchema,
|
|
12
11
|
type TrustVerdict,
|
|
13
12
|
} from "../trust-verdict-contract.js";
|
|
@@ -44,36 +43,6 @@ describe("TrustVerdictSchema", () => {
|
|
|
44
43
|
expect(TrustVerdictSchema.parse(minimal)).toEqual(minimal);
|
|
45
44
|
});
|
|
46
45
|
|
|
47
|
-
test("parses a verdict carrying resolutionFailed", () => {
|
|
48
|
-
const verdict = {
|
|
49
|
-
trustClass: "unknown",
|
|
50
|
-
canonicalSenderId: null,
|
|
51
|
-
resolutionFailed: true,
|
|
52
|
-
} satisfies TrustVerdict;
|
|
53
|
-
expect(TrustVerdictSchema.parse(verdict)).toEqual(verdict);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
test("leaves resolutionFailed undefined when absent", () => {
|
|
57
|
-
const parsed = TrustVerdictSchema.parse({
|
|
58
|
-
trustClass: "unknown",
|
|
59
|
-
canonicalSenderId: null,
|
|
60
|
-
});
|
|
61
|
-
expect(parsed.resolutionFailed).toBeUndefined();
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
test("makeResolutionFailedVerdict builds an unknown sentinel", () => {
|
|
65
|
-
expect(makeResolutionFailedVerdict("+15555550100")).toEqual({
|
|
66
|
-
trustClass: "unknown",
|
|
67
|
-
canonicalSenderId: "+15555550100",
|
|
68
|
-
resolutionFailed: true,
|
|
69
|
-
});
|
|
70
|
-
expect(makeResolutionFailedVerdict(null)).toEqual({
|
|
71
|
-
trustClass: "unknown",
|
|
72
|
-
canonicalSenderId: null,
|
|
73
|
-
resolutionFailed: true,
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
|
|
77
46
|
test("rejects an invalid trustClass", () => {
|
|
78
47
|
expect(() =>
|
|
79
48
|
TrustVerdictSchema.parse({
|
|
@@ -73,7 +73,6 @@ export type { AdmissionPolicy } from "./admission-policy-contract.js";
|
|
|
73
73
|
|
|
74
74
|
// Trust verdict contract (gateway → daemon) — Zod schemas + derived types
|
|
75
75
|
export {
|
|
76
|
-
makeResolutionFailedVerdict,
|
|
77
76
|
ResolveInboundTrustRequestSchema,
|
|
78
77
|
TRUST_CLASS_VALUES,
|
|
79
78
|
TrustClassSchema,
|
|
@@ -85,16 +84,3 @@ export type {
|
|
|
85
84
|
TrustClass,
|
|
86
85
|
TrustVerdict,
|
|
87
86
|
} from "./trust-verdict-contract.js";
|
|
88
|
-
|
|
89
|
-
// Guardian delivery contract (daemon → gateway pull) — Zod schemas + derived types
|
|
90
|
-
export {
|
|
91
|
-
GuardianDeliverySchema,
|
|
92
|
-
ResolveGuardianDeliveryRequestSchema,
|
|
93
|
-
ResolveGuardianDeliveryResponseSchema,
|
|
94
|
-
} from "./guardian-delivery-contract.js";
|
|
95
|
-
|
|
96
|
-
export type {
|
|
97
|
-
GuardianDelivery,
|
|
98
|
-
ResolveGuardianDeliveryRequest,
|
|
99
|
-
ResolveGuardianDeliveryResponse,
|
|
100
|
-
} from "./guardian-delivery-contract.js";
|
|
@@ -42,11 +42,6 @@ export const TrustVerdictSchema = z.object({
|
|
|
42
42
|
trustClass: TrustClassSchema,
|
|
43
43
|
canonicalSenderId: z.string().nullable(),
|
|
44
44
|
|
|
45
|
-
// Present+true ⇒ gateway attempted resolution but failed (DB error);
|
|
46
|
-
// consumer treats it as "could not vouch", distinct from a real `unknown`
|
|
47
|
-
// stranger.
|
|
48
|
-
resolutionFailed: z.boolean().optional(),
|
|
49
|
-
|
|
50
45
|
// Guardian binding — present only when a guardian binding matches.
|
|
51
46
|
guardianExternalUserId: z.string().optional(),
|
|
52
47
|
guardianDeliveryChatId: z.string().nullable().optional(),
|
|
@@ -68,18 +63,6 @@ export const TrustVerdictSchema = z.object({
|
|
|
68
63
|
|
|
69
64
|
export type TrustVerdict = z.infer<typeof TrustVerdictSchema>;
|
|
70
65
|
|
|
71
|
-
/**
|
|
72
|
-
* Sentinel for a gateway resolver failure; consumers treat it as
|
|
73
|
-
* could-not-vouch (distinct from a real `unknown` stranger). Takes the
|
|
74
|
-
* already-canonicalized sender id so this module stays free of the gateway's
|
|
75
|
-
* canonicalization util.
|
|
76
|
-
*/
|
|
77
|
-
export function makeResolutionFailedVerdict(
|
|
78
|
-
canonicalSenderId: string | null,
|
|
79
|
-
): TrustVerdict {
|
|
80
|
-
return { trustClass: "unknown", canonicalSenderId, resolutionFailed: true };
|
|
81
|
-
}
|
|
82
|
-
|
|
83
66
|
/**
|
|
84
67
|
* IPC request for `resolve_inbound_trust`. Per-actor identity keys the
|
|
85
68
|
* gateway resolver needs to classify the inbound sender. The response reuses
|
package/openapi.yaml
CHANGED
|
@@ -3973,8 +3973,6 @@ paths:
|
|
|
3973
3973
|
anyOf:
|
|
3974
3974
|
- type: string
|
|
3975
3975
|
- type: "null"
|
|
3976
|
-
resolutionFailed:
|
|
3977
|
-
type: boolean
|
|
3978
3976
|
guardianExternalUserId:
|
|
3979
3977
|
type: string
|
|
3980
3978
|
guardianDeliveryChatId:
|
|
@@ -14711,12 +14709,6 @@ paths:
|
|
|
14711
14709
|
type: string
|
|
14712
14710
|
disabled:
|
|
14713
14711
|
type: boolean
|
|
14714
|
-
headers:
|
|
14715
|
-
type: object
|
|
14716
|
-
propertyNames:
|
|
14717
|
-
type: string
|
|
14718
|
-
additionalProperties:
|
|
14719
|
-
type: string
|
|
14720
14712
|
required:
|
|
14721
14713
|
- name
|
|
14722
14714
|
- transportType
|
|
@@ -14944,14 +14936,6 @@ paths:
|
|
|
14944
14936
|
items:
|
|
14945
14937
|
type: string
|
|
14946
14938
|
- type: "null"
|
|
14947
|
-
headers:
|
|
14948
|
-
anyOf:
|
|
14949
|
-
- type: object
|
|
14950
|
-
propertyNames:
|
|
14951
|
-
type: string
|
|
14952
|
-
additionalProperties:
|
|
14953
|
-
type: string
|
|
14954
|
-
- type: "null"
|
|
14955
14939
|
required:
|
|
14956
14940
|
- name
|
|
14957
14941
|
responses:
|
|
@@ -25994,13 +25978,6 @@ paths:
|
|
|
25994
25978
|
type: boolean
|
|
25995
25979
|
messageId:
|
|
25996
25980
|
type: string
|
|
25997
|
-
toolUseId:
|
|
25998
|
-
type: string
|
|
25999
|
-
input:
|
|
26000
|
-
type: object
|
|
26001
|
-
propertyNames:
|
|
26002
|
-
type: string
|
|
26003
|
-
additionalProperties: {}
|
|
26004
25981
|
required:
|
|
26005
25982
|
- type
|
|
26006
25983
|
- content
|
package/package.json
CHANGED
package/scripts/test.sh
CHANGED
|
@@ -169,7 +169,6 @@ printf '%s\n' "${test_files[@]}" | xargs -P "${WORKERS}" -I {} bash -c '
|
|
|
169
169
|
|
|
170
170
|
safe_name="$(echo "${test_file}" | tr "/" "_")"
|
|
171
171
|
out_file="${results_dir}/${safe_name}.out"
|
|
172
|
-
base="$(basename "${test_file}")"
|
|
173
172
|
|
|
174
173
|
coverage_args=""
|
|
175
174
|
if [[ "${coverage_enabled}" == "true" ]]; then
|
|
@@ -186,48 +185,28 @@ printf '%s\n' "${test_files[@]}" | xargs -P "${WORKERS}" -I {} bash -c '
|
|
|
186
185
|
timeout_cmd="gtimeout"
|
|
187
186
|
fi
|
|
188
187
|
|
|
189
|
-
# Run the test file in its own bun process. Wrapped in a function so a
|
|
190
|
-
# transient infrastructure crash can be retried without duplicating the
|
|
191
|
-
# four-way (timeout × experimental-filter) invocation.
|
|
192
|
-
run_bun_test() {
|
|
193
|
-
if [[ -n "${timeout_cmd}" ]]; then
|
|
194
|
-
if [[ "${exclude_exp}" == "true" ]]; then
|
|
195
|
-
"${timeout_cmd}" -k 10 "${per_test_timeout}" bun test ${coverage_args} --test-name-pattern "^(?!.*\\[experimental\\])" "${test_file}" > "${out_file}" 2>&1
|
|
196
|
-
else
|
|
197
|
-
"${timeout_cmd}" -k 10 "${per_test_timeout}" bun test ${coverage_args} "${test_file}" > "${out_file}" 2>&1
|
|
198
|
-
fi
|
|
199
|
-
else
|
|
200
|
-
if [[ "${exclude_exp}" == "true" ]]; then
|
|
201
|
-
bun test ${coverage_args} --test-name-pattern "^(?!.*\\[experimental\\])" "${test_file}" > "${out_file}" 2>&1
|
|
202
|
-
else
|
|
203
|
-
bun test ${coverage_args} "${test_file}" > "${out_file}" 2>&1
|
|
204
|
-
fi
|
|
205
|
-
fi
|
|
206
|
-
}
|
|
207
|
-
|
|
208
188
|
start_ms=$(perl -MTime::HiRes=time -e "printf \"%d\", time*1000")
|
|
209
189
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
&& ! grep -q "^(fail)" "${out_file}" 2>/dev/null; then
|
|
223
|
-
echo " ↻ ${base} (transient crash, exit ${exit_code} — retrying once)"
|
|
224
|
-
run_bun_test
|
|
225
|
-
exit_code=$?
|
|
190
|
+
if [[ -n "${timeout_cmd}" ]]; then
|
|
191
|
+
if [[ "${exclude_exp}" == "true" ]]; then
|
|
192
|
+
"${timeout_cmd}" -k 10 "${per_test_timeout}" bun test ${coverage_args} --test-name-pattern "^(?!.*\\[experimental\\])" "${test_file}" > "${out_file}" 2>&1
|
|
193
|
+
else
|
|
194
|
+
"${timeout_cmd}" -k 10 "${per_test_timeout}" bun test ${coverage_args} "${test_file}" > "${out_file}" 2>&1
|
|
195
|
+
fi
|
|
196
|
+
else
|
|
197
|
+
if [[ "${exclude_exp}" == "true" ]]; then
|
|
198
|
+
bun test ${coverage_args} --test-name-pattern "^(?!.*\\[experimental\\])" "${test_file}" > "${out_file}" 2>&1
|
|
199
|
+
else
|
|
200
|
+
bun test ${coverage_args} "${test_file}" > "${out_file}" 2>&1
|
|
201
|
+
fi
|
|
226
202
|
fi
|
|
203
|
+
exit_code=$?
|
|
227
204
|
|
|
228
205
|
end_ms=$(perl -MTime::HiRes=time -e "printf \"%d\", time*1000")
|
|
229
206
|
elapsed=$(( end_ms - start_ms ))
|
|
230
207
|
|
|
208
|
+
base="$(basename "${test_file}")"
|
|
209
|
+
|
|
231
210
|
# Record duration for longest-first scheduling in future runs.
|
|
232
211
|
# Write the repo-relative path (not the basename) so the lookup in future
|
|
233
212
|
# runs disambiguates files that share a basename across directories.
|
|
@@ -29,17 +29,6 @@ mock.module("../config/env.js", () => ({
|
|
|
29
29
|
checkUnrecognizedEnvVars: () => {},
|
|
30
30
|
}));
|
|
31
31
|
|
|
32
|
-
// No gateway in tests: force the reader to miss so resolution exercises the
|
|
33
|
-
// local-store bootstrap fallback deterministically.
|
|
34
|
-
let fakeGuardianDelivery: { principalId?: string | null } | null = null;
|
|
35
|
-
mock.module("../contacts/guardian-delivery-reader.js", () => ({
|
|
36
|
-
getGuardianDelivery: async () =>
|
|
37
|
-
fakeGuardianDelivery ? [fakeGuardianDelivery] : null,
|
|
38
|
-
guardianForChannel: (list: { principalId?: string | null }[]) => list[0],
|
|
39
|
-
invalidateGuardianDeliveryCache: () => {},
|
|
40
|
-
onContactChange: () => {},
|
|
41
|
-
}));
|
|
42
|
-
|
|
43
32
|
import { getDb } from "../memory/db-connection.js";
|
|
44
33
|
import { initializeDb } from "../memory/db-init.js";
|
|
45
34
|
import { resetExternalAssistantIdCache } from "../runtime/auth/external-assistant-id.js";
|
|
@@ -62,7 +51,6 @@ await initializeDb();
|
|
|
62
51
|
beforeEach(async () => {
|
|
63
52
|
initAuthSigningKey(TEST_KEY);
|
|
64
53
|
resetExternalAssistantIdCache();
|
|
65
|
-
fakeGuardianDelivery = null;
|
|
66
54
|
resetDbForTesting();
|
|
67
55
|
await initializeDb();
|
|
68
56
|
});
|
|
@@ -72,8 +60,8 @@ beforeEach(async () => {
|
|
|
72
60
|
// ---------------------------------------------------------------------------
|
|
73
61
|
|
|
74
62
|
describe("resolveLocalTrustContext", () => {
|
|
75
|
-
test("falls back to minimal trust context when no vellum binding exists",
|
|
76
|
-
const ctx =
|
|
63
|
+
test("falls back to minimal trust context when no vellum binding exists", () => {
|
|
64
|
+
const ctx = resolveLocalTrustContext();
|
|
77
65
|
expect(ctx.sourceChannel).toBe("vellum");
|
|
78
66
|
});
|
|
79
67
|
});
|
|
@@ -83,48 +71,38 @@ describe("resolveLocalTrustContext", () => {
|
|
|
83
71
|
// ---------------------------------------------------------------------------
|
|
84
72
|
|
|
85
73
|
describe("resolveLocalAuthContext", () => {
|
|
86
|
-
test("returns AuthContext with local principal type",
|
|
87
|
-
const ctx =
|
|
74
|
+
test("returns AuthContext with local principal type", () => {
|
|
75
|
+
const ctx = resolveLocalAuthContext("session-123");
|
|
88
76
|
expect(ctx.principalType).toBe("local");
|
|
89
77
|
});
|
|
90
78
|
|
|
91
|
-
test("subject follows local:self:<conversationId> pattern",
|
|
92
|
-
const ctx =
|
|
79
|
+
test("subject follows local:self:<conversationId> pattern", () => {
|
|
80
|
+
const ctx = resolveLocalAuthContext("session-abc");
|
|
93
81
|
expect(ctx.subject).toBe("local:self:session-abc");
|
|
94
82
|
});
|
|
95
83
|
|
|
96
|
-
test("assistantId is always self",
|
|
97
|
-
const ctx =
|
|
84
|
+
test("assistantId is always self", () => {
|
|
85
|
+
const ctx = resolveLocalAuthContext("session-123");
|
|
98
86
|
expect(ctx.assistantId).toBe("self");
|
|
99
87
|
});
|
|
100
88
|
|
|
101
|
-
test("uses local_v1 scope profile with local.all scope",
|
|
102
|
-
const ctx =
|
|
89
|
+
test("uses local_v1 scope profile with local.all scope", () => {
|
|
90
|
+
const ctx = resolveLocalAuthContext("session-123");
|
|
103
91
|
expect(ctx.scopeProfile).toBe("local_v1");
|
|
104
92
|
expect(ctx.scopes.has("local.all")).toBe(true);
|
|
105
93
|
});
|
|
106
94
|
|
|
107
|
-
test("actorPrincipalId is undefined when no vellum binding exists",
|
|
95
|
+
test("actorPrincipalId is undefined when no vellum binding exists", () => {
|
|
108
96
|
const db = getDb();
|
|
109
97
|
db.run("DELETE FROM contact_channels");
|
|
110
98
|
db.run("DELETE FROM contacts");
|
|
111
99
|
|
|
112
|
-
const ctx =
|
|
100
|
+
const ctx = resolveLocalAuthContext("session-123");
|
|
113
101
|
expect(ctx.actorPrincipalId).toBeUndefined();
|
|
114
102
|
});
|
|
115
103
|
|
|
116
|
-
test("
|
|
117
|
-
const
|
|
118
|
-
db.run("DELETE FROM contact_channels");
|
|
119
|
-
db.run("DELETE FROM contacts");
|
|
120
|
-
fakeGuardianDelivery = { principalId: "gateway-guardian-id" };
|
|
121
|
-
|
|
122
|
-
const ctx = await resolveLocalAuthContext("session-123");
|
|
123
|
-
expect(ctx.actorPrincipalId).toBe("gateway-guardian-id");
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
test("conversationId matches the provided argument", async () => {
|
|
127
|
-
const ctx = await resolveLocalAuthContext("my-session");
|
|
104
|
+
test("conversationId matches the provided argument", () => {
|
|
105
|
+
const ctx = resolveLocalAuthContext("my-session");
|
|
128
106
|
expect(ctx.conversationId).toBe("my-session");
|
|
129
107
|
});
|
|
130
108
|
});
|
|
@@ -3191,70 +3191,3 @@ describe("AnthropicProvider — thinking block send-time filtering", () => {
|
|
|
3191
3191
|
expect(signatures).toContain("sig-step2");
|
|
3192
3192
|
});
|
|
3193
3193
|
});
|
|
3194
|
-
|
|
3195
|
-
describe("AnthropicProvider — deprecated sampling params (temperature / top_p / top_k)", () => {
|
|
3196
|
-
beforeEach(() => {
|
|
3197
|
-
lastStreamParams = null;
|
|
3198
|
-
});
|
|
3199
|
-
|
|
3200
|
-
// opus-4-7 / opus-4-8 (and, conservatively, fable) reject `temperature`,
|
|
3201
|
-
// `top_p`, and `top_k` with a 400; the provider must strip all three.
|
|
3202
|
-
for (const model of [
|
|
3203
|
-
"claude-opus-4-8",
|
|
3204
|
-
"claude-opus-4-7",
|
|
3205
|
-
"claude-fable-5",
|
|
3206
|
-
]) {
|
|
3207
|
-
test(`strips temperature, top_p, and top_k for ${model}`, async () => {
|
|
3208
|
-
const provider = new AnthropicProvider("sk-ant-test", model);
|
|
3209
|
-
await provider.sendMessage([userMsg("Hi")], {
|
|
3210
|
-
systemPrompt: "You are helpful.",
|
|
3211
|
-
config: { temperature: 0, top_p: 0.95, top_k: 40 },
|
|
3212
|
-
});
|
|
3213
|
-
expect(lastStreamParams!).not.toHaveProperty("temperature");
|
|
3214
|
-
expect(lastStreamParams!).not.toHaveProperty("top_p");
|
|
3215
|
-
expect(lastStreamParams!).not.toHaveProperty("top_k");
|
|
3216
|
-
});
|
|
3217
|
-
}
|
|
3218
|
-
|
|
3219
|
-
// opus-4-6 / sonnet-4-6 still accept the params — they must pass through,
|
|
3220
|
-
// including `temperature: 0` (a value check, not truthiness).
|
|
3221
|
-
test("forwards temperature (including 0), top_p, and top_k for opus-4-6", async () => {
|
|
3222
|
-
const provider = new AnthropicProvider("sk-ant-test", "claude-opus-4-6");
|
|
3223
|
-
await provider.sendMessage([userMsg("Hi")], {
|
|
3224
|
-
systemPrompt: "You are helpful.",
|
|
3225
|
-
config: { temperature: 0, top_p: 0.95, top_k: 40 },
|
|
3226
|
-
});
|
|
3227
|
-
expect(lastStreamParams!.temperature).toBe(0);
|
|
3228
|
-
expect(lastStreamParams!.top_p).toBe(0.95);
|
|
3229
|
-
expect(lastStreamParams!.top_k).toBe(40);
|
|
3230
|
-
});
|
|
3231
|
-
|
|
3232
|
-
test("forwards temperature, top_p, and top_k for sonnet-4-6", async () => {
|
|
3233
|
-
const provider = new AnthropicProvider("sk-ant-test", "claude-sonnet-4-6");
|
|
3234
|
-
await provider.sendMessage([userMsg("Hi")], {
|
|
3235
|
-
systemPrompt: "You are helpful.",
|
|
3236
|
-
config: { temperature: 0.7, top_p: 0.9, top_k: 20 },
|
|
3237
|
-
});
|
|
3238
|
-
expect(lastStreamParams!.temperature).toBe(0.7);
|
|
3239
|
-
expect(lastStreamParams!.top_p).toBe(0.9);
|
|
3240
|
-
expect(lastStreamParams!.top_k).toBe(20);
|
|
3241
|
-
});
|
|
3242
|
-
|
|
3243
|
-
// A per-call model override targeting a deprecating model must win over the
|
|
3244
|
-
// provider's default (accepting) model.
|
|
3245
|
-
test("strips params when a per-call model override deprecates them", async () => {
|
|
3246
|
-
const provider = new AnthropicProvider("sk-ant-test", "claude-sonnet-4-6");
|
|
3247
|
-
await provider.sendMessage([userMsg("Hi")], {
|
|
3248
|
-
systemPrompt: "You are helpful.",
|
|
3249
|
-
config: {
|
|
3250
|
-
temperature: 0,
|
|
3251
|
-
top_p: 0.95,
|
|
3252
|
-
top_k: 40,
|
|
3253
|
-
model: "claude-opus-4-8",
|
|
3254
|
-
},
|
|
3255
|
-
});
|
|
3256
|
-
expect(lastStreamParams!).not.toHaveProperty("temperature");
|
|
3257
|
-
expect(lastStreamParams!).not.toHaveProperty("top_p");
|
|
3258
|
-
expect(lastStreamParams!).not.toHaveProperty("top_k");
|
|
3259
|
-
});
|
|
3260
|
-
});
|
|
@@ -168,25 +168,6 @@ mock.module("../notifications/emit-signal.js", () => ({
|
|
|
168
168
|
}),
|
|
169
169
|
}));
|
|
170
170
|
|
|
171
|
-
// Guardian principalId is resolved from the gateway binding reader. Mirror the
|
|
172
|
-
// vellum binding seeded by resetTables so guardian dispatch can resolve it.
|
|
173
|
-
mock.module("../contacts/guardian-delivery-reader.js", () => ({
|
|
174
|
-
getGuardianDelivery: async () => [
|
|
175
|
-
{
|
|
176
|
-
channelType: "vellum",
|
|
177
|
-
contactId: "guardian-vellum",
|
|
178
|
-
principalId: "test-principal-id",
|
|
179
|
-
address: "local",
|
|
180
|
-
status: "active",
|
|
181
|
-
},
|
|
182
|
-
],
|
|
183
|
-
guardianForChannel: (
|
|
184
|
-
list: Array<{ channelType: string; status: string }>,
|
|
185
|
-
channelType: string,
|
|
186
|
-
) => list.find((g) => g.channelType === channelType && g.status === "active"),
|
|
187
|
-
anyGuardian: (list: unknown[]) => list[0],
|
|
188
|
-
}));
|
|
189
|
-
|
|
190
171
|
mock.module("../calls/voice-session-bridge.js", () => {
|
|
191
172
|
mockStartVoiceTurn = mock(createMockVoiceTurn(["Hello", " there"]));
|
|
192
173
|
return {
|
|
@@ -83,32 +83,6 @@ mock.module("../ipc/gateway-client.js", () => ({
|
|
|
83
83
|
}),
|
|
84
84
|
}));
|
|
85
85
|
|
|
86
|
-
// Guardian-delivery reader mock — the inbound challenge guard reads guardian
|
|
87
|
-
// existence from the gateway. Derive the list from the local binding state so
|
|
88
|
-
// the gateway-backed presence guard mirrors the DB the rest of the test sets up.
|
|
89
|
-
const resolveGuardianList = async (input?: { channelTypes?: string[] }) => {
|
|
90
|
-
const { findGuardianForChannel } = await import(
|
|
91
|
-
"../contacts/contact-store.js"
|
|
92
|
-
);
|
|
93
|
-
const channels = input?.channelTypes ?? [];
|
|
94
|
-
return channels
|
|
95
|
-
.map((channelType) => {
|
|
96
|
-
const found = findGuardianForChannel(channelType);
|
|
97
|
-
return found ? { channelType, status: "active" } : null;
|
|
98
|
-
})
|
|
99
|
-
.filter((g): g is { channelType: string; status: string } => g !== null);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
mock.module("../contacts/guardian-delivery-reader.js", () => ({
|
|
103
|
-
getGuardianDelivery: resolveGuardianList,
|
|
104
|
-
getGuardianDeliveryFresh: resolveGuardianList,
|
|
105
|
-
guardianForChannel: (
|
|
106
|
-
list: Array<{ channelType: string; status: string }>,
|
|
107
|
-
channelType: string,
|
|
108
|
-
) =>
|
|
109
|
-
list.find((g) => g.channelType === channelType && g.status === "active"),
|
|
110
|
-
}));
|
|
111
|
-
|
|
112
86
|
import { handleChannelVerificationSession } from "../daemon/handlers/config-channels.js";
|
|
113
87
|
import type {
|
|
114
88
|
ChannelVerificationSessionRequest,
|
|
@@ -745,11 +745,7 @@ describe("loadConfig startup behavior", () => {
|
|
|
745
745
|
);
|
|
746
746
|
expect(raw.llm.profiles.frontier.provider).toBe("anthropic");
|
|
747
747
|
expect(raw.llm.profiles.frontier.model).toBe("claude-opus-4-8");
|
|
748
|
-
|
|
749
|
-
expect(raw.llm.profiles["cost-optimized"].provider).toBe("fireworks");
|
|
750
|
-
expect(raw.llm.profiles["cost-optimized"].model).toBe(
|
|
751
|
-
"accounts/fireworks/models/deepseek-v4-flash",
|
|
752
|
-
);
|
|
748
|
+
expect(raw.llm.profiles["cost-optimized"].provider).toBe("anthropic");
|
|
753
749
|
});
|
|
754
750
|
|
|
755
751
|
test("off-platform managed profiles are overwritten on every boot", () => {
|
|
@@ -120,7 +120,6 @@ describe("AssistantConfigSchema", () => {
|
|
|
120
120
|
shellDefaultTimeoutSec: 120,
|
|
121
121
|
shellMaxTimeoutSec: 600,
|
|
122
122
|
permissionTimeoutSec: 300,
|
|
123
|
-
questionResponseTimeoutSec: 1800,
|
|
124
123
|
toolExecutionTimeoutSec: 120,
|
|
125
124
|
providerStreamTimeoutSec: 1800,
|
|
126
125
|
backgroundTurnTimeoutSec: 1800,
|
|
@@ -1705,10 +1705,6 @@ describe("session-agent-loop", () => {
|
|
|
1705
1705
|
expect(ctx.abortController).toBeNull();
|
|
1706
1706
|
expect(ctx.currentRequestId).toBeUndefined();
|
|
1707
1707
|
expect(ctx.commandIntent).toBeUndefined();
|
|
1708
|
-
// Turn-scoped interactivity is stamped during the run and must be cleared
|
|
1709
|
-
// so paths that bypass this loop (e.g. opportunity wakes) don't inherit a
|
|
1710
|
-
// stale value instead of falling back to live client state.
|
|
1711
|
-
expect(ctx.currentTurnIsNonInteractive).toBeUndefined();
|
|
1712
1708
|
});
|
|
1713
1709
|
|
|
1714
1710
|
test("clears state and surfaces a processing error when the provider call fails", async () => {
|
|
@@ -2911,92 +2911,3 @@ describe("MessageQueue byte budget", () => {
|
|
|
2911
2911
|
).toBe(false);
|
|
2912
2912
|
});
|
|
2913
2913
|
});
|
|
2914
|
-
|
|
2915
|
-
describe("subagent notification user_message_echo suppression", () => {
|
|
2916
|
-
beforeEach(() => {
|
|
2917
|
-
pendingRuns = [];
|
|
2918
|
-
capturedAddMessages.length = 0;
|
|
2919
|
-
});
|
|
2920
|
-
|
|
2921
|
-
test("drained subagent-notification message persists and wakes the agent but emits no user_message_echo", async () => {
|
|
2922
|
-
const conversation = makeConversation();
|
|
2923
|
-
await conversation.loadFromDb();
|
|
2924
|
-
|
|
2925
|
-
const events1: ServerMessage[] = [];
|
|
2926
|
-
const eventsNotif: ServerMessage[] = [];
|
|
2927
|
-
|
|
2928
|
-
// Occupy the conversation so the injected notification queues.
|
|
2929
|
-
const p1 = conversation.processMessage({
|
|
2930
|
-
content: "msg-1",
|
|
2931
|
-
attachments: [],
|
|
2932
|
-
onEvent: (e) => events1.push(e),
|
|
2933
|
-
requestId: "req-1",
|
|
2934
|
-
});
|
|
2935
|
-
await waitForPendingRun(1);
|
|
2936
|
-
expect(conversation.isProcessing()).toBe(true);
|
|
2937
|
-
|
|
2938
|
-
// A daemon-injected subagent completion notification carries
|
|
2939
|
-
// `subagentNotification` metadata.
|
|
2940
|
-
conversation.enqueueMessage({
|
|
2941
|
-
content: '[Subagent "research" completed]',
|
|
2942
|
-
onEvent: (e) => eventsNotif.push(e),
|
|
2943
|
-
requestId: "req-notif",
|
|
2944
|
-
metadata: {
|
|
2945
|
-
subagentNotification: {
|
|
2946
|
-
subagentId: "sub-1",
|
|
2947
|
-
label: "research",
|
|
2948
|
-
status: "completed",
|
|
2949
|
-
},
|
|
2950
|
-
},
|
|
2951
|
-
});
|
|
2952
|
-
|
|
2953
|
-
// Resolving the first run drains the queued notification.
|
|
2954
|
-
await resolveRun(0);
|
|
2955
|
-
await p1;
|
|
2956
|
-
await waitForPendingRun(2);
|
|
2957
|
-
|
|
2958
|
-
// It is still persisted (so the orchestrator LLM sees it in the transcript)
|
|
2959
|
-
// and still wakes the agent (a run was created for the drained message)...
|
|
2960
|
-
expect(
|
|
2961
|
-
capturedAddMessages.some((m) => m.content.includes("Subagent")),
|
|
2962
|
-
).toBe(true);
|
|
2963
|
-
expect(pendingRuns.length).toBe(2);
|
|
2964
|
-
// ...but no user_message_echo is broadcast, so the client never renders it
|
|
2965
|
-
// as a live user bubble.
|
|
2966
|
-
expect(eventsNotif.some((e) => e.type === "user_message_echo")).toBe(false);
|
|
2967
|
-
|
|
2968
|
-
await resolveRun(1);
|
|
2969
|
-
await new Promise((r) => setTimeout(r, 10));
|
|
2970
|
-
});
|
|
2971
|
-
|
|
2972
|
-
test("drained ordinary message still emits user_message_echo", async () => {
|
|
2973
|
-
const conversation = makeConversation();
|
|
2974
|
-
await conversation.loadFromDb();
|
|
2975
|
-
|
|
2976
|
-
const events1: ServerMessage[] = [];
|
|
2977
|
-
const eventsNormal: ServerMessage[] = [];
|
|
2978
|
-
|
|
2979
|
-
const p1 = conversation.processMessage({
|
|
2980
|
-
content: "msg-1",
|
|
2981
|
-
attachments: [],
|
|
2982
|
-
onEvent: (e) => events1.push(e),
|
|
2983
|
-
requestId: "req-1",
|
|
2984
|
-
});
|
|
2985
|
-
await waitForPendingRun(1);
|
|
2986
|
-
|
|
2987
|
-
conversation.enqueueMessage({
|
|
2988
|
-
content: "ordinary message",
|
|
2989
|
-
onEvent: (e) => eventsNormal.push(e),
|
|
2990
|
-
requestId: "req-normal",
|
|
2991
|
-
});
|
|
2992
|
-
|
|
2993
|
-
await resolveRun(0);
|
|
2994
|
-
await p1;
|
|
2995
|
-
await waitForPendingRun(2);
|
|
2996
|
-
|
|
2997
|
-
expect(eventsNormal.some((e) => e.type === "user_message_echo")).toBe(true);
|
|
2998
|
-
|
|
2999
|
-
await resolveRun(1);
|
|
3000
|
-
await new Promise((r) => setTimeout(r, 10));
|
|
3001
|
-
});
|
|
3002
|
-
});
|
|
@@ -104,18 +104,6 @@ mock.module("../runtime/trust-context-resolver.js", () => ({
|
|
|
104
104
|
}),
|
|
105
105
|
}));
|
|
106
106
|
|
|
107
|
-
mock.module("../contacts/guardian-delivery-reader.js", () => ({
|
|
108
|
-
getGuardianDelivery: async () => [
|
|
109
|
-
{
|
|
110
|
-
channelType: "vellum",
|
|
111
|
-
contactId: "guardian-contact",
|
|
112
|
-
principalId: "test-user",
|
|
113
|
-
address: "test-user",
|
|
114
|
-
status: "active",
|
|
115
|
-
},
|
|
116
|
-
],
|
|
117
|
-
}));
|
|
118
|
-
|
|
119
107
|
import type { AuthContext } from "../runtime/auth/types.js";
|
|
120
108
|
import { handleSendMessage } from "../runtime/routes/conversation-routes.js";
|
|
121
109
|
import { callHandler } from "./helpers/call-route-handler.js";
|
|
@@ -190,18 +190,6 @@ mock.module("../runtime/trust-context-resolver.js", () => ({
|
|
|
190
190
|
}),
|
|
191
191
|
}));
|
|
192
192
|
|
|
193
|
-
mock.module("../contacts/guardian-delivery-reader.js", () => ({
|
|
194
|
-
getGuardianDelivery: async () => [
|
|
195
|
-
{
|
|
196
|
-
channelType: "vellum",
|
|
197
|
-
contactId: "guardian-contact",
|
|
198
|
-
principalId: "test-user",
|
|
199
|
-
address: "test-user",
|
|
200
|
-
status: "active",
|
|
201
|
-
},
|
|
202
|
-
],
|
|
203
|
-
}));
|
|
204
|
-
|
|
205
193
|
const ipcCallMock = mock(
|
|
206
194
|
async (): Promise<Record<string, unknown> | undefined> => ({ ok: true }),
|
|
207
195
|
);
|