visionclaw 0.1.204 → 0.1.205-beta.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/dist/agent/model-provider.js +1 -1
- package/dist/agent/model-provider.js.map +1 -1
- package/dist/agent/session-manager.d.ts +2 -0
- package/dist/agent/session-manager.d.ts.map +1 -1
- package/dist/agent/session-manager.js +3 -1
- package/dist/agent/session-manager.js.map +1 -1
- package/dist/agent/stream-handler.d.ts.map +1 -1
- package/dist/agent/stream-handler.js +1 -0
- package/dist/agent/stream-handler.js.map +1 -1
- package/dist/builtin-skills/fin-app/SKILL.md +54 -6
- package/dist/tools/notify.d.ts.map +1 -1
- package/dist/tools/notify.js +52 -7
- package/dist/tools/notify.js.map +1 -1
- package/dist-agent/bundle.cjs +61 -19
- package/package.json +1 -1
- package/dist/agent/applied-credential-signature.d.ts +0 -53
- package/dist/agent/applied-credential-signature.d.ts.map +0 -1
- package/dist/agent/applied-credential-signature.js +0 -137
- package/dist/agent/applied-credential-signature.js.map +0 -1
- package/dist/agent/engines/client-factory.d.ts +0 -63
- package/dist/agent/engines/client-factory.d.ts.map +0 -1
- package/dist/agent/engines/client-factory.js +0 -382
- package/dist/agent/engines/client-factory.js.map +0 -1
- package/dist/agent/engines/engine.d.ts +0 -8
- package/dist/agent/engines/engine.d.ts.map +0 -1
- package/dist/agent/engines/engine.js +0 -15
- package/dist/agent/engines/engine.js.map +0 -1
- package/dist/agent/engines/openai/file-session.d.ts +0 -19
- package/dist/agent/engines/openai/file-session.d.ts.map +0 -1
- package/dist/agent/engines/openai/file-session.js +0 -78
- package/dist/agent/engines/openai/file-session.js.map +0 -1
- package/dist/agent/engines/openai/file-tools.d.ts +0 -35
- package/dist/agent/engines/openai/file-tools.d.ts.map +0 -1
- package/dist/agent/engines/openai/file-tools.js +0 -194
- package/dist/agent/engines/openai/file-tools.js.map +0 -1
- package/dist/agent/engines/openai/session.d.ts +0 -55
- package/dist/agent/engines/openai/session.d.ts.map +0 -1
- package/dist/agent/engines/openai/session.js +0 -447
- package/dist/agent/engines/openai/session.js.map +0 -1
- package/dist/agent/engines/openai/tools.d.ts +0 -15
- package/dist/agent/engines/openai/tools.d.ts.map +0 -1
- package/dist/agent/engines/openai/tools.js +0 -221
- package/dist/agent/engines/openai/tools.js.map +0 -1
- package/dist/agent/engines/pi/session.d.ts +0 -49
- package/dist/agent/engines/pi/session.d.ts.map +0 -1
- package/dist/agent/engines/pi/session.js +0 -309
- package/dist/agent/engines/pi/session.js.map +0 -1
- package/dist/agent/memory-preload.d.ts +0 -55
- package/dist/agent/memory-preload.d.ts.map +0 -1
- package/dist/agent/memory-preload.js +0 -166
- package/dist/agent/memory-preload.js.map +0 -1
- package/dist/agent/providers/claude/cli-resolver.d.ts +0 -16
- package/dist/agent/providers/claude/cli-resolver.d.ts.map +0 -1
- package/dist/agent/providers/claude/cli-resolver.js +0 -83
- package/dist/agent/providers/claude/cli-resolver.js.map +0 -1
- package/dist/agent/providers/claude/session-browser-policy.d.ts +0 -9
- package/dist/agent/providers/claude/session-browser-policy.d.ts.map +0 -1
- package/dist/agent/providers/claude/session-browser-policy.js +0 -49
- package/dist/agent/providers/claude/session-browser-policy.js.map +0 -1
- package/dist/agent/providers/claude/session.d.ts +0 -304
- package/dist/agent/providers/claude/session.d.ts.map +0 -1
- package/dist/agent/providers/claude/session.js +0 -1236
- package/dist/agent/providers/claude/session.js.map +0 -1
- package/dist/agent/providers/client-factory.d.ts +0 -60
- package/dist/agent/providers/client-factory.d.ts.map +0 -1
- package/dist/agent/providers/client-factory.js +0 -400
- package/dist/agent/providers/client-factory.js.map +0 -1
- package/dist/agent/providers/openai/file-session.d.ts +0 -19
- package/dist/agent/providers/openai/file-session.d.ts.map +0 -1
- package/dist/agent/providers/openai/file-session.js +0 -78
- package/dist/agent/providers/openai/file-session.js.map +0 -1
- package/dist/agent/providers/openai/session.d.ts +0 -55
- package/dist/agent/providers/openai/session.d.ts.map +0 -1
- package/dist/agent/providers/openai/session.js +0 -447
- package/dist/agent/providers/openai/session.js.map +0 -1
- package/dist/agent/providers/openai/tools.d.ts +0 -15
- package/dist/agent/providers/openai/tools.d.ts.map +0 -1
- package/dist/agent/providers/openai/tools.js +0 -229
- package/dist/agent/providers/openai/tools.js.map +0 -1
- package/dist/agent/providers/session-types.d.ts +0 -153
- package/dist/agent/providers/session-types.d.ts.map +0 -1
- package/dist/agent/providers/session-types.js +0 -2
- package/dist/agent/providers/session-types.js.map +0 -1
- package/dist/agent/providers/system-prompt-log.d.ts +0 -9
- package/dist/agent/providers/system-prompt-log.d.ts.map +0 -1
- package/dist/agent/providers/system-prompt-log.js +0 -46
- package/dist/agent/providers/system-prompt-log.js.map +0 -1
- package/dist/agent/transcript-backfill.d.ts +0 -54
- package/dist/agent/transcript-backfill.d.ts.map +0 -1
- package/dist/agent/transcript-backfill.js +0 -604
- package/dist/agent/transcript-backfill.js.map +0 -1
- package/dist/agent/transcript-indexer.d.ts +0 -200
- package/dist/agent/transcript-indexer.d.ts.map +0 -1
- package/dist/agent/transcript-indexer.js +0 -775
- package/dist/agent/transcript-indexer.js.map +0 -1
- package/dist/agent/transcript-memory-migrations.d.ts +0 -25
- package/dist/agent/transcript-memory-migrations.d.ts.map +0 -1
- package/dist/agent/transcript-memory-migrations.js +0 -87
- package/dist/agent/transcript-memory-migrations.js.map +0 -1
- package/dist/agent/tunnel-credential-handler.d.ts +0 -90
- package/dist/agent/tunnel-credential-handler.d.ts.map +0 -1
- package/dist/agent/tunnel-credential-handler.js +0 -162
- package/dist/agent/tunnel-credential-handler.js.map +0 -1
- package/dist/agent/usage-backfill-handler.d.ts +0 -18
- package/dist/agent/usage-backfill-handler.d.ts.map +0 -1
- package/dist/agent/usage-backfill-handler.js +0 -69
- package/dist/agent/usage-backfill-handler.js.map +0 -1
- package/dist/agent/usage-gate.d.ts +0 -25
- package/dist/agent/usage-gate.d.ts.map +0 -1
- package/dist/agent/usage-gate.js +0 -83
- package/dist/agent/usage-gate.js.map +0 -1
- package/dist/agent/usage-handler.d.ts +0 -7
- package/dist/agent/usage-handler.d.ts.map +0 -1
- package/dist/agent/usage-handler.js +0 -28
- package/dist/agent/usage-handler.js.map +0 -1
- package/dist/agent/usage-report-builder.d.ts +0 -26
- package/dist/agent/usage-report-builder.d.ts.map +0 -1
- package/dist/agent/usage-report-builder.js +0 -80
- package/dist/agent/usage-report-builder.js.map +0 -1
- package/dist/agent/usage-report-queue.d.ts +0 -26
- package/dist/agent/usage-report-queue.d.ts.map +0 -1
- package/dist/agent/usage-report-queue.js +0 -199
- package/dist/agent/usage-report-queue.js.map +0 -1
- package/dist/agent/usage-report-types.d.ts +0 -41
- package/dist/agent/usage-report-types.d.ts.map +0 -1
- package/dist/agent/usage-report-types.js +0 -2
- package/dist/agent/usage-report-types.js.map +0 -1
- package/dist/agent/usage-reporter.d.ts +0 -31
- package/dist/agent/usage-reporter.d.ts.map +0 -1
- package/dist/agent/usage-reporter.js +0 -102
- package/dist/agent/usage-reporter.js.map +0 -1
- package/dist/agent/wake-cycle-tool-tracker.d.ts +0 -39
- package/dist/agent/wake-cycle-tool-tracker.d.ts.map +0 -1
- package/dist/agent/wake-cycle-tool-tracker.js +0 -72
- package/dist/agent/wake-cycle-tool-tracker.js.map +0 -1
- package/dist/billing/payg-handler.d.ts +0 -29
- package/dist/billing/payg-handler.d.ts.map +0 -1
- package/dist/billing/payg-handler.js +0 -92
- package/dist/billing/payg-handler.js.map +0 -1
- package/dist/billing/payment-handler.d.ts +0 -24
- package/dist/billing/payment-handler.d.ts.map +0 -1
- package/dist/billing/payment-handler.js +0 -101
- package/dist/billing/payment-handler.js.map +0 -1
- package/dist/builtin-skills/catalog/phone-adb-automation/SKILL.md +0 -412
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_input.sh +0 -132
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_launch.sh +0 -166
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_screenshot.sh +0 -87
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_security_kbd.py +0 -174
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_setup.sh +0 -274
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_swipe.sh +0 -111
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_tap.sh +0 -87
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_ui_parse.py +0 -176
- package/dist/builtin-skills/catalog/phone-adb-automation/phone_wake_unlock.sh +0 -67
- package/dist/builtin-skills/transcribe-audio/SKILL.md +0 -122
- package/dist/channels/web.d.ts +0 -40
- package/dist/channels/web.d.ts.map +0 -1
- package/dist/channels/web.js +0 -137
- package/dist/channels/web.js.map +0 -1
- package/dist/data-processing/convert-demo-cli.d.ts +0 -7
- package/dist/data-processing/convert-demo-cli.d.ts.map +0 -1
- package/dist/data-processing/convert-demo-cli.js +0 -30
- package/dist/data-processing/convert-demo-cli.js.map +0 -1
- package/dist/data-processing/convert-demo.d.ts +0 -26
- package/dist/data-processing/convert-demo.d.ts.map +0 -1
- package/dist/data-processing/convert-demo.js +0 -233
- package/dist/data-processing/convert-demo.js.map +0 -1
- package/dist/obs/auth.d.ts +0 -45
- package/dist/obs/auth.d.ts.map +0 -1
- package/dist/obs/auth.js +0 -181
- package/dist/obs/auth.js.map +0 -1
- package/dist/obs/rdp/icons/icons/app_windows.svg +0 -4
- package/dist/obs/rdp/icons/icons/clip_get.svg +0 -4
- package/dist/obs/rdp/icons/icons/clip_send.svg +0 -4
- package/dist/obs/rdp/icons/icons/clip_shared.svg +0 -4
- package/dist/obs/rdp/icons/icons/clipboard.svg +0 -4
- package/dist/obs/rdp/icons/icons/clipboard_shared.svg +0 -4
- package/dist/obs/rdp/icons/icons/control.svg +0 -4
- package/dist/obs/rdp/icons/icons/desktop.svg +0 -4
- package/dist/obs/rdp/icons/icons/display.svg +0 -4
- package/dist/obs/rdp/icons/icons/launchpad.svg +0 -4
- package/dist/obs/rdp/icons/icons/mission_control.svg +0 -4
- package/dist/obs/rdp/icons/icons/screenshot.svg +0 -4
- package/dist/obs/rdp/icons/icons/zoom_actual.svg +0 -4
- package/dist/obs/rdp/icons/icons/zoom_fit.svg +0 -4
- package/dist/obs/rdp/icons/icons/zoom_in.svg +0 -4
- package/dist/obs/rdp/icons/icons/zoom_out.svg +0 -4
- package/dist/obs/tunnel-telemetry.d.ts +0 -46
- package/dist/obs/tunnel-telemetry.d.ts.map +0 -1
- package/dist/obs/tunnel-telemetry.js +0 -70
- package/dist/obs/tunnel-telemetry.js.map +0 -1
- package/dist/onboarding/cloudflared-cert.d.ts +0 -15
- package/dist/onboarding/cloudflared-cert.d.ts.map +0 -1
- package/dist/onboarding/cloudflared-cert.js +0 -57
- package/dist/onboarding/cloudflared-cert.js.map +0 -1
- package/dist/phonecall-credentials.d.ts +0 -21
- package/dist/phonecall-credentials.d.ts.map +0 -1
- package/dist/phonecall-credentials.js +0 -34
- package/dist/phonecall-credentials.js.map +0 -1
- package/dist/realtime/agent-bridge.d.ts +0 -7
- package/dist/realtime/agent-bridge.d.ts.map +0 -1
- package/dist/realtime/agent-bridge.js +0 -31
- package/dist/realtime/agent-bridge.js.map +0 -1
- package/dist/realtime/assets/index.html +0 -1058
- package/dist/realtime/assets/samples/alloy.mp3 +0 -0
- package/dist/realtime/assets/samples/ash.mp3 +0 -0
- package/dist/realtime/assets/samples/ballad.mp3 +0 -0
- package/dist/realtime/assets/samples/cedar.mp3 +0 -0
- package/dist/realtime/assets/samples/coral.mp3 +0 -0
- package/dist/realtime/assets/samples/echo.mp3 +0 -0
- package/dist/realtime/assets/samples/marin.mp3 +0 -0
- package/dist/realtime/assets/samples/sage.mp3 +0 -0
- package/dist/realtime/assets/samples/shimmer.mp3 +0 -0
- package/dist/realtime/assets/samples/verse.mp3 +0 -0
- package/dist/realtime/context.d.ts +0 -14
- package/dist/realtime/context.d.ts.map +0 -1
- package/dist/realtime/context.js +0 -153
- package/dist/realtime/context.js.map +0 -1
- package/dist/realtime/http-helpers.d.ts +0 -5
- package/dist/realtime/http-helpers.d.ts.map +0 -1
- package/dist/realtime/http-helpers.js +0 -29
- package/dist/realtime/http-helpers.js.map +0 -1
- package/dist/realtime/index.d.ts +0 -62
- package/dist/realtime/index.d.ts.map +0 -1
- package/dist/realtime/index.js +0 -94
- package/dist/realtime/index.js.map +0 -1
- package/dist/realtime/server.d.ts +0 -6
- package/dist/realtime/server.d.ts.map +0 -1
- package/dist/realtime/server.js +0 -479
- package/dist/realtime/server.js.map +0 -1
- package/dist/realtime/telegram-auth.d.ts +0 -2
- package/dist/realtime/telegram-auth.d.ts.map +0 -1
- package/dist/realtime/telegram-auth.js +0 -24
- package/dist/realtime/telegram-auth.js.map +0 -1
- package/dist/realtime/tools.d.ts +0 -829
- package/dist/realtime/tools.d.ts.map +0 -1
- package/dist/realtime/tools.js +0 -611
- package/dist/realtime/tools.js.map +0 -1
- package/dist/realtime/types.d.ts +0 -62
- package/dist/realtime/types.d.ts.map +0 -1
- package/dist/realtime/types.js +0 -3
- package/dist/realtime/types.js.map +0 -1
- package/dist/realtime/voice-summarizer.d.ts +0 -4
- package/dist/realtime/voice-summarizer.d.ts.map +0 -1
- package/dist/realtime/voice-summarizer.js +0 -123
- package/dist/realtime/voice-summarizer.js.map +0 -1
- package/dist/realtime/websocket.d.ts +0 -7
- package/dist/realtime/websocket.d.ts.map +0 -1
- package/dist/realtime/websocket.js +0 -65
- package/dist/realtime/websocket.js.map +0 -1
- package/dist/service/gbox-tun.d.ts +0 -14
- package/dist/service/gbox-tun.d.ts.map +0 -1
- package/dist/service/gbox-tun.js +0 -315
- package/dist/service/gbox-tun.js.map +0 -1
- package/dist/skills/installed.d.ts +0 -11
- package/dist/skills/installed.d.ts.map +0 -1
- package/dist/skills/installed.js +0 -35
- package/dist/skills/installed.js.map +0 -1
- package/dist/tools/card.d.ts +0 -11
- package/dist/tools/card.d.ts.map +0 -1
- package/dist/tools/card.js +0 -87
- package/dist/tools/card.js.map +0 -1
- package/dist/tools/coordinate-resolver.d.ts +0 -30
- package/dist/tools/coordinate-resolver.d.ts.map +0 -1
- package/dist/tools/coordinate-resolver.js +0 -104
- package/dist/tools/coordinate-resolver.js.map +0 -1
- package/dist/tools/stock-data.d.ts +0 -70
- package/dist/tools/stock-data.d.ts.map +0 -1
- package/dist/tools/stock-data.js +0 -596
- package/dist/tools/stock-data.js.map +0 -1
- package/dist/tools/webapp.d.ts +0 -30
- package/dist/tools/webapp.d.ts.map +0 -1
- package/dist/tools/webapp.js +0 -114
- package/dist/tools/webapp.js.map +0 -1
- package/dist/utils/wechat-monitor.d.ts +0 -21
- package/dist/utils/wechat-monitor.d.ts.map +0 -1
- package/dist/utils/wechat-monitor.js +0 -88
- package/dist/utils/wechat-monitor.js.map +0 -1
- package/dist/webapp/index.d.ts +0 -28
- package/dist/webapp/index.d.ts.map +0 -1
- package/dist/webapp/index.js +0 -75
- package/dist/webapp/index.js.map +0 -1
- package/dist/webapp/server.d.ts +0 -32
- package/dist/webapp/server.d.ts.map +0 -1
- package/dist/webapp/server.js +0 -375
- package/dist/webapp/server.js.map +0 -1
- package/dist/webapp/storage.d.ts +0 -64
- package/dist/webapp/storage.d.ts.map +0 -1
- package/dist/webapp/storage.js +0 -103
- package/dist/webapp/storage.js.map +0 -1
- package/dist/webapp/ui.d.ts +0 -2
- package/dist/webapp/ui.d.ts.map +0 -1
- package/dist/webapp/ui.js +0 -319
- package/dist/webapp/ui.js.map +0 -1
- package/dist-agent/assets/index.html +0 -1058
- package/dist-agent/assets/samples/alloy.mp3 +0 -0
- package/dist-agent/assets/samples/ash.mp3 +0 -0
- package/dist-agent/assets/samples/ballad.mp3 +0 -0
- package/dist-agent/assets/samples/cedar.mp3 +0 -0
- package/dist-agent/assets/samples/coral.mp3 +0 -0
- package/dist-agent/assets/samples/echo.mp3 +0 -0
- package/dist-agent/assets/samples/marin.mp3 +0 -0
- package/dist-agent/assets/samples/sage.mp3 +0 -0
- package/dist-agent/assets/samples/shimmer.mp3 +0 -0
- package/dist-agent/assets/samples/verse.mp3 +0 -0
- package/dist-agent/realtime/assets/index.html +0 -1058
- package/dist-agent/realtime/assets/samples/alloy.mp3 +0 -0
- package/dist-agent/realtime/assets/samples/ash.mp3 +0 -0
- package/dist-agent/realtime/assets/samples/ballad.mp3 +0 -0
- package/dist-agent/realtime/assets/samples/cedar.mp3 +0 -0
- package/dist-agent/realtime/assets/samples/coral.mp3 +0 -0
- package/dist-agent/realtime/assets/samples/echo.mp3 +0 -0
- package/dist-agent/realtime/assets/samples/marin.mp3 +0 -0
- package/dist-agent/realtime/assets/samples/sage.mp3 +0 -0
- package/dist-agent/realtime/assets/samples/shimmer.mp3 +0 -0
- package/dist-agent/realtime/assets/samples/verse.mp3 +0 -0
package/dist-agent/bundle.cjs
CHANGED
|
@@ -20785,7 +20785,7 @@ var require_prompts3 = __commonJS({
|
|
|
20785
20785
|
|
|
20786
20786
|
// dist/utils/version-check.js
|
|
20787
20787
|
function isBundled() {
|
|
20788
|
-
const v14 = "0.1.
|
|
20788
|
+
const v14 = "0.1.205-beta.1";
|
|
20789
20789
|
return typeof v14 === "string" && v14 !== "undefined";
|
|
20790
20790
|
}
|
|
20791
20791
|
function getPackageRoot() {
|
|
@@ -20802,7 +20802,7 @@ function getInstallationInfo() {
|
|
|
20802
20802
|
};
|
|
20803
20803
|
}
|
|
20804
20804
|
function getCurrentVersion() {
|
|
20805
|
-
const bundledVersion = "0.1.
|
|
20805
|
+
const bundledVersion = "0.1.205-beta.1";
|
|
20806
20806
|
if (bundledVersion && bundledVersion !== "undefined") {
|
|
20807
20807
|
return bundledVersion;
|
|
20808
20808
|
}
|
|
@@ -928037,7 +928037,7 @@ function resolvePiSideCallModel(config3, options2 = {}) {
|
|
|
928037
928037
|
model: {
|
|
928038
928038
|
id: modelId,
|
|
928039
928039
|
name: modelId,
|
|
928040
|
-
api: "openai-
|
|
928040
|
+
api: "openai-responses",
|
|
928041
928041
|
provider: config3.provider,
|
|
928042
928042
|
baseUrl,
|
|
928043
928043
|
reasoning: false,
|
|
@@ -953457,6 +953457,27 @@ function resolveOwnerTargetForChannel(channel, targets) {
|
|
|
953457
953457
|
function resolveDefaultOwnerTarget(config3, ownerConfig) {
|
|
953458
953458
|
return resolveOwnerPrimaryTarget(config3, ownerConfig) ?? resolveOwnerFallbackChain(config3, ownerConfig)[0];
|
|
953459
953459
|
}
|
|
953460
|
+
function normalizeEmailAddress(value2) {
|
|
953461
|
+
if (!value2)
|
|
953462
|
+
return void 0;
|
|
953463
|
+
const trimmed = value2.trim();
|
|
953464
|
+
const angleAddress = /<\s*([^<>\s]+@[^<>\s]+)\s*>/.exec(trimmed)?.[1];
|
|
953465
|
+
const candidate = (angleAddress ?? trimmed).trim().toLowerCase();
|
|
953466
|
+
return /^[^\s<>@]+@[^\s<>@]+$/.test(candidate) ? candidate : void 0;
|
|
953467
|
+
}
|
|
953468
|
+
function emailAddressesMatch(left, right) {
|
|
953469
|
+
const a13 = normalizeEmailAddress(left);
|
|
953470
|
+
const b16 = normalizeEmailAddress(right);
|
|
953471
|
+
if (!a13 || !b16)
|
|
953472
|
+
return false;
|
|
953473
|
+
if (a13 === b16)
|
|
953474
|
+
return true;
|
|
953475
|
+
const withoutPlusTag = (address) => {
|
|
953476
|
+
const [local, domain3] = address.split("@");
|
|
953477
|
+
return `${local.split("+", 1)[0]}@${domain3}`;
|
|
953478
|
+
};
|
|
953479
|
+
return withoutPlusTag(a13) === withoutPlusTag(b16);
|
|
953480
|
+
}
|
|
953460
953481
|
async function sendUserNotification(args) {
|
|
953461
953482
|
const state4 = getAgentState();
|
|
953462
953483
|
const { ownerConfig, config: config3 } = state4;
|
|
@@ -953466,14 +953487,25 @@ async function sendUserNotification(args) {
|
|
|
953466
953487
|
...resolveOwnerFallbackChain(config3, ownerConfig),
|
|
953467
953488
|
...listBoundOwnerChannels(config3, ownerConfig)
|
|
953468
953489
|
];
|
|
953469
|
-
|
|
953470
|
-
let
|
|
953471
|
-
|
|
953490
|
+
let requestedChannel = args.channel;
|
|
953491
|
+
let requestedTo = args.to;
|
|
953492
|
+
const taskTarget = state4.currentTaskReplyTarget;
|
|
953493
|
+
const taskSenderEmail = normalizeEmailAddress(taskTarget?.sender);
|
|
953494
|
+
const ownerEmail = normalizeEmailAddress(ownerConfig.ownerEmail);
|
|
953495
|
+
const externalGmailTask = normalizeChannelName(taskTarget?.channel ?? "") === "gmail" && taskSenderEmail !== void 0 && ownerEmail !== void 0 && !emailAddressesMatch(taskSenderEmail, ownerEmail);
|
|
953496
|
+
const wouldEmailOwner = normalizeChannelName(requestedChannel ?? "") === "gmail" && emailAddressesMatch(requestedTo, ownerEmail);
|
|
953497
|
+
if (externalGmailTask && wouldEmailOwner) {
|
|
953498
|
+
requestedChannel = void 0;
|
|
953499
|
+
requestedTo = void 0;
|
|
953500
|
+
}
|
|
953501
|
+
const channel = normalizeChannelName(requestedChannel ?? defaultOwnerTarget?.channel ?? "telegram");
|
|
953502
|
+
let replyTarget = requestedTo ? state4.replyMap.get(`${channel}::${requestedTo}`) : void 0;
|
|
953503
|
+
if (!replyTarget && !requestedTo && state4.currentTaskReplyTarget?.channel === channel) {
|
|
953472
953504
|
replyTarget = state4.currentTaskReplyTarget;
|
|
953473
953505
|
}
|
|
953474
953506
|
const groupLikeTaskTarget = state4.currentTaskReplyTarget?.channel === channel && state4.currentTaskReplyTarget.isGroupLike ? state4.currentTaskReplyTarget : void 0;
|
|
953475
|
-
const explicitChannelOwnerTarget =
|
|
953476
|
-
const to2 =
|
|
953507
|
+
const explicitChannelOwnerTarget = requestedChannel ? resolveOwnerTargetForChannel(channel, ownerTargets) : defaultOwnerTarget;
|
|
953508
|
+
const to2 = requestedTo ?? replyTarget?.sender ?? (groupLikeTaskTarget ? void 0 : explicitChannelOwnerTarget?.to);
|
|
953477
953509
|
if (!to2) {
|
|
953478
953510
|
return {
|
|
953479
953511
|
content: [
|
|
@@ -953529,7 +953561,7 @@ async function sendUserNotification(args) {
|
|
|
953529
953561
|
replyTo: replyTarget?.replyContext,
|
|
953530
953562
|
logContext: "notify_user message"
|
|
953531
953563
|
};
|
|
953532
|
-
const shouldFallbackAcrossOwnerTargets = !
|
|
953564
|
+
const shouldFallbackAcrossOwnerTargets = !requestedChannel && !requestedTo && !replyTarget && !groupLikeTaskTarget;
|
|
953533
953565
|
const discordFallbackTargets = listBoundOwnerChannels(config3, ownerConfig).filter((target) => target.channel === "discord" && isUsableOutboundTarget(target));
|
|
953534
953566
|
const attempts = shouldFallbackAcrossOwnerTargets ? [
|
|
953535
953567
|
...defaultOwnerTarget ? [defaultOwnerTarget] : [],
|
|
@@ -990817,7 +990849,7 @@ var init_browser_launcher = __esm({
|
|
|
990817
990849
|
|
|
990818
990850
|
// dist/utils/playwriter-relay.js
|
|
990819
990851
|
function isBundled2() {
|
|
990820
|
-
const v14 = "0.1.
|
|
990852
|
+
const v14 = "0.1.205-beta.1";
|
|
990821
990853
|
return typeof v14 === "string" && v14 !== "undefined";
|
|
990822
990854
|
}
|
|
990823
990855
|
function resolveRelayEntryPath() {
|
|
@@ -990852,7 +990884,7 @@ function getPm2RelayProcess() {
|
|
|
990852
990884
|
}
|
|
990853
990885
|
}
|
|
990854
990886
|
function pm2Start(entryPath, host, port) {
|
|
990855
|
-
const versionStr = "0.1.
|
|
990887
|
+
const versionStr = "0.1.205-beta.1";
|
|
990856
990888
|
(0, import_node_child_process19.execFileSync)("pm2", ["start", entryPath, "--name", PM2_PROCESS_NAME, "--update-env"], {
|
|
990857
990889
|
encoding: "utf-8",
|
|
990858
990890
|
stdio: "pipe",
|
|
@@ -990878,7 +990910,7 @@ function pm2Delete() {
|
|
|
990878
990910
|
}
|
|
990879
990911
|
}
|
|
990880
990912
|
function pm2Restart(host, port) {
|
|
990881
|
-
const versionStr = "0.1.
|
|
990913
|
+
const versionStr = "0.1.205-beta.1";
|
|
990882
990914
|
(0, import_node_child_process19.execFileSync)("pm2", ["restart", PM2_PROCESS_NAME, "--update-env"], {
|
|
990883
990915
|
encoding: "utf-8",
|
|
990884
990916
|
stdio: "pipe",
|
|
@@ -991048,7 +991080,7 @@ function reconcilePlaywriterRelay(host = "127.0.0.1", port = 19988) {
|
|
|
991048
991080
|
pm2Restart(host, port);
|
|
991049
991081
|
return;
|
|
991050
991082
|
}
|
|
991051
|
-
const currentVersion = "0.1.
|
|
991083
|
+
const currentVersion = "0.1.205-beta.1";
|
|
991052
991084
|
if (currentEnv.VISIONCLAW_VERSION && currentEnv.VISIONCLAW_VERSION !== currentVersion) {
|
|
991053
991085
|
logger.system(`Playwriter relay: VisionClaw version changed (${currentEnv.VISIONCLAW_VERSION} \u2192 ${currentVersion}), recreating`);
|
|
991054
991086
|
pm2Delete();
|
|
@@ -1242966,7 +1242998,7 @@ When you receive a memo marked \`[Coding task complete]\`, immediately notify th
|
|
|
1242966
1242998
|
"[Coding task complete]",
|
|
1242967
1242999
|
req.memo,
|
|
1242968
1243000
|
"",
|
|
1242969
|
-
"Action required: notify the owner now via `notify_user` with a concise completion summary. Include any important outcome, files changed, validation performed, and any remaining caveats from the memo. Do not just call `finish` without notifying the owner."
|
|
1243001
|
+
req.ownerNotified ? "The coding session already notified the owner via `notify_user`. Do not send another completion summary unless there is material new information." : "Action required: notify the owner now via `notify_user` with a concise completion summary. Include any important outcome, files changed, validation performed, and any remaining caveats from the memo. Do not just call `finish` without notifying the owner."
|
|
1242970
1243002
|
].join("\n") : req.memo;
|
|
1242971
1243003
|
addMemo(currentMode, req.target, memo);
|
|
1242972
1243004
|
}
|
|
@@ -1377550,6 +1377582,15 @@ var init_login_qr = __esm({
|
|
|
1377550
1377582
|
}
|
|
1377551
1377583
|
});
|
|
1377552
1377584
|
|
|
1377585
|
+
// node_modules/openclaw/plugin-sdk.js
|
|
1377586
|
+
function normalizeAccountId2(id3) {
|
|
1377587
|
+
return id3.replace(/[^a-z0-9-]/gi, "-").toLowerCase();
|
|
1377588
|
+
}
|
|
1377589
|
+
var init_plugin_sdk2 = __esm({
|
|
1377590
|
+
"node_modules/openclaw/plugin-sdk.js"() {
|
|
1377591
|
+
}
|
|
1377592
|
+
});
|
|
1377593
|
+
|
|
1377553
1377594
|
// dist/tos-storage.js
|
|
1377554
1377595
|
function createTosClient(credentials, bucket, endpointOverride) {
|
|
1377555
1377596
|
const _require = (0, import_node_module8.createRequire)(__importMetaUrl);
|
|
@@ -1386795,7 +1386836,7 @@ function registerCommandHandlers(deps) {
|
|
|
1386795
1386836
|
await channelManager.sendMessage(req.channel, req.sender, t8("cmd.weixin.failed", getLocale(), result.message));
|
|
1386796
1386837
|
return;
|
|
1386797
1386838
|
}
|
|
1386798
|
-
const accountId =
|
|
1386839
|
+
const accountId = normalizeAccountId2(result.accountId);
|
|
1386799
1386840
|
saveWeixinAccount(accountId, {
|
|
1386800
1386841
|
token: result.botToken,
|
|
1386801
1386842
|
baseUrl: result.baseUrl,
|
|
@@ -1387331,7 +1387372,7 @@ var init_command_handlers = __esm({
|
|
|
1387331
1387372
|
init_activity_tracker();
|
|
1387332
1387373
|
init_accounts();
|
|
1387333
1387374
|
init_login_qr();
|
|
1387334
|
-
|
|
1387375
|
+
init_plugin_sdk2();
|
|
1387335
1387376
|
init_restart();
|
|
1387336
1387377
|
init_owner_channel_resolver();
|
|
1387337
1387378
|
}
|
|
@@ -1391973,7 +1392014,8 @@ async function processAgentStream(queryStream, session, activityTracker, session
|
|
|
1391973
1392014
|
memo: input.memo ?? "",
|
|
1391974
1392015
|
reason: input.reason === "complete" ? "complete" : "handoff",
|
|
1391975
1392016
|
forwardMessage: input.forward_message ?? "",
|
|
1391976
|
-
cwd: input.cwd
|
|
1392017
|
+
cwd: input.cwd,
|
|
1392018
|
+
ownerNotified: notifyUserCalled
|
|
1391977
1392019
|
});
|
|
1391978
1392020
|
finishCalled = true;
|
|
1391979
1392021
|
session.closeInput();
|
|
@@ -1401626,7 +1401668,7 @@ ${result.message}`);
|
|
|
1401626
1401668
|
if (!result.connected || !result.accountId) {
|
|
1401627
1401669
|
process.exit(1);
|
|
1401628
1401670
|
}
|
|
1401629
|
-
const accountId =
|
|
1401671
|
+
const accountId = normalizeAccountId2(result.accountId);
|
|
1401630
1401672
|
saveWeixinAccount(accountId, {
|
|
1401631
1401673
|
token: result.botToken,
|
|
1401632
1401674
|
baseUrl: result.baseUrl,
|
|
@@ -1401659,7 +1401701,7 @@ var init_weixin_login = __esm({
|
|
|
1401659
1401701
|
"use strict";
|
|
1401660
1401702
|
init_accounts();
|
|
1401661
1401703
|
init_login_qr();
|
|
1401662
|
-
|
|
1401704
|
+
init_plugin_sdk2();
|
|
1401663
1401705
|
init_config();
|
|
1401664
1401706
|
}
|
|
1401665
1401707
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "visionclaw",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.205-beta.1",
|
|
4
4
|
"description": "A personal assistant agent that runs on your desktop, receives commands from messaging channels, and executes tasks autonomously.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Applied-credential signature manifest.
|
|
3
|
-
*
|
|
4
|
-
* Persisted alongside materialised tunnel credentials at
|
|
5
|
-
* `<profileTunnelDir>/.applied-signature.json`. Records the signature
|
|
6
|
-
* the server handed us with the last bundle we successfully applied.
|
|
7
|
-
*
|
|
8
|
-
* The manifest is the *only* piece of state the agent has to remember
|
|
9
|
-
* across process restarts about credential bundles — everything else
|
|
10
|
-
* (creds JSON, config.yml) is reconstructable from a fresh server
|
|
11
|
-
* delivery. The signature is opaque to us; we just echo it back on the
|
|
12
|
-
* next heartbeat so the server can decide whether to re-ship the body.
|
|
13
|
-
*
|
|
14
|
-
* Self-healing properties (intentional):
|
|
15
|
-
* - Manifest missing on disk → no signature sent → server sends
|
|
16
|
-
* bundle → we re-apply and rewrite the manifest. Recovers any
|
|
17
|
-
* install where the manifest was deleted but credentials weren't,
|
|
18
|
-
* or vice versa.
|
|
19
|
-
* - Manifest present but probe says no live tunnel files → we treat
|
|
20
|
-
* the manifest as unusable (return null from `loadIfValid`), the
|
|
21
|
-
* next heartbeat goes signature-free, the server re-ships the
|
|
22
|
-
* bundle, and we land back in a coherent state.
|
|
23
|
-
* - Process restart with everything intact → manifest signature is
|
|
24
|
-
* sent on the startup heartbeat, server replies with no
|
|
25
|
-
* `credentialBundle`, no disk writes, no tunnel restart.
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* Read the persisted signature, if any. Returns `null` when the file
|
|
29
|
-
* does not exist, fails to parse, has the wrong shape, or refers to a
|
|
30
|
-
* tunnel state that no longer matches what's on disk.
|
|
31
|
-
*
|
|
32
|
-
* The on-disk-coherence check (`probeLocalTunnelCredential()`) is what
|
|
33
|
-
* gives us self-healing: a stranded manifest from a wiped tunnel dir
|
|
34
|
-
* gets ignored, forcing a fresh bundle on the next heartbeat.
|
|
35
|
-
*/
|
|
36
|
-
export declare function loadAppliedSignatureIfValid(): string | null;
|
|
37
|
-
/**
|
|
38
|
-
* Persist the signature for the most recently applied bundle. Best-
|
|
39
|
-
* effort: a write failure is logged but does not throw, since the
|
|
40
|
-
* worst case is just an extra full-bundle delivery on the next
|
|
41
|
-
* heartbeat.
|
|
42
|
-
*
|
|
43
|
-
* The file is written with 0o600 to match the credentials sitting next
|
|
44
|
-
* to it; the directory itself is already 0o700 from
|
|
45
|
-
* `runtime-credentials.ts`.
|
|
46
|
-
*/
|
|
47
|
-
export declare function writeAppliedSignature(signature: string): void;
|
|
48
|
-
/**
|
|
49
|
-
* Forget the persisted signature. Used by tests; production code never
|
|
50
|
-
* needs to delete it explicitly because writes overwrite in place.
|
|
51
|
-
*/
|
|
52
|
-
export declare function __clearAppliedSignatureForTests(): void;
|
|
53
|
-
//# sourceMappingURL=applied-credential-signature.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applied-credential-signature.d.ts","sourceRoot":"","sources":["../../src/agent/applied-credential-signature.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAwBH;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,GAAG,IAAI,CA2C3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAgC7D;AAED;;;GAGG;AACH,wBAAgB,+BAA+B,IAAI,IAAI,CAMtD"}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Applied-credential signature manifest.
|
|
3
|
-
*
|
|
4
|
-
* Persisted alongside materialised tunnel credentials at
|
|
5
|
-
* `<profileTunnelDir>/.applied-signature.json`. Records the signature
|
|
6
|
-
* the server handed us with the last bundle we successfully applied.
|
|
7
|
-
*
|
|
8
|
-
* The manifest is the *only* piece of state the agent has to remember
|
|
9
|
-
* across process restarts about credential bundles — everything else
|
|
10
|
-
* (creds JSON, config.yml) is reconstructable from a fresh server
|
|
11
|
-
* delivery. The signature is opaque to us; we just echo it back on the
|
|
12
|
-
* next heartbeat so the server can decide whether to re-ship the body.
|
|
13
|
-
*
|
|
14
|
-
* Self-healing properties (intentional):
|
|
15
|
-
* - Manifest missing on disk → no signature sent → server sends
|
|
16
|
-
* bundle → we re-apply and rewrite the manifest. Recovers any
|
|
17
|
-
* install where the manifest was deleted but credentials weren't,
|
|
18
|
-
* or vice versa.
|
|
19
|
-
* - Manifest present but probe says no live tunnel files → we treat
|
|
20
|
-
* the manifest as unusable (return null from `loadIfValid`), the
|
|
21
|
-
* next heartbeat goes signature-free, the server re-ships the
|
|
22
|
-
* bundle, and we land back in a coherent state.
|
|
23
|
-
* - Process restart with everything intact → manifest signature is
|
|
24
|
-
* sent on the startup heartbeat, server replies with no
|
|
25
|
-
* `credentialBundle`, no disk writes, no tunnel restart.
|
|
26
|
-
*/
|
|
27
|
-
import fs from "node:fs";
|
|
28
|
-
import path from "node:path";
|
|
29
|
-
import { getProfileTunnelDir } from "../config/index.js";
|
|
30
|
-
import { probeLocalTunnelCredential } from "./runtime-credentials.js";
|
|
31
|
-
import { logger } from "../logger.js";
|
|
32
|
-
const MANIFEST_FILENAME = ".applied-signature.json";
|
|
33
|
-
const MANIFEST_VERSION = 1;
|
|
34
|
-
function getManifestPath() {
|
|
35
|
-
return path.join(getProfileTunnelDir(), MANIFEST_FILENAME);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Read the persisted signature, if any. Returns `null` when the file
|
|
39
|
-
* does not exist, fails to parse, has the wrong shape, or refers to a
|
|
40
|
-
* tunnel state that no longer matches what's on disk.
|
|
41
|
-
*
|
|
42
|
-
* The on-disk-coherence check (`probeLocalTunnelCredential()`) is what
|
|
43
|
-
* gives us self-healing: a stranded manifest from a wiped tunnel dir
|
|
44
|
-
* gets ignored, forcing a fresh bundle on the next heartbeat.
|
|
45
|
-
*/
|
|
46
|
-
export function loadAppliedSignatureIfValid() {
|
|
47
|
-
const manifestPath = getManifestPath();
|
|
48
|
-
if (!fs.existsSync(manifestPath))
|
|
49
|
-
return null;
|
|
50
|
-
let raw;
|
|
51
|
-
try {
|
|
52
|
-
raw = fs.readFileSync(manifestPath, "utf-8");
|
|
53
|
-
}
|
|
54
|
-
catch (err) {
|
|
55
|
-
logger.warn(`Applied-signature manifest unreadable: ${err instanceof Error ? err.message : String(err)}`);
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
let parsed;
|
|
59
|
-
try {
|
|
60
|
-
parsed = JSON.parse(raw);
|
|
61
|
-
}
|
|
62
|
-
catch {
|
|
63
|
-
logger.warn(`Applied-signature manifest malformed; ignoring`);
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
if (!parsed ||
|
|
67
|
-
typeof parsed !== "object" ||
|
|
68
|
-
!("signature" in parsed) ||
|
|
69
|
-
typeof parsed.signature !== "string" ||
|
|
70
|
-
parsed.signature.trim() === "") {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
const signature = parsed.signature.trim();
|
|
74
|
-
// Coherence: a manifest is only meaningful when the credentials it
|
|
75
|
-
// refers to actually still exist on disk. If the tunnel files were
|
|
76
|
-
// wiped (e.g. operator deleted `~/.visionclaw/profiles/default/tunnel`)
|
|
77
|
-
// the stored signature lies about our state, so pretend we have none
|
|
78
|
-
// and let the server reissue the bundle.
|
|
79
|
-
if (probeLocalTunnelCredential() === null) {
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
return signature;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Persist the signature for the most recently applied bundle. Best-
|
|
86
|
-
* effort: a write failure is logged but does not throw, since the
|
|
87
|
-
* worst case is just an extra full-bundle delivery on the next
|
|
88
|
-
* heartbeat.
|
|
89
|
-
*
|
|
90
|
-
* The file is written with 0o600 to match the credentials sitting next
|
|
91
|
-
* to it; the directory itself is already 0o700 from
|
|
92
|
-
* `runtime-credentials.ts`.
|
|
93
|
-
*/
|
|
94
|
-
export function writeAppliedSignature(signature) {
|
|
95
|
-
if (typeof signature !== "string" || signature.trim() === "")
|
|
96
|
-
return;
|
|
97
|
-
const manifestPath = getManifestPath();
|
|
98
|
-
const dir = path.dirname(manifestPath);
|
|
99
|
-
try {
|
|
100
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
101
|
-
}
|
|
102
|
-
catch {
|
|
103
|
-
// best-effort; the credential apply path will have created it
|
|
104
|
-
}
|
|
105
|
-
const payload = {
|
|
106
|
-
version: MANIFEST_VERSION,
|
|
107
|
-
signature: signature.trim(),
|
|
108
|
-
appliedAt: new Date().toISOString(),
|
|
109
|
-
};
|
|
110
|
-
try {
|
|
111
|
-
fs.writeFileSync(manifestPath, JSON.stringify(payload, null, 2), "utf-8");
|
|
112
|
-
if (process.platform !== "win32") {
|
|
113
|
-
try {
|
|
114
|
-
fs.chmodSync(manifestPath, 0o600);
|
|
115
|
-
}
|
|
116
|
-
catch {
|
|
117
|
-
// best-effort; directory perms still protect
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
catch (err) {
|
|
122
|
-
logger.warn(`Failed to persist applied-signature manifest: ${err instanceof Error ? err.message : String(err)}`);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Forget the persisted signature. Used by tests; production code never
|
|
127
|
-
* needs to delete it explicitly because writes overwrite in place.
|
|
128
|
-
*/
|
|
129
|
-
export function __clearAppliedSignatureForTests() {
|
|
130
|
-
try {
|
|
131
|
-
fs.rmSync(getManifestPath(), { force: true });
|
|
132
|
-
}
|
|
133
|
-
catch {
|
|
134
|
-
// ignore
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
//# sourceMappingURL=applied-credential-signature.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applied-credential-signature.js","sourceRoot":"","sources":["../../src/agent/applied-credential-signature.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Factory for creating the correct Anthropic client (direct API vs Bedrock)
|
|
3
|
-
* and resolving provider-specific model IDs.
|
|
4
|
-
*/
|
|
5
|
-
import Anthropic from "@anthropic-ai/sdk";
|
|
6
|
-
import OpenAI, { AzureOpenAI } from "openai";
|
|
7
|
-
import { type Model, type Provider, type VisionClawConfig } from "../../config/types.js";
|
|
8
|
-
export declare const OPENAI_MODEL = "gpt-5.5";
|
|
9
|
-
export declare const AZURE_OPENAI_API_VERSION = "preview";
|
|
10
|
-
export declare function isOpenAIProvider(provider: Provider): provider is "openai" | "azure-openai";
|
|
11
|
-
/**
|
|
12
|
-
* True for any GPT-family model (e.g. "gpt-5.5", future "gpt-6", "gpt-5.5-mini").
|
|
13
|
-
* Routing to the OpenAI Agents SDK only depends on the family, not the exact
|
|
14
|
-
* version, so we match by prefix instead of pinning to a single literal.
|
|
15
|
-
*/
|
|
16
|
-
export declare function isGptModel(model: Model | undefined): boolean;
|
|
17
|
-
export declare function getProviderLabel(provider: Provider): string;
|
|
18
|
-
export declare function getRuntimeLabel(config: VisionClawConfig): string;
|
|
19
|
-
/**
|
|
20
|
-
* Create an Anthropic-compatible client based on the provider in the config.
|
|
21
|
-
*
|
|
22
|
-
* - `"anthropic"`: uses the direct API with `anthropicApiKey`.
|
|
23
|
-
* - `"bedrock"`: uses `AnthropicBedrock` with explicit AWS credentials when
|
|
24
|
-
* provided, otherwise falls back to the default AWS credential provider chain.
|
|
25
|
-
*/
|
|
26
|
-
export declare function createClient(config: VisionClawConfig): Anthropic;
|
|
27
|
-
export declare function hasProviderCredentials(provider: Provider, config: VisionClawConfig): boolean;
|
|
28
|
-
export declare function createOpenAIClient(config: VisionClawConfig): OpenAI | AzureOpenAI;
|
|
29
|
-
export declare function configureOpenAIProvider(config: VisionClawConfig): void;
|
|
30
|
-
/**
|
|
31
|
-
* Return the correct model identifier for direct SDK calls
|
|
32
|
-
* (fast-responder, tool-alarm-evaluator, etc.).
|
|
33
|
-
*
|
|
34
|
-
* Agent SDK `query()` calls do NOT need this - the SDK maps models
|
|
35
|
-
* internally when `CLAUDE_CODE_USE_BEDROCK=1` or `CLAUDE_CODE_USE_VERTEX=1` is set.
|
|
36
|
-
*/
|
|
37
|
-
export declare function getModelId(config: VisionClawConfig): string;
|
|
38
|
-
/**
|
|
39
|
-
* Return the Sonnet model identifier for lightweight side-calls
|
|
40
|
-
* (fast-responder, etc.) that don't need the full Opus model.
|
|
41
|
-
* For non-Claude providers, falls back to the main model.
|
|
42
|
-
*/
|
|
43
|
-
export declare function getFastResponderModelId(config: VisionClawConfig): string;
|
|
44
|
-
/**
|
|
45
|
-
* Build the `env` record for the Agent SDK `query()` options.
|
|
46
|
-
*
|
|
47
|
-
* - Anthropic: passes `ANTHROPIC_API_KEY`.
|
|
48
|
-
* - Bedrock: passes `CLAUDE_CODE_USE_BEDROCK`, `AWS_REGION`,
|
|
49
|
-
* `AWS_BEARER_TOKEN_BEDROCK` (for the Claude Code CLI), and IAM
|
|
50
|
-
* credentials when available.
|
|
51
|
-
* - Vertex: passes `CLAUDE_CODE_USE_VERTEX`, `CLOUD_ML_REGION`,
|
|
52
|
-
* and `GOOGLE_APPLICATION_CREDENTIALS` for service account auth.
|
|
53
|
-
*/
|
|
54
|
-
export declare function buildAgentEnv(config: VisionClawConfig): Record<string, string | undefined>;
|
|
55
|
-
/**
|
|
56
|
-
* Start the API logging proxy if running in dev mode with the Anthropic
|
|
57
|
-
* or 9Router provider. No-ops (and returns immediately) in production,
|
|
58
|
-
* for Bedrock (which bypasses ANTHROPIC_BASE_URL), or for OpenAI providers.
|
|
59
|
-
*
|
|
60
|
-
* Call once at startup, before the first `buildAgentEnv()` call.
|
|
61
|
-
*/
|
|
62
|
-
export declare function maybeStartApiProxy(config: VisionClawConfig): Promise<void>;
|
|
63
|
-
//# sourceMappingURL=client-factory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client-factory.d.ts","sourceRoot":"","sources":["../../../src/agent/engines/client-factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAG1C,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE7C,OAAO,EAEL,KAAK,KAAK,EACV,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACtB,MAAM,uBAAuB,CAAC;AAqB/B,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAElD,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,QAAQ,GACjB,QAAQ,IAAI,QAAQ,GAAG,cAAc,CAEvC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,OAAO,CAE5D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAe3D;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAWhE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,SAAS,CA4ChE;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAkB5F;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,GAAG,WAAW,CA2BjF;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAkBtE;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAuB3D;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAOxE;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAsI1F;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBhF"}
|