@vellumai/assistant 0.11.5 → 0.11.6-staging.1
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/AGENTS.md +5 -1
- package/node_modules/@vellumai/ces-client/node_modules/@vellumai/service-contracts/src/__tests__/ingress.test.ts +118 -0
- package/node_modules/@vellumai/ces-client/node_modules/@vellumai/service-contracts/src/ingress.ts +103 -0
- package/node_modules/@vellumai/gateway-client/node_modules/@vellumai/service-contracts/src/__tests__/ingress.test.ts +118 -0
- package/node_modules/@vellumai/gateway-client/node_modules/@vellumai/service-contracts/src/ingress.ts +103 -0
- package/node_modules/@vellumai/gateway-client/src/gateway-ipc-contracts.ts +70 -0
- package/node_modules/@vellumai/gateway-client/src/inbound-contract.ts +16 -1
- package/node_modules/@vellumai/gateway-client/src/index.ts +6 -2
- package/node_modules/@vellumai/gateway-client/src/outbound-contract.ts +121 -61
- package/node_modules/@vellumai/service-contracts/src/__tests__/ingress.test.ts +118 -0
- package/node_modules/@vellumai/service-contracts/src/ingress.ts +103 -0
- package/openapi.yaml +421 -15
- package/package.json +1 -1
- package/scripts/sync-web-search-catalog.ts +6 -0
- package/src/__tests__/app-pin-store.test.ts +149 -0
- package/src/__tests__/channel-availability-routes.test.ts +23 -1
- package/src/__tests__/channel-readiness-discord.test.ts +231 -0
- package/src/__tests__/channel-readiness-service.test.ts +126 -0
- package/src/__tests__/channel-readiness-slack-remote.test.ts +141 -0
- package/src/__tests__/channel-reply-delivery.test.ts +4 -4
- package/src/__tests__/client-os-metadata-persistence.test.ts +23 -10
- package/src/__tests__/conversation-delete-watch-timeline.test.ts +231 -0
- package/src/__tests__/conversation-error.test.ts +17 -0
- package/src/__tests__/conversation-seed-composer.test.ts +8 -0
- package/src/__tests__/conversation-slash-commands.test.ts +8 -0
- package/src/__tests__/disk-pressure-policy.test.ts +6 -0
- package/src/__tests__/gemini-provider.test.ts +138 -0
- package/src/__tests__/history-repair.test.ts +105 -3
- package/src/__tests__/identity-routes.test.ts +1 -0
- package/src/__tests__/llm-catalog-parity.test.ts +45 -0
- package/src/__tests__/migration-import-from-path.test.ts +349 -0
- package/src/__tests__/notification-telegram-adapter.test.ts +102 -0
- package/src/__tests__/oauth-commands-routes.test.ts +89 -0
- package/src/__tests__/oauth-provider-profiles.test.ts +7 -6
- package/src/__tests__/openai-provider.test.ts +18 -0
- package/src/__tests__/openai-responses-provider.test.ts +18 -0
- package/src/__tests__/platform-callback-registration.test.ts +184 -0
- package/src/__tests__/plugin-api-store-credential.test.ts +71 -3
- package/src/__tests__/pricing.test.ts +2 -2
- package/src/__tests__/public-ingress-urls.test.ts +36 -0
- package/src/__tests__/resolve-trust-class.test.ts +0 -48
- package/src/__tests__/sanitize-config-for-transfer.test.ts +28 -0
- package/src/__tests__/secret-routes-platform-proxy.test.ts +49 -0
- package/src/__tests__/settings-routes.test.ts +85 -3
- package/src/__tests__/web-search-catalog-parity.test.ts +8 -0
- package/src/agent/history-repair/history-repair.ts +45 -14
- package/src/agent/loop.ts +4 -1
- package/src/api/constants/profile-config-validation.ts +60 -0
- package/src/api/events/tool-result.ts +6 -1
- package/src/api/events/watch-retro-completed.ts +52 -0
- package/src/api/index.ts +11 -0
- package/src/apps/app-pin-reconciler.ts +92 -0
- package/src/apps/app-pin-store.ts +125 -0
- package/src/channels/gateway-channel-socket-health.ts +32 -0
- package/src/channels/gateway-discord-admission.ts +32 -0
- package/src/channels/types.ts +20 -0
- package/src/cli/commands/__tests__/conversations-slack.test.ts +1 -1
- package/src/cli/commands/__tests__/inference-profiles.test.ts +16 -4
- package/src/cli/commands/__tests__/inference-providers.test.ts +67 -2
- package/src/cli/commands/channels/__tests__/channels.test.ts +85 -0
- package/src/cli/commands/channels/index.ts +45 -31
- package/src/cli/commands/inference-profiles.ts +56 -3
- package/src/cli/commands/inference-providers.ts +28 -2
- package/src/cli/commands/oauth/index.help.ts +7 -1
- package/src/cli/commands/oauth/request.test.ts +290 -0
- package/src/cli/commands/oauth/request.ts +57 -41
- package/src/cli/lib/bundled-marketplace.json +14 -1
- package/src/cli/lib/open-browser.test.ts +67 -0
- package/src/cli/lib/open-browser.ts +24 -5
- package/src/config/__tests__/profile-materialization.test.ts +26 -0
- package/src/config/bundled-skills/phone-calls/references/TROUBLESHOOTING.md +6 -0
- package/src/config/bundled-skills/schedule/SKILL.md +1 -1
- package/src/config/feature-flag-registry.json +17 -1
- package/src/config/profile-materialization.ts +29 -0
- package/src/config/sanitize-for-transfer.ts +16 -0
- package/src/config/schemas/llm.ts +7 -0
- package/src/config/schemas/services.ts +6 -0
- package/src/context/outbound-sanitize.ts +6 -0
- package/src/daemon/__tests__/lifecycle-watch-timeline-sweep.test.ts +98 -0
- package/src/daemon/conversation-error.ts +24 -2
- package/src/daemon/conversation-slash.ts +6 -15
- package/src/daemon/daemon-control.ts +1 -0
- package/src/daemon/disk-pressure-policy.ts +7 -1
- package/src/daemon/handlers/__tests__/config-ingress-tunnel-records.test.ts +208 -0
- package/src/daemon/handlers/config-ingress.ts +115 -5
- package/src/daemon/lifecycle.ts +26 -0
- package/src/daemon/message-types/web-activity.ts +3 -2
- package/src/daemon/trust-context.ts +0 -37
- package/src/inbound/__tests__/tunnel-probe.test.ts +448 -0
- package/src/inbound/platform-callback-registration.ts +28 -2
- package/src/inbound/public-ingress-urls.ts +12 -0
- package/src/inbound/tunnel-probe.ts +261 -0
- package/src/live-voice/__tests__/live-voice-connection.test.ts +25 -0
- package/src/live-voice/__tests__/live-voice-flux-turn-end.test.ts +8 -2
- package/src/live-voice/__tests__/live-voice-session-manager.test.ts +212 -10
- package/src/live-voice/__tests__/live-voice-session-telemetry.test.ts +5 -2
- package/src/live-voice/live-voice-connection.ts +46 -8
- package/src/live-voice/live-voice-manager.ts +25 -0
- package/src/live-voice/live-voice-session-manager.ts +318 -2
- package/src/live-voice/live-voice-session.ts +52 -2
- package/src/messaging/providers/__tests__/transport-dispatch.test.ts +126 -68
- package/src/messaging/providers/channel-transport.ts +64 -47
- package/src/messaging/providers/discord/send.test.ts +46 -1
- package/src/messaging/providers/discord/send.ts +51 -0
- package/src/messaging/providers/discord/transport.ts +26 -3
- package/src/messaging/providers/index.ts +22 -47
- package/src/messaging/providers/slack/send.test.ts +83 -26
- package/src/messaging/providers/slack/send.ts +120 -51
- package/src/messaging/providers/slack/stream-tasks.test.ts +26 -0
- package/src/messaging/providers/slack/stream-tasks.ts +39 -0
- package/src/messaging/providers/slack/transport.ts +24 -22
- package/src/messaging/providers/telegram-bot/send.test.ts +109 -12
- package/src/messaging/providers/telegram-bot/send.ts +43 -0
- package/src/messaging/providers/telegram-bot/transport.ts +25 -8
- package/src/notifications/__tests__/assistant-reply-producer.test.ts +30 -7
- package/src/notifications/adapters/telegram.ts +48 -1
- package/src/notifications/assistant-reply-producer.ts +7 -7
- package/src/notifications/conversation-seed-composer.ts +7 -2
- package/src/oauth/byo-connection.test.ts +63 -0
- package/src/oauth/byo-connection.ts +16 -15
- package/src/oauth/connection.test.ts +111 -0
- package/src/oauth/connection.ts +142 -1
- package/src/oauth/platform-connection.test.ts +34 -0
- package/src/oauth/platform-connection.ts +28 -5
- package/src/oauth/seed-providers.ts +15 -1
- package/src/permissions/types.ts +3 -1
- package/src/persistence/conversation-crud.ts +46 -0
- package/src/persistence/conversation-types.ts +11 -9
- package/src/persistence/db-async-query.ts +2 -1
- package/src/persistence/db-maintenance.ts +15 -0
- package/src/persistence/embeddings/qdrant-manager.ts +1 -0
- package/src/persistence/migrations/367-create-watch-timeline-entries.ts +46 -0
- package/src/persistence/migrations/368-watch-timeline-screenshot-blob.ts +33 -0
- package/src/persistence/migrations/369-create-app-pins.ts +37 -0
- package/src/persistence/migrations/__tests__/367-create-watch-timeline-entries.test.ts +98 -0
- package/src/persistence/migrations/__tests__/368-watch-timeline-screenshot-blob.test.ts +98 -0
- package/src/persistence/schema/index.ts +1 -0
- package/src/persistence/schema/infrastructure.ts +17 -0
- package/src/persistence/schema/watch.ts +29 -0
- package/src/persistence/steps.ts +6 -0
- package/src/plugins/mtime-cache.ts +11 -0
- package/src/providers/__tests__/retry-network-error.test.ts +84 -0
- package/src/providers/connection-resolution.ts +23 -1
- package/src/providers/content-blocks.ts +9 -0
- package/src/providers/fetch-provider-catalog.ts +19 -0
- package/src/providers/gemini/client.ts +13 -5
- package/src/providers/inference/__tests__/endpoint-probe.test.ts +92 -0
- package/src/providers/inference/__tests__/profile-config-validation.test.ts +39 -0
- package/src/providers/inference/__tests__/profile-probe-classify.test.ts +66 -0
- package/src/providers/inference/adapter-factory.ts +0 -9
- package/src/providers/inference/credential-rotation.ts +61 -0
- package/src/providers/inference/endpoint-probe.ts +115 -0
- package/src/providers/inference/profile-probe.ts +256 -0
- package/src/providers/model-catalog.ts +170 -125
- package/src/providers/openai/__tests__/api-error-normalization.test.ts +17 -1
- package/src/providers/openai/__tests__/chat-completions-provider-reasoning.test.ts +42 -60
- package/src/providers/openai/__tests__/connection-error-wrap.test.ts +44 -0
- package/src/providers/openai/__tests__/orphan-tool-result-guard.test.ts +34 -2
- package/src/providers/openai/api-error-normalization.ts +16 -2
- package/src/providers/openai/chat-completions-provider.ts +75 -29
- package/src/providers/openai/responses-provider.ts +5 -2
- package/src/providers/openrouter/client.ts +0 -1
- package/src/providers/provider-send-message.ts +11 -0
- package/src/providers/retry.ts +6 -0
- package/src/providers/search-provider-catalog.ts +20 -0
- package/src/providers/vercel-ai-gateway/client.ts +0 -1
- package/src/runtime/AGENTS.md +1 -0
- package/src/runtime/__tests__/desktop-presence.test.ts +27 -4
- package/src/runtime/__tests__/host-observe.test.ts +302 -0
- package/src/runtime/channel-readiness-service.ts +214 -14
- package/src/runtime/channel-readiness-types.ts +49 -2
- package/src/runtime/channel-reply-delivery.ts +2 -2
- package/src/runtime/desktop-presence.ts +24 -21
- package/src/runtime/host-observe.ts +246 -0
- package/src/runtime/http-server.ts +181 -1
- package/src/runtime/migrations/__tests__/staged-import-path.test.ts +104 -0
- package/src/runtime/migrations/staged-import-path.ts +116 -0
- package/src/runtime/routes/__tests__/app-pin-routes.test.ts +383 -0
- package/src/runtime/routes/__tests__/conversation-query-routes.test.ts +80 -0
- package/src/runtime/routes/__tests__/inference-profiles-routes.test.ts +118 -0
- package/src/runtime/routes/__tests__/inference-provider-connection-routes.test.ts +20 -0
- package/src/runtime/routes/__tests__/ingress-status-routes.test.ts +508 -0
- package/src/runtime/routes/__tests__/plugins-routes.test.ts +35 -56
- package/src/runtime/routes/__tests__/watch-routes-guardian-cache.test.ts +139 -0
- package/src/runtime/routes/__tests__/watch-routes.test.ts +598 -0
- package/src/runtime/routes/app-management-routes.ts +140 -29
- package/src/runtime/routes/channel-availability-routes.ts +1 -0
- package/src/runtime/routes/channel-readiness-routes.ts +14 -2
- package/src/runtime/routes/conversation-query-routes.ts +10 -0
- package/src/runtime/routes/guardian-approval-interception.ts +24 -33
- package/src/runtime/routes/host-cu-routes.ts +18 -0
- package/src/runtime/routes/identity-routes.ts +2 -0
- package/src/runtime/routes/inbound-message-handler.ts +10 -7
- package/src/runtime/routes/inbound-stages/background-dispatch.test.ts +166 -308
- package/src/runtime/routes/inbound-stages/background-dispatch.ts +158 -335
- package/src/runtime/routes/index.ts +2 -0
- package/src/runtime/routes/inference-profiles-routes.ts +232 -31
- package/src/runtime/routes/inference-provider-connection-routes.ts +24 -4
- package/src/runtime/routes/ingress-status-routes.ts +180 -0
- package/src/runtime/routes/live-voice-routes.test.ts +40 -1
- package/src/runtime/routes/live-voice-routes.ts +34 -0
- package/src/runtime/routes/migration-routes.ts +218 -10
- package/src/runtime/routes/oauth-commands-routes.ts +23 -16
- package/src/runtime/routes/plugins-routes.ts +12 -28
- package/src/runtime/routes/question-routes.ts +6 -0
- package/src/runtime/routes/secret-routes.ts +7 -27
- package/src/runtime/routes/settings-routes.ts +9 -6
- package/src/runtime/routes/watch-routes.ts +807 -0
- package/src/runtime/slack-reply-session.test.ts +230 -121
- package/src/runtime/slack-reply-session.ts +113 -81
- package/src/runtime/{slack-task-progress.test.ts → task-progress.test.ts} +1 -28
- package/src/runtime/{slack-task-progress.ts → task-progress.ts} +30 -51
- package/src/security/__tests__/untrusted-content.test.ts +42 -0
- package/src/security/untrusted-content.ts +28 -9
- package/src/telemetry/__tests__/live-voice-funnel.test.ts +108 -0
- package/src/telemetry/live-voice-funnel.ts +75 -8
- package/src/tools/credentials/store.ts +18 -6
- package/src/tools/network/__tests__/firecrawl-compat.test.ts +77 -0
- package/src/tools/network/__tests__/web-fetch-fastcrw.test.ts +169 -0
- package/src/tools/network/__tests__/web-search.test.ts +97 -2
- package/src/tools/network/firecrawl-compat.ts +90 -0
- package/src/tools/network/web-fetch.ts +142 -62
- package/src/tools/network/web-search.ts +141 -55
- package/src/tools/types.ts +2 -1
- package/src/util/oauth-request-body.test.ts +74 -0
- package/src/util/oauth-request-body.ts +60 -0
- package/src/util/worker-process.ts +1 -0
- package/src/watch/__tests__/watch-retro.test.ts +665 -0
- package/src/watch/__tests__/watch-session-manager.test.ts +566 -0
- package/src/watch/__tests__/watch-timeline.test.ts +670 -0
- package/src/watch/watch-retro.ts +480 -0
- package/src/watch/watch-session-manager.ts +575 -0
- package/src/watch/watch-timeline.ts +848 -0
|
@@ -21,27 +21,28 @@ import {
|
|
|
21
21
|
setPlatformOrganizationId,
|
|
22
22
|
setPlatformUserId,
|
|
23
23
|
} from "../../config/env.js";
|
|
24
|
-
import { getConfig
|
|
24
|
+
import { getConfig } from "../../config/loader.js";
|
|
25
25
|
import { maybeDefaultSpeechToManaged } from "../../config/managed-speech-defaults.js";
|
|
26
26
|
import { getCesClient } from "../../credential-execution/ces-runtime.js";
|
|
27
27
|
import type { CesClient } from "../../credential-execution/client.js";
|
|
28
|
-
import { evictConversationsForReload } from "../../daemon/conversation-store.js";
|
|
29
28
|
import {
|
|
30
29
|
isNonSecretPlatformField,
|
|
31
30
|
scrubStoredCredentialFromTranscripts,
|
|
32
31
|
} from "../../daemon/credential-transcript-scrub.js";
|
|
33
32
|
import { syncManualTokenConnection } from "../../oauth/manual-token-connection.js";
|
|
34
|
-
import { clearEmbeddingBackendCache } from "../../persistence/embeddings/embedding-backend.js";
|
|
35
33
|
import { maybeReseedCapabilitiesAfterManagedCredential } from "../../plugins/defaults/memory/substrate/boot-maintenance.js";
|
|
36
34
|
import { validateAnthropicApiKey } from "../../providers/anthropic/client.js";
|
|
37
35
|
import { validateAtlasCloudApiKey } from "../../providers/atlascloud/client.js";
|
|
38
36
|
import { validateBasetenApiKey } from "../../providers/baseten/client.js";
|
|
39
37
|
import { validateGeminiApiKey } from "../../providers/gemini/client.js";
|
|
38
|
+
import {
|
|
39
|
+
refreshProvidersAfterSecretChange,
|
|
40
|
+
refreshProvidersForRotatedCredential,
|
|
41
|
+
} from "../../providers/inference/credential-rotation.js";
|
|
40
42
|
import { validateMinimaxApiKey } from "../../providers/minimax/client.js";
|
|
41
43
|
import { validateOpenAIApiKey } from "../../providers/openai/client.js";
|
|
42
44
|
import { validatePoolsideApiKey } from "../../providers/poolside/client.js";
|
|
43
45
|
import { API_KEY_PROVIDERS } from "../../providers/provider-secret-catalog.js";
|
|
44
|
-
import { initializeProviders } from "../../providers/registry.js";
|
|
45
46
|
import { credentialKey } from "../../security/credential-key.js";
|
|
46
47
|
import {
|
|
47
48
|
deleteSecureKeyAsync,
|
|
@@ -171,29 +172,6 @@ export async function notifyCesOfAssistantApiKeyUpdate(
|
|
|
171
172
|
void queueApiKeyPropagation(cesClient, value, generation);
|
|
172
173
|
}
|
|
173
174
|
|
|
174
|
-
// ---------------------------------------------------------------------------
|
|
175
|
-
// Provider refresh after secret changes
|
|
176
|
-
// ---------------------------------------------------------------------------
|
|
177
|
-
|
|
178
|
-
async function refreshProvidersAfterSecretChange(): Promise<void> {
|
|
179
|
-
clearEmbeddingBackendCache();
|
|
180
|
-
invalidateConfigCache();
|
|
181
|
-
await initializeProviders(getConfig());
|
|
182
|
-
|
|
183
|
-
// Provider instances are captured when conversations are created, so a key
|
|
184
|
-
// change must evict or mark them stale before the next turn. Best-effort:
|
|
185
|
-
// the credential write has already succeeded, so a disposal failure must not
|
|
186
|
-
// surface as a 500 that makes clients think the secret change failed.
|
|
187
|
-
try {
|
|
188
|
-
evictConversationsForReload();
|
|
189
|
-
} catch (err) {
|
|
190
|
-
log.warn(
|
|
191
|
-
{ error: err instanceof Error ? err.message : String(err) },
|
|
192
|
-
"Error evicting conversations after credential change (non-fatal)",
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
175
|
// ---------------------------------------------------------------------------
|
|
198
176
|
// Handlers
|
|
199
177
|
// ---------------------------------------------------------------------------
|
|
@@ -430,6 +408,8 @@ async function handleAddSecret({ body }: RouteHandlerArgs) {
|
|
|
430
408
|
if (service === "vellum" && field === "assistant_api_key") {
|
|
431
409
|
await notifyCesOfAssistantApiKeyUpdate(value, getCesClient());
|
|
432
410
|
}
|
|
411
|
+
} else if (!isTrimmedIdentity) {
|
|
412
|
+
await refreshProvidersForRotatedCredential(service, field);
|
|
433
413
|
}
|
|
434
414
|
if (
|
|
435
415
|
service === "vellum" &&
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
7
|
import { basename, join } from "node:path";
|
|
8
8
|
|
|
9
|
+
import { normalizePublicBaseUrl } from "@vellumai/service-contracts/ingress";
|
|
9
10
|
import { z } from "zod";
|
|
10
11
|
|
|
11
12
|
import { setImage } from "../../avatar/avatar-store.js";
|
|
@@ -24,6 +25,7 @@ import {
|
|
|
24
25
|
} from "../../daemon/conversation-tool-setup.js";
|
|
25
26
|
import {
|
|
26
27
|
computeGatewayTarget,
|
|
28
|
+
dropTunnelRecordsForNewUrl,
|
|
27
29
|
getIngressConfigResult,
|
|
28
30
|
} from "../../daemon/handlers/config-ingress.js";
|
|
29
31
|
import { normalizeActivationKey } from "../../daemon/handlers/config-voice.js";
|
|
@@ -837,12 +839,12 @@ function handleGetPlatformConfig() {
|
|
|
837
839
|
function handleUpdatePlatformConfig({ body = {} }: RouteHandlerArgs) {
|
|
838
840
|
try {
|
|
839
841
|
const { baseUrl: rawBaseUrl } = body as { baseUrl?: string };
|
|
840
|
-
const value = (rawBaseUrl
|
|
842
|
+
const value = normalizePublicBaseUrl(rawBaseUrl);
|
|
841
843
|
const raw = loadRawConfig();
|
|
842
844
|
const platform = (raw?.platform ?? {}) as Record<string, unknown>;
|
|
843
|
-
platform.baseUrl = value
|
|
845
|
+
platform.baseUrl = value;
|
|
844
846
|
saveRawConfig({ ...raw, platform });
|
|
845
|
-
return { baseUrl: value, success: true };
|
|
847
|
+
return { baseUrl: value ?? "", success: true };
|
|
846
848
|
} catch (err) {
|
|
847
849
|
const message = err instanceof Error ? err.message : String(err);
|
|
848
850
|
log.error({ err }, "Failed to update platform config");
|
|
@@ -860,10 +862,11 @@ function handleUpdateIngressConfig({ body = {} }: RouteHandlerArgs) {
|
|
|
860
862
|
publicBaseUrl?: string;
|
|
861
863
|
enabled?: boolean;
|
|
862
864
|
};
|
|
863
|
-
const value = (rawUrl
|
|
865
|
+
const value = normalizePublicBaseUrl(rawUrl);
|
|
864
866
|
const raw = loadRawConfig();
|
|
865
867
|
const ingress = (raw?.ingress ?? {}) as Record<string, unknown>;
|
|
866
|
-
ingress
|
|
868
|
+
dropTunnelRecordsForNewUrl(ingress, value);
|
|
869
|
+
ingress.publicBaseUrl = value;
|
|
867
870
|
if (enabled !== undefined) {
|
|
868
871
|
ingress.enabled = enabled;
|
|
869
872
|
}
|
|
@@ -878,7 +881,7 @@ function handleUpdateIngressConfig({ body = {} }: RouteHandlerArgs) {
|
|
|
878
881
|
|
|
879
882
|
return {
|
|
880
883
|
enabled: isEnabled,
|
|
881
|
-
publicBaseUrl: value,
|
|
884
|
+
publicBaseUrl: value ?? "",
|
|
882
885
|
localGatewayTarget: computeGatewayTarget(),
|
|
883
886
|
success: true,
|
|
884
887
|
};
|