@paperclipai/shared 2026.1012.0-canary.9 → 2026.1012.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.paperclip-build-complete +1 -1
- package/dist/agent-appearance.d.ts +1 -6
- package/dist/agent-appearance.d.ts.map +1 -1
- package/dist/agent-appearance.js +2 -8
- package/dist/agent-appearance.js.map +1 -1
- package/dist/agent-appearance.test.js +0 -11
- package/dist/agent-appearance.test.js.map +1 -1
- package/dist/ai-connection-router.d.ts +20 -29
- package/dist/ai-connection-router.d.ts.map +1 -1
- package/dist/ai-connections.d.ts +5 -67
- package/dist/ai-connections.d.ts.map +1 -1
- package/dist/ai-connections.js +17 -25
- package/dist/ai-connections.js.map +1 -1
- package/dist/app-definitions/airtable.json +0 -39
- package/dist/app-definitions/anthropic.json +0 -3
- package/dist/app-definitions/bitly.json +12 -17
- package/dist/app-definitions/context7.json +5 -13
- package/dist/app-definitions/github-code-review-bot.json +1 -1
- package/dist/app-definitions/hugging-face.json +0 -22
- package/dist/app-definitions/linear.json +2 -45
- package/dist/app-definitions/make.json +1 -53
- package/dist/app-definitions/openai.json +0 -3
- package/dist/app-definitions/openrouter.json +0 -3
- package/dist/app-definitions/resend.json +3 -3
- package/dist/app-definitions/sentry.json +1 -1
- package/dist/app-definitions/xai.json +0 -3
- package/dist/app-definitions-url.test.js +1 -11
- package/dist/app-definitions-url.test.js.map +1 -1
- package/dist/app-definitions.d.ts.map +1 -1
- package/dist/app-definitions.generated.d.ts.map +1 -1
- package/dist/app-definitions.generated.js +61 -81
- package/dist/app-definitions.generated.js.map +1 -1
- package/dist/app-definitions.js +11 -20
- package/dist/app-definitions.js.map +1 -1
- package/dist/app-definitions.test.js +14 -261
- package/dist/app-definitions.test.js.map +1 -1
- package/dist/connection-instructions.test.js +0 -1
- package/dist/connection-instructions.test.js.map +1 -1
- package/dist/connection-routing.d.ts +1 -3
- package/dist/connection-routing.d.ts.map +1 -1
- package/dist/connection-routing.js +0 -13
- package/dist/connection-routing.js.map +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -2
- package/dist/constants.js.map +1 -1
- package/dist/feature-catalog.d.ts.map +1 -1
- package/dist/feature-catalog.js +1 -22
- package/dist/feature-catalog.js.map +1 -1
- package/dist/index.d.ts +2 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -16
- package/dist/index.js.map +1 -1
- package/dist/mcp-setup.js +2 -2
- package/dist/mcp-setup.js.map +1 -1
- package/dist/public-mcp.d.ts +1 -25
- package/dist/public-mcp.d.ts.map +1 -1
- package/dist/public-mcp.js +1 -4
- package/dist/public-mcp.js.map +1 -1
- package/dist/self-serve-mcp-research.json +4 -18
- package/dist/slack-tools.js +2 -2
- package/dist/slack-tools.js.map +1 -1
- package/dist/types/agent.d.ts +0 -11
- package/dist/types/agent.d.ts.map +1 -1
- package/dist/types/agent.js.map +1 -1
- package/dist/types/app-definition.d.ts +2 -6
- package/dist/types/app-definition.d.ts.map +1 -1
- package/dist/types/budget.d.ts +1 -10
- package/dist/types/budget.d.ts.map +1 -1
- package/dist/types/chat-channels.d.ts +2 -31
- package/dist/types/chat-channels.d.ts.map +1 -1
- package/dist/types/chat-channels.js +0 -1
- package/dist/types/chat-channels.js.map +1 -1
- package/dist/types/chat-github.d.ts +1 -26
- package/dist/types/chat-github.d.ts.map +1 -1
- package/dist/types/chat-github.js +0 -2
- package/dist/types/chat-github.js.map +1 -1
- package/dist/types/company-skill.d.ts +0 -2
- package/dist/types/company-skill.d.ts.map +1 -1
- package/dist/types/connection-intent.d.ts +1 -3
- package/dist/types/connection-intent.d.ts.map +1 -1
- package/dist/types/cost.d.ts +3 -81
- package/dist/types/cost.d.ts.map +1 -1
- package/dist/types/execution-projection.d.ts +0 -2
- package/dist/types/execution-projection.d.ts.map +1 -1
- package/dist/types/execution-projection.js.map +1 -1
- package/dist/types/finance.d.ts +0 -35
- package/dist/types/finance.d.ts.map +1 -1
- package/dist/types/heartbeat.d.ts +0 -6
- package/dist/types/heartbeat.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -5
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +0 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/instance.d.ts +0 -6
- package/dist/types/instance.d.ts.map +1 -1
- package/dist/types/instance.js.map +1 -1
- package/dist/types/issue.d.ts +2 -72
- package/dist/types/issue.d.ts.map +1 -1
- package/dist/types/plugin.d.ts +0 -2
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/types/project.d.ts +0 -20
- package/dist/types/project.d.ts.map +1 -1
- package/dist/types/quota.d.ts +0 -4
- package/dist/types/quota.d.ts.map +1 -1
- package/dist/types/skill-source.d.ts +0 -15
- package/dist/types/skill-source.d.ts.map +1 -1
- package/dist/types/tool-access.d.ts +1 -16
- package/dist/types/tool-access.d.ts.map +1 -1
- package/dist/types/tool-access.js.map +1 -1
- package/dist/types/user-profile.d.ts +1 -1
- package/dist/types/user-profile.d.ts.map +1 -1
- package/dist/validators/adapter-auth-session.d.ts +2 -0
- package/dist/validators/adapter-auth-session.d.ts.map +1 -1
- package/dist/validators/agent.d.ts +5 -19
- package/dist/validators/agent.d.ts.map +1 -1
- package/dist/validators/agent.js +3 -3
- package/dist/validators/agent.js.map +1 -1
- package/dist/validators/app-definition.d.ts +0 -92
- package/dist/validators/app-definition.d.ts.map +1 -1
- package/dist/validators/app-definition.js +6 -9
- package/dist/validators/app-definition.js.map +1 -1
- package/dist/validators/budget.d.ts +5 -10
- package/dist/validators/budget.d.ts.map +1 -1
- package/dist/validators/budget.js +6 -9
- package/dist/validators/budget.js.map +1 -1
- package/dist/validators/chat-channels.d.ts +5 -26
- package/dist/validators/chat-channels.d.ts.map +1 -1
- package/dist/validators/chat-channels.js +6 -20
- package/dist/validators/chat-channels.js.map +1 -1
- package/dist/validators/chat-github.d.ts +6 -16
- package/dist/validators/chat-github.d.ts.map +1 -1
- package/dist/validators/chat-github.js +1 -4
- package/dist/validators/chat-github.js.map +1 -1
- package/dist/validators/claude-setup-token-session.d.ts +2 -0
- package/dist/validators/claude-setup-token-session.d.ts.map +1 -1
- package/dist/validators/company-portability.d.ts +0 -2
- package/dist/validators/company-portability.d.ts.map +1 -1
- package/dist/validators/company-skill.js +1 -1
- package/dist/validators/company-skill.js.map +1 -1
- package/dist/validators/cost.d.ts +6 -176
- package/dist/validators/cost.d.ts.map +1 -1
- package/dist/validators/cost.js +6 -17
- package/dist/validators/cost.js.map +1 -1
- package/dist/validators/finance.d.ts +4 -7
- package/dist/validators/finance.d.ts.map +1 -1
- package/dist/validators/finance.js +2 -4
- package/dist/validators/finance.js.map +1 -1
- package/dist/validators/index.d.ts +3 -4
- package/dist/validators/index.d.ts.map +1 -1
- package/dist/validators/index.js +3 -4
- package/dist/validators/index.js.map +1 -1
- package/dist/validators/instance.d.ts +0 -10
- package/dist/validators/instance.d.ts.map +1 -1
- package/dist/validators/instance.js +1 -6
- package/dist/validators/instance.js.map +1 -1
- package/dist/validators/instance.test.js +0 -4
- package/dist/validators/instance.test.js.map +1 -1
- package/dist/validators/issue.d.ts +3 -38
- package/dist/validators/issue.d.ts.map +1 -1
- package/dist/validators/issue.js +3 -22
- package/dist/validators/issue.js.map +1 -1
- package/dist/validators/issue.test.js +1 -60
- package/dist/validators/issue.test.js.map +1 -1
- package/dist/validators/plugin.d.ts +0 -2
- package/dist/validators/plugin.d.ts.map +1 -1
- package/dist/validators/plugin.js +0 -4
- package/dist/validators/plugin.js.map +1 -1
- package/dist/validators/plugin.test.js +0 -5
- package/dist/validators/plugin.test.js.map +1 -1
- package/dist/validators/project.d.ts +0 -16
- package/dist/validators/project.d.ts.map +1 -1
- package/dist/validators/project.js +0 -5
- package/dist/validators/project.js.map +1 -1
- package/dist/validators/skill-source.d.ts +0 -16
- package/dist/validators/skill-source.d.ts.map +1 -1
- package/dist/validators/skill-source.js +0 -2
- package/dist/validators/skill-source.js.map +1 -1
- package/dist/validators/status-card.js +2 -2
- package/dist/validators/status-card.js.map +1 -1
- package/dist/validators/text.d.ts.map +1 -1
- package/dist/validators/text.js +0 -5
- package/dist/validators/text.js.map +1 -1
- package/dist/validators/tool-access.d.ts +0 -9
- package/dist/validators/tool-access.d.ts.map +1 -1
- package/dist/validators/tool-access.js +1 -4
- package/dist/validators/tool-access.js.map +1 -1
- package/package.json +1 -1
- package/dist/accounting.d.ts +0 -178
- package/dist/accounting.d.ts.map +0 -1
- package/dist/accounting.js +0 -68
- package/dist/accounting.js.map +0 -1
- package/dist/agent-avatar-upload.d.ts +0 -8
- package/dist/agent-avatar-upload.d.ts.map +0 -1
- package/dist/agent-avatar-upload.js +0 -9
- package/dist/agent-avatar-upload.js.map +0 -1
- package/dist/agent-commentary.test.d.ts +0 -2
- package/dist/agent-commentary.test.d.ts.map +0 -1
- package/dist/agent-commentary.test.js +0 -18
- package/dist/agent-commentary.test.js.map +0 -1
- package/dist/ai-provider-routing.d.ts +0 -42
- package/dist/ai-provider-routing.d.ts.map +0 -1
- package/dist/ai-provider-routing.js +0 -125
- package/dist/ai-provider-routing.js.map +0 -1
- package/dist/app-definitions/bedrock.json +0 -53
- package/dist/app-definitions/calendly.json +0 -46
- package/dist/app-definitions/chat-completions-api.json +0 -53
- package/dist/app-definitions/clickup.json +0 -53
- package/dist/app-definitions/enterpret.json +0 -92
- package/dist/app-definitions/exa.json +0 -34
- package/dist/app-definitions/firecrawl.json +0 -93
- package/dist/app-definitions/gauge.json +0 -94
- package/dist/app-definitions/google.json +0 -55
- package/dist/app-definitions/gsc-wizard.json +0 -78
- package/dist/app-definitions/klaviyo.json +0 -59
- package/dist/app-definitions/local.json +0 -53
- package/dist/app-definitions/messages-api.json +0 -53
- package/dist/app-definitions/monday.json +0 -46
- package/dist/app-definitions/parallel-search.json +0 -35
- package/dist/app-definitions/responses-api.json +0 -53
- package/dist/app-definitions/superagent.json +0 -57
- package/dist/app-definitions/tavily.json +0 -47
- package/dist/app-definitions/telem.json +0 -144
- package/dist/app-definitions/windsor-ai.json +0 -80
- package/dist/customer-success.d.ts +0 -58
- package/dist/customer-success.d.ts.map +0 -1
- package/dist/customer-success.js +0 -160
- package/dist/customer-success.js.map +0 -1
- package/dist/decision-models.d.ts +0 -134
- package/dist/decision-models.d.ts.map +0 -1
- package/dist/decision-models.js +0 -43
- package/dist/decision-models.js.map +0 -1
- package/dist/dot-invitations.d.ts +0 -34
- package/dist/dot-invitations.d.ts.map +0 -1
- package/dist/dot-invitations.js +0 -2
- package/dist/dot-invitations.js.map +0 -1
- package/dist/easy-mcp-connectors.test.d.ts +0 -2
- package/dist/easy-mcp-connectors.test.d.ts.map +0 -1
- package/dist/easy-mcp-connectors.test.js +0 -63
- package/dist/easy-mcp-connectors.test.js.map +0 -1
- package/dist/external-agent-guidance.d.ts +0 -5
- package/dist/external-agent-guidance.d.ts.map +0 -1
- package/dist/external-agent-guidance.js +0 -5
- package/dist/external-agent-guidance.js.map +0 -1
- package/dist/fast-response.d.ts +0 -54
- package/dist/fast-response.d.ts.map +0 -1
- package/dist/fast-response.js +0 -28
- package/dist/fast-response.js.map +0 -1
- package/dist/money.d.ts +0 -20
- package/dist/money.d.ts.map +0 -1
- package/dist/money.js +0 -58
- package/dist/money.js.map +0 -1
- package/dist/primary-agent.d.ts +0 -12
- package/dist/primary-agent.d.ts.map +0 -1
- package/dist/primary-agent.js +0 -5
- package/dist/primary-agent.js.map +0 -1
- package/dist/slack-app-manifest.d.ts +0 -128
- package/dist/slack-app-manifest.d.ts.map +0 -1
- package/dist/slack-app-manifest.js +0 -88
- package/dist/slack-app-manifest.js.map +0 -1
- package/dist/slack-app-manifest.test.d.ts +0 -2
- package/dist/slack-app-manifest.test.d.ts.map +0 -1
- package/dist/slack-app-manifest.test.js +0 -50
- package/dist/slack-app-manifest.test.js.map +0 -1
- package/dist/subscriptions.d.ts +0 -104
- package/dist/subscriptions.d.ts.map +0 -1
- package/dist/subscriptions.js +0 -40
- package/dist/subscriptions.js.map +0 -1
- package/dist/types/agent-lifecycle.d.ts +0 -27
- package/dist/types/agent-lifecycle.d.ts.map +0 -1
- package/dist/types/agent-lifecycle.js +0 -6
- package/dist/types/agent-lifecycle.js.map +0 -1
- package/dist/types/github-app-setup.d.ts +0 -55
- package/dist/types/github-app-setup.d.ts.map +0 -1
- package/dist/types/github-app-setup.js +0 -2
- package/dist/types/github-app-setup.js.map +0 -1
- package/dist/types/voice-sessions.d.ts +0 -103
- package/dist/types/voice-sessions.d.ts.map +0 -1
- package/dist/types/voice-sessions.js +0 -5
- package/dist/types/voice-sessions.js.map +0 -1
- package/dist/validators/agent-commentary.d.ts +0 -25
- package/dist/validators/agent-commentary.d.ts.map +0 -1
- package/dist/validators/agent-commentary.js +0 -12
- package/dist/validators/agent-commentary.js.map +0 -1
- package/dist/validators/agent.test.d.ts +0 -2
- package/dist/validators/agent.test.d.ts.map +0 -1
- package/dist/validators/agent.test.js +0 -27
- package/dist/validators/agent.test.js.map +0 -1
- package/dist/validators/voice-sessions.d.ts +0 -27
- package/dist/validators/voice-sessions.d.ts.map +0 -1
- package/dist/validators/voice-sessions.js +0 -16
- package/dist/validators/voice-sessions.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"sources":"
|
|
1
|
+
{"sources":"dc3d902034d6dde67f86faffdb2a6b59fd41f1ddc0f0acd842d64016b2103cab","outputs":"37403f3ca6beb29e075a206c38742e479bc5997c14832b4920d0e00afb5310f6"}
|
|
@@ -4,9 +4,6 @@ export type AgentPaletteId = typeof AGENT_PALETTE_IDS[number];
|
|
|
4
4
|
export type CharacterPaletteId = AgentPaletteId | "muted-dream";
|
|
5
5
|
export declare const AGENT_AVATAR_SIZES: readonly [16, 20, 24, 32, 40, 48, 64, 96, 128, 256, 512];
|
|
6
6
|
export type AgentAvatarSize = typeof AGENT_AVATAR_SIZES[number];
|
|
7
|
-
export type AgentAvatarBackground = "transparent" | "paperclip-dark";
|
|
8
|
-
/** sRGB PNG equivalent of index.css .dark --background: oklch(0.205 0 0). */
|
|
9
|
-
export declare const PAPERCLIP_DARK_AVATAR_BACKGROUND = "#171717";
|
|
10
7
|
export declare const CHARACTER_STATES: readonly ["rest", "idle", "listening", "thinking", "working", "success", "confused", "sleepy", "loading"];
|
|
11
8
|
export type CharacterState = typeof CHARACTER_STATES[number];
|
|
12
9
|
export declare const agentAppearanceSchema: z.ZodObject<{
|
|
@@ -31,7 +28,6 @@ export declare const agentAppearanceSchema: z.ZodObject<{
|
|
|
31
28
|
"ultraviolet-tide": "ultraviolet-tide";
|
|
32
29
|
"violet-ember": "violet-ember";
|
|
33
30
|
}>;
|
|
34
|
-
customAvatarAssetId: z.ZodOptional<z.ZodUUID>;
|
|
35
31
|
}, z.core.$strict>;
|
|
36
32
|
export type AgentAppearance = z.infer<typeof agentAppearanceSchema>;
|
|
37
33
|
export declare function appearanceForPalette(paletteId: AgentPaletteId): AgentAppearance;
|
|
@@ -40,7 +36,7 @@ export declare function randomAgentAppearance(): AgentAppearance;
|
|
|
40
36
|
/** Must match the migration: rolling base-31 hash, modulo 17 at every step. */
|
|
41
37
|
export declare function legacyAgentAppearance(id: string): AgentAppearance;
|
|
42
38
|
export declare function resolveAgentAppearance(appearance: unknown, id?: string): AgentAppearance;
|
|
43
|
-
export declare function agentAvatarUrl(appearance: AgentAppearance, size?: AgentAvatarSize, scale?: 1 | 2, pose?: CharacterState, muted?: boolean
|
|
39
|
+
export declare function agentAvatarUrl(appearance: AgentAppearance, size?: AgentAvatarSize, scale?: 1 | 2, pose?: CharacterState, muted?: boolean): string;
|
|
44
40
|
export declare function characterStateForAgent(status: string): CharacterState;
|
|
45
41
|
/** Hydrate compact agent projections without an additional per-agent request. */
|
|
46
42
|
export declare function withAgentAppearance<T extends {
|
|
@@ -51,7 +47,6 @@ export declare function withAgentAppearance<T extends {
|
|
|
51
47
|
schemaVersion: 1;
|
|
52
48
|
characterVersion: "cap-v1";
|
|
53
49
|
paletteId: "arctic-blue" | "bubblegum-sky" | "cherry-pop" | "coral-current" | "coral-mint" | "deep-tide" | "electric-grove" | "flamingo-jade" | "golden-hour" | "lime-lagoon" | "orchid-peach" | "pink-lemonade" | "solar-flare" | "tangerine-cobalt" | "turquoise-cherry" | "ultraviolet-tide" | "violet-ember";
|
|
54
|
-
customAvatarAssetId?: string | undefined;
|
|
55
50
|
};
|
|
56
51
|
avatarUrl: string;
|
|
57
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-appearance.d.ts","sourceRoot":"","sources":["../src/agent-appearance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB,YAAI,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,CAAU,CAAC;AAClU,MAAM,MAAM,cAAc,GAAG,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAC9D,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG,aAAa,CAAC;AAChE,eAAO,MAAM,kBAAkB,YAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU,CAAC;AAC3F,MAAM,MAAM,eAAe,GAAG,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAChE,
|
|
1
|
+
{"version":3,"file":"agent-appearance.d.ts","sourceRoot":"","sources":["../src/agent-appearance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB,YAAI,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,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AE,IAAI,GAAE,eAAqB,EAAE,KAAK,GAAE,CAAC,GAAG,CAAK,EAAE,IAAI,GAAE,cAAuB,EAAE,KAAK,UAAQ,GAAG,MAAM,CAE/J;AACD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAKrE;AAED,iFAAiF;AACjF,wBAAgB,mBAAmB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;CAAE,EAAE,KAAK,EAAE,CAAC;;;;;;;EAG1G"}
|
package/dist/agent-appearance.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export const AGENT_PALETTE_IDS = ["bubblegum-sky", "pink-lemonade", "orchid-peach", "coral-mint", "lime-lagoon", "arctic-blue", "solar-flare", "violet-ember", "deep-tide", "coral-current", "golden-hour", "tangerine-cobalt", "electric-grove", "flamingo-jade", "cherry-pop", "turquoise-cherry", "ultraviolet-tide"];
|
|
3
3
|
export const AGENT_AVATAR_SIZES = [16, 20, 24, 32, 40, 48, 64, 96, 128, 256, 512];
|
|
4
|
-
/** sRGB PNG equivalent of index.css .dark --background: oklch(0.205 0 0). */
|
|
5
|
-
export const PAPERCLIP_DARK_AVATAR_BACKGROUND = "#171717";
|
|
6
4
|
export const CHARACTER_STATES = ["rest", "idle", "listening", "thinking", "working", "success", "confused", "sleepy", "loading"];
|
|
7
5
|
export const agentAppearanceSchema = z.object({
|
|
8
6
|
schemaVersion: z.literal(1),
|
|
9
7
|
characterVersion: z.literal("cap-v1"),
|
|
10
8
|
paletteId: z.enum(AGENT_PALETTE_IDS),
|
|
11
|
-
/** Company-scoped normalized image, set through the avatar upload service. */
|
|
12
|
-
customAvatarAssetId: z.uuid().optional(),
|
|
13
9
|
}).strict();
|
|
14
10
|
export function appearanceForPalette(paletteId) {
|
|
15
11
|
return { schemaVersion: 1, characterVersion: "cap-v1", paletteId };
|
|
@@ -35,10 +31,8 @@ export function resolveAgentAppearance(appearance, id = "agent") {
|
|
|
35
31
|
const parsed = agentAppearanceSchema.safeParse(appearance);
|
|
36
32
|
return parsed.success ? parsed.data : legacyAgentAppearance(id);
|
|
37
33
|
}
|
|
38
|
-
export function agentAvatarUrl(appearance, size = 512, scale = 1, pose = "rest", muted = false
|
|
39
|
-
|
|
40
|
-
return `/api/assets/${appearance.customAvatarAssetId}/content`;
|
|
41
|
-
return `/api/agent-avatars/${appearance.characterVersion}/${muted ? "muted-dream" : appearance.paletteId}/${pose}.png?size=${size}&scale=${scale}${background === "paperclip-dark" ? "&background=paperclip-dark" : ""}`;
|
|
34
|
+
export function agentAvatarUrl(appearance, size = 512, scale = 1, pose = "rest", muted = false) {
|
|
35
|
+
return `/api/agent-avatars/${appearance.characterVersion}/${muted ? "muted-dream" : appearance.paletteId}/${pose}.png?size=${size}&scale=${scale}`;
|
|
42
36
|
}
|
|
43
37
|
export function characterStateForAgent(status) {
|
|
44
38
|
if (status === "running")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-appearance.js","sourceRoot":"","sources":["../src/agent-appearance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,CAAU,CAAC;AAGlU,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU,CAAC;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AAC,UAAU,CAAC,SAAS,IAAI,IAAI,aAAa,IAAI,UAAU,KAAK,EAAE,CAAC;AACrJ,CAAC;AACD,MAAM,UAAU,sBAAsB,CAAC,MAAc;IACnD,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC3C,IAAI,MAAM,KAAK,OAAO;QAAE,OAAO,UAAU,CAAC;IAC1C,IAAI,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,YAAY,IAAI,MAAM,KAAK,kBAAkB;QAAE,OAAO,MAAM,CAAC;IACnG,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,mBAAmB,CAAgE,KAAQ;IACzG,MAAM,UAAU,GAAG,sBAAsB,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;IACtE,OAAO,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC,EAAE,CAAC;AACzE,CAAC"}
|
|
@@ -14,12 +14,6 @@ describe("agent appearance", () => {
|
|
|
14
14
|
expect(legacyAgentAppearance("agent-1")).toEqual(legacyAgentAppearance("agent-1"));
|
|
15
15
|
expect(agentAvatarUrl(appearance, 24, 2)).toBe("/api/agent-avatars/cap-v1/deep-tide/rest.png?size=24&scale=2");
|
|
16
16
|
});
|
|
17
|
-
it("uses a private asset URL for custom avatars while retaining the fallback palette", () => {
|
|
18
|
-
const appearance = { ...appearanceForPalette("deep-tide"), customAvatarAssetId: "22222222-2222-4222-8222-222222222222" };
|
|
19
|
-
expect(resolveAgentAppearance(appearance)).toEqual(appearance);
|
|
20
|
-
expect(agentAvatarUrl(appearance, 128, 2)).toBe("/api/assets/22222222-2222-4222-8222-222222222222/content");
|
|
21
|
-
expect(agentAppearanceSchema.safeParse({ ...appearance, customAvatarAssetId: "https://example.test/image" }).success).toBe(false);
|
|
22
|
-
});
|
|
23
17
|
it("renders without a browser and preserves logical-size detail at high density", () => {
|
|
24
18
|
const appearance = appearanceForPalette("bubblegum-sky");
|
|
25
19
|
// ClipLab v0.2.0 draws an enlarged compact face from 16px; only 12px and
|
|
@@ -34,10 +28,5 @@ describe("agent appearance", () => {
|
|
|
34
28
|
expect(renderAgentSvg(appearance, 48, 1)).toContain('id="agent-candle-light"');
|
|
35
29
|
expect(renderAgentSvg(appearance, 24, 2)).toBe(eyes);
|
|
36
30
|
});
|
|
37
|
-
it("uses a separate URL for opaque Slack exports without changing ordinary portraits", () => {
|
|
38
|
-
const appearance = appearanceForPalette("cherry-pop");
|
|
39
|
-
expect(agentAvatarUrl(appearance, 512, 1, "rest", false, "paperclip-dark")).toBe("/api/agent-avatars/cap-v1/cherry-pop/rest.png?size=512&scale=1&background=paperclip-dark");
|
|
40
|
-
expect(agentAvatarUrl(appearance)).not.toContain("background=");
|
|
41
|
-
});
|
|
42
31
|
});
|
|
43
32
|
//# sourceMappingURL=agent-appearance.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-appearance.test.js","sourceRoot":"","sources":["../src/agent-appearance.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC7L,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;YAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,qBAAqB,EAAE,CAAC,SAAS,CAAC,CAAC;QACrG,MAAM,CAA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AC,SAAS,CAAC,yBAAyB,CAAC,CAAC;QACnD,MAAM,IAAI,GAAG,cAAc,CAAC,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QACrC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;QAClD,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;QACtD,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;QAC/E,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -8,7 +8,6 @@ export declare const aiConnectionRouterBindingSchema: z.ZodObject<{
|
|
|
8
8
|
export declare const aiRuntimeConnectionBindingSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
9
|
provider: z.ZodEnum<{
|
|
10
10
|
anthropic: "anthropic";
|
|
11
|
-
google: "google";
|
|
12
11
|
openai: "openai";
|
|
13
12
|
openrouter: "openrouter";
|
|
14
13
|
xai: "xai";
|
|
@@ -21,7 +20,6 @@ export declare const aiRuntimeConnectionBindingSchema: z.ZodUnion<readonly [z.Zo
|
|
|
21
20
|
}, z.core.$strict>, z.ZodObject<{
|
|
22
21
|
provider: z.ZodEnum<{
|
|
23
22
|
anthropic: "anthropic";
|
|
24
|
-
google: "google";
|
|
25
23
|
openai: "openai";
|
|
26
24
|
openrouter: "openrouter";
|
|
27
25
|
xai: "xai";
|
|
@@ -36,7 +34,6 @@ export declare const aiRuntimeConnectionBindingSchema: z.ZodUnion<readonly [z.Zo
|
|
|
36
34
|
}, z.core.$strict>, z.ZodObject<{
|
|
37
35
|
provider: z.ZodEnum<{
|
|
38
36
|
anthropic: "anthropic";
|
|
39
|
-
google: "google";
|
|
40
37
|
openai: "openai";
|
|
41
38
|
openrouter: "openrouter";
|
|
42
39
|
xai: "xai";
|
|
@@ -58,7 +55,6 @@ export declare const aiConnectionPoolMemberSchema: z.ZodObject<{
|
|
|
58
55
|
binding: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
59
56
|
provider: z.ZodEnum<{
|
|
60
57
|
anthropic: "anthropic";
|
|
61
|
-
google: "google";
|
|
62
58
|
openai: "openai";
|
|
63
59
|
openrouter: "openrouter";
|
|
64
60
|
xai: "xai";
|
|
@@ -71,7 +67,6 @@ export declare const aiConnectionPoolMemberSchema: z.ZodObject<{
|
|
|
71
67
|
}, z.core.$strict>, z.ZodObject<{
|
|
72
68
|
provider: z.ZodEnum<{
|
|
73
69
|
anthropic: "anthropic";
|
|
74
|
-
google: "google";
|
|
75
70
|
openai: "openai";
|
|
76
71
|
openrouter: "openrouter";
|
|
77
72
|
xai: "xai";
|
|
@@ -86,7 +81,6 @@ export declare const aiConnectionPoolMemberSchema: z.ZodObject<{
|
|
|
86
81
|
}, z.core.$strict>, z.ZodObject<{
|
|
87
82
|
provider: z.ZodEnum<{
|
|
88
83
|
anthropic: "anthropic";
|
|
89
|
-
google: "google";
|
|
90
84
|
openai: "openai";
|
|
91
85
|
openrouter: "openrouter";
|
|
92
86
|
xai: "xai";
|
|
@@ -99,57 +93,57 @@ export declare const aiConnectionPoolMemberSchema: z.ZodObject<{
|
|
|
99
93
|
connectionId: z.ZodString;
|
|
100
94
|
grantId: z.ZodString;
|
|
101
95
|
}, z.core.$strict>], "mode"> & z.ZodType<{
|
|
102
|
-
provider: "anthropic" | "
|
|
96
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
103
97
|
method: "api_key" | "subscription";
|
|
104
98
|
mode: "shared";
|
|
105
99
|
connectionId: string;
|
|
106
100
|
grantId: string;
|
|
107
101
|
} | {
|
|
108
|
-
provider: "anthropic" | "
|
|
102
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
109
103
|
method: "api_key" | "subscription";
|
|
110
104
|
mode: "delegated";
|
|
111
105
|
connectionId: string;
|
|
112
106
|
grantId: string;
|
|
113
107
|
}, {
|
|
114
|
-
provider: "anthropic" | "
|
|
108
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
115
109
|
method: "api_key" | "subscription";
|
|
116
110
|
mode: "responsible_user";
|
|
117
111
|
} | {
|
|
118
|
-
provider: "anthropic" | "
|
|
112
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
119
113
|
method: "api_key" | "subscription";
|
|
120
114
|
mode: "shared";
|
|
121
115
|
connectionId: string;
|
|
122
116
|
grantId: string;
|
|
123
117
|
} | {
|
|
124
|
-
provider: "anthropic" | "
|
|
118
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
125
119
|
method: "api_key" | "subscription";
|
|
126
120
|
mode: "delegated";
|
|
127
121
|
connectionId: string;
|
|
128
122
|
grantId: string;
|
|
129
123
|
}, z.core.$ZodTypeInternals<{
|
|
130
|
-
provider: "anthropic" | "
|
|
124
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
131
125
|
method: "api_key" | "subscription";
|
|
132
126
|
mode: "shared";
|
|
133
127
|
connectionId: string;
|
|
134
128
|
grantId: string;
|
|
135
129
|
} | {
|
|
136
|
-
provider: "anthropic" | "
|
|
130
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
137
131
|
method: "api_key" | "subscription";
|
|
138
132
|
mode: "delegated";
|
|
139
133
|
connectionId: string;
|
|
140
134
|
grantId: string;
|
|
141
135
|
}, {
|
|
142
|
-
provider: "anthropic" | "
|
|
136
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
143
137
|
method: "api_key" | "subscription";
|
|
144
138
|
mode: "responsible_user";
|
|
145
139
|
} | {
|
|
146
|
-
provider: "anthropic" | "
|
|
140
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
147
141
|
method: "api_key" | "subscription";
|
|
148
142
|
mode: "shared";
|
|
149
143
|
connectionId: string;
|
|
150
144
|
grantId: string;
|
|
151
145
|
} | {
|
|
152
|
-
provider: "anthropic" | "
|
|
146
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
153
147
|
method: "api_key" | "subscription";
|
|
154
148
|
mode: "delegated";
|
|
155
149
|
connectionId: string;
|
|
@@ -182,7 +176,6 @@ export declare const aiConnectionPoolConfigSchema: z.ZodObject<{
|
|
|
182
176
|
binding: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
183
177
|
provider: z.ZodEnum<{
|
|
184
178
|
anthropic: "anthropic";
|
|
185
|
-
google: "google";
|
|
186
179
|
openai: "openai";
|
|
187
180
|
openrouter: "openrouter";
|
|
188
181
|
xai: "xai";
|
|
@@ -195,7 +188,6 @@ export declare const aiConnectionPoolConfigSchema: z.ZodObject<{
|
|
|
195
188
|
}, z.core.$strict>, z.ZodObject<{
|
|
196
189
|
provider: z.ZodEnum<{
|
|
197
190
|
anthropic: "anthropic";
|
|
198
|
-
google: "google";
|
|
199
191
|
openai: "openai";
|
|
200
192
|
openrouter: "openrouter";
|
|
201
193
|
xai: "xai";
|
|
@@ -210,7 +202,6 @@ export declare const aiConnectionPoolConfigSchema: z.ZodObject<{
|
|
|
210
202
|
}, z.core.$strict>, z.ZodObject<{
|
|
211
203
|
provider: z.ZodEnum<{
|
|
212
204
|
anthropic: "anthropic";
|
|
213
|
-
google: "google";
|
|
214
205
|
openai: "openai";
|
|
215
206
|
openrouter: "openrouter";
|
|
216
207
|
xai: "xai";
|
|
@@ -223,57 +214,57 @@ export declare const aiConnectionPoolConfigSchema: z.ZodObject<{
|
|
|
223
214
|
connectionId: z.ZodString;
|
|
224
215
|
grantId: z.ZodString;
|
|
225
216
|
}, z.core.$strict>], "mode"> & z.ZodType<{
|
|
226
|
-
provider: "anthropic" | "
|
|
217
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
227
218
|
method: "api_key" | "subscription";
|
|
228
219
|
mode: "shared";
|
|
229
220
|
connectionId: string;
|
|
230
221
|
grantId: string;
|
|
231
222
|
} | {
|
|
232
|
-
provider: "anthropic" | "
|
|
223
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
233
224
|
method: "api_key" | "subscription";
|
|
234
225
|
mode: "delegated";
|
|
235
226
|
connectionId: string;
|
|
236
227
|
grantId: string;
|
|
237
228
|
}, {
|
|
238
|
-
provider: "anthropic" | "
|
|
229
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
239
230
|
method: "api_key" | "subscription";
|
|
240
231
|
mode: "responsible_user";
|
|
241
232
|
} | {
|
|
242
|
-
provider: "anthropic" | "
|
|
233
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
243
234
|
method: "api_key" | "subscription";
|
|
244
235
|
mode: "shared";
|
|
245
236
|
connectionId: string;
|
|
246
237
|
grantId: string;
|
|
247
238
|
} | {
|
|
248
|
-
provider: "anthropic" | "
|
|
239
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
249
240
|
method: "api_key" | "subscription";
|
|
250
241
|
mode: "delegated";
|
|
251
242
|
connectionId: string;
|
|
252
243
|
grantId: string;
|
|
253
244
|
}, z.core.$ZodTypeInternals<{
|
|
254
|
-
provider: "anthropic" | "
|
|
245
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
255
246
|
method: "api_key" | "subscription";
|
|
256
247
|
mode: "shared";
|
|
257
248
|
connectionId: string;
|
|
258
249
|
grantId: string;
|
|
259
250
|
} | {
|
|
260
|
-
provider: "anthropic" | "
|
|
251
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
261
252
|
method: "api_key" | "subscription";
|
|
262
253
|
mode: "delegated";
|
|
263
254
|
connectionId: string;
|
|
264
255
|
grantId: string;
|
|
265
256
|
}, {
|
|
266
|
-
provider: "anthropic" | "
|
|
257
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
267
258
|
method: "api_key" | "subscription";
|
|
268
259
|
mode: "responsible_user";
|
|
269
260
|
} | {
|
|
270
|
-
provider: "anthropic" | "
|
|
261
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
271
262
|
method: "api_key" | "subscription";
|
|
272
263
|
mode: "shared";
|
|
273
264
|
connectionId: string;
|
|
274
265
|
grantId: string;
|
|
275
266
|
} | {
|
|
276
|
-
provider: "anthropic" | "
|
|
267
|
+
provider: "anthropic" | "openai" | "openrouter" | "xai";
|
|
277
268
|
method: "api_key" | "subscription";
|
|
278
269
|
mode: "delegated";
|
|
279
270
|
connectionId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-connection-router.d.ts","sourceRoot":"","sources":["../src/ai-connection-router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,+BAA+B;;;kBAGjC,CAAC;AACZ,eAAO,MAAM,gCAAgC
|
|
1
|
+
{"version":3,"file":"ai-connection-router.d.ts","sourceRoot":"","sources":["../src/ai-connection-router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,+BAA+B;;;kBAGjC,CAAC;AACZ,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAwE,CAAC;AACtH,MAAM,M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EAAE,aAAa,CAOtP;AAED,wBAAgB,2BAA2B,CAAC,UAAU,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAAE,GAAG,MAAM,GAAG,IAAI,CAGlH"}
|
package/dist/ai-connections.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type AiProviderRouting } from "./ai-provider-routing.js";
|
|
3
2
|
/** Runtime authentication is a separate transport, never a tool or channel. */
|
|
4
3
|
export declare const connectionPurposeTransportSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5
4
|
connectionPurpose: z.ZodLiteral<"tool">;
|
|
@@ -13,7 +12,6 @@ export declare const connectionPurposeTransportSchema: z.ZodDiscriminatedUnion<[
|
|
|
13
12
|
transport: z.ZodEnum<{
|
|
14
13
|
chat_sdk: "chat_sdk";
|
|
15
14
|
rest_api: "rest_api";
|
|
16
|
-
voice: "voice";
|
|
17
15
|
}>;
|
|
18
16
|
config: z.ZodOptional<z.ZodObject<{
|
|
19
17
|
provider: z.ZodOptional<z.ZodString>;
|
|
@@ -23,10 +21,9 @@ export declare const connectionPurposeTransportSchema: z.ZodDiscriminatedUnion<[
|
|
|
23
21
|
transport: z.ZodLiteral<"runtime_auth">;
|
|
24
22
|
}, z.core.$strip>], "connectionPurpose">;
|
|
25
23
|
export type ConnectionPurposeTransport = z.infer<typeof connectionPurposeTransportSchema>;
|
|
26
|
-
export declare const AI_PROVIDERS: readonly ["anthropic", "openai", "openrouter", "xai"
|
|
24
|
+
export declare const AI_PROVIDERS: readonly ["anthropic", "openai", "openrouter", "xai"];
|
|
27
25
|
export declare const aiProviderSchema: z.ZodEnum<{
|
|
28
26
|
anthropic: "anthropic";
|
|
29
|
-
google: "google";
|
|
30
27
|
openai: "openai";
|
|
31
28
|
openrouter: "openrouter";
|
|
32
29
|
xai: "xai";
|
|
@@ -40,7 +37,6 @@ export type AiAuthMethod = z.infer<typeof aiAuthMethodSchema>;
|
|
|
40
37
|
export declare const aiConnectionBindingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
41
38
|
provider: z.ZodEnum<{
|
|
42
39
|
anthropic: "anthropic";
|
|
43
|
-
google: "google";
|
|
44
40
|
openai: "openai";
|
|
45
41
|
openrouter: "openrouter";
|
|
46
42
|
xai: "xai";
|
|
@@ -53,7 +49,6 @@ export declare const aiConnectionBindingSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
53
49
|
}, z.core.$strict>, z.ZodObject<{
|
|
54
50
|
provider: z.ZodEnum<{
|
|
55
51
|
anthropic: "anthropic";
|
|
56
|
-
google: "google";
|
|
57
52
|
openai: "openai";
|
|
58
53
|
openrouter: "openrouter";
|
|
59
54
|
xai: "xai";
|
|
@@ -68,7 +63,6 @@ export declare const aiConnectionBindingSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
68
63
|
}, z.core.$strict>, z.ZodObject<{
|
|
69
64
|
provider: z.ZodEnum<{
|
|
70
65
|
anthropic: "anthropic";
|
|
71
|
-
google: "google";
|
|
72
66
|
openai: "openai";
|
|
73
67
|
openrouter: "openrouter";
|
|
74
68
|
xai: "xai";
|
|
@@ -85,7 +79,6 @@ export type AiConnectionBinding = z.infer<typeof aiConnectionBindingSchema>;
|
|
|
85
79
|
export declare const aiConnectionMetadataSchema: z.ZodObject<{
|
|
86
80
|
provider: z.ZodEnum<{
|
|
87
81
|
anthropic: "anthropic";
|
|
88
|
-
google: "google";
|
|
89
82
|
openai: "openai";
|
|
90
83
|
openrouter: "openrouter";
|
|
91
84
|
xai: "xai";
|
|
@@ -94,31 +87,6 @@ export declare const aiConnectionMetadataSchema: z.ZodObject<{
|
|
|
94
87
|
api_key: "api_key";
|
|
95
88
|
subscription: "subscription";
|
|
96
89
|
}>;
|
|
97
|
-
routing: z.ZodOptional<z.ZodObject<{
|
|
98
|
-
kind: z.ZodEnum<{
|
|
99
|
-
bedrock: "bedrock";
|
|
100
|
-
gateway: "gateway";
|
|
101
|
-
local: "local";
|
|
102
|
-
openrouter: "openrouter";
|
|
103
|
-
}>;
|
|
104
|
-
protocol: z.ZodEnum<{
|
|
105
|
-
bedrock: "bedrock";
|
|
106
|
-
chat: "chat";
|
|
107
|
-
messages: "messages";
|
|
108
|
-
responses: "responses";
|
|
109
|
-
}>;
|
|
110
|
-
baseUrl: z.ZodOptional<z.ZodString>;
|
|
111
|
-
auth: z.ZodDefault<z.ZodEnum<{
|
|
112
|
-
api_key: "api_key";
|
|
113
|
-
bearer: "bearer";
|
|
114
|
-
none: "none";
|
|
115
|
-
}>>;
|
|
116
|
-
region: z.ZodOptional<z.ZodString>;
|
|
117
|
-
models: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
118
|
-
id: z.ZodString;
|
|
119
|
-
label: z.ZodOptional<z.ZodString>;
|
|
120
|
-
}, z.core.$strict>>>;
|
|
121
|
-
}, z.core.$strict>>;
|
|
122
90
|
}, z.core.$strict>;
|
|
123
91
|
export type AiConnectionMetadata = z.infer<typeof aiConnectionMetadataSchema>;
|
|
124
92
|
/** Existing integrations only. This table describes compatibility, never routing. */
|
|
@@ -132,8 +100,6 @@ export declare const AI_CONNECTION_CAPABILITIES: Record<AiProvider, {
|
|
|
132
100
|
export declare function isAiConnectionCompatible(requirement: AiConnectionMetadata | AiConnectionBinding, adapterType: string, model?: unknown, runnerProvider?: unknown, acpxAgent?: unknown): boolean;
|
|
133
101
|
export type AiConnectionUnavailableReason = "responsible_user_missing" | "membership_missing" | "default_missing" | "connection_missing" | "connection_unavailable" | "incompatible" | "access_denied" | "credential_missing";
|
|
134
102
|
export interface AiConnectionAttribution {
|
|
135
|
-
/** Billing account at execution time; never resolved again from mutable settings. */
|
|
136
|
-
subscriptionId?: string;
|
|
137
103
|
connectionId: string;
|
|
138
104
|
grantId: string;
|
|
139
105
|
provider: AiProvider;
|
|
@@ -156,7 +122,6 @@ export interface AiManagedConnectionSummary {
|
|
|
156
122
|
provider: AiProvider;
|
|
157
123
|
method: AiAuthMethod;
|
|
158
124
|
name: string;
|
|
159
|
-
routing?: AiProviderRouting;
|
|
160
125
|
accountLabel?: string;
|
|
161
126
|
ownership: "personal" | "shared";
|
|
162
127
|
ownerUserId?: string;
|
|
@@ -175,7 +140,6 @@ export interface AiConnectionList {
|
|
|
175
140
|
export declare const createAiConnectionSchema: z.ZodObject<{
|
|
176
141
|
provider: z.ZodEnum<{
|
|
177
142
|
anthropic: "anthropic";
|
|
178
|
-
google: "google";
|
|
179
143
|
openai: "openai";
|
|
180
144
|
openrouter: "openrouter";
|
|
181
145
|
xai: "xai";
|
|
@@ -189,31 +153,6 @@ export declare const createAiConnectionSchema: z.ZodObject<{
|
|
|
189
153
|
personal: "personal";
|
|
190
154
|
shared: "shared";
|
|
191
155
|
}>;
|
|
192
|
-
routing: z.ZodOptional<z.ZodObject<{
|
|
193
|
-
kind: z.ZodEnum<{
|
|
194
|
-
bedrock: "bedrock";
|
|
195
|
-
gateway: "gateway";
|
|
196
|
-
local: "local";
|
|
197
|
-
openrouter: "openrouter";
|
|
198
|
-
}>;
|
|
199
|
-
protocol: z.ZodEnum<{
|
|
200
|
-
bedrock: "bedrock";
|
|
201
|
-
chat: "chat";
|
|
202
|
-
messages: "messages";
|
|
203
|
-
responses: "responses";
|
|
204
|
-
}>;
|
|
205
|
-
baseUrl: z.ZodOptional<z.ZodString>;
|
|
206
|
-
auth: z.ZodDefault<z.ZodEnum<{
|
|
207
|
-
api_key: "api_key";
|
|
208
|
-
bearer: "bearer";
|
|
209
|
-
none: "none";
|
|
210
|
-
}>>;
|
|
211
|
-
region: z.ZodOptional<z.ZodString>;
|
|
212
|
-
models: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
213
|
-
id: z.ZodString;
|
|
214
|
-
label: z.ZodOptional<z.ZodString>;
|
|
215
|
-
}, z.core.$strict>>>;
|
|
216
|
-
}, z.core.$strict>>;
|
|
217
156
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
218
157
|
loginSessionId: z.ZodOptional<z.ZodString>;
|
|
219
158
|
connectionId: z.ZodOptional<z.ZodString>;
|
|
@@ -225,6 +164,7 @@ export declare const aiConnectionLoginIntentSchema: z.ZodObject<{
|
|
|
225
164
|
provider: z.ZodEnum<{
|
|
226
165
|
anthropic: "anthropic";
|
|
227
166
|
openai: "openai";
|
|
167
|
+
openrouter: "openrouter";
|
|
228
168
|
xai: "xai";
|
|
229
169
|
}>;
|
|
230
170
|
method: z.ZodLiteral<"subscription">;
|
|
@@ -242,6 +182,7 @@ export declare const localAiConnectionSchema: z.ZodObject<{
|
|
|
242
182
|
provider: z.ZodEnum<{
|
|
243
183
|
anthropic: "anthropic";
|
|
244
184
|
openai: "openai";
|
|
185
|
+
openrouter: "openrouter";
|
|
245
186
|
xai: "xai";
|
|
246
187
|
}>;
|
|
247
188
|
method: z.ZodLiteral<"subscription">;
|
|
@@ -259,6 +200,7 @@ export declare const localAiLoginStartSchema: z.ZodObject<{
|
|
|
259
200
|
provider: z.ZodEnum<{
|
|
260
201
|
anthropic: "anthropic";
|
|
261
202
|
openai: "openai";
|
|
203
|
+
openrouter: "openrouter";
|
|
262
204
|
xai: "xai";
|
|
263
205
|
}>;
|
|
264
206
|
method: z.ZodLiteral<"subscription">;
|
|
@@ -274,14 +216,10 @@ export declare const localAiLoginStartSchema: z.ZodObject<{
|
|
|
274
216
|
}, z.core.$strict>;
|
|
275
217
|
export interface LocalAiLoginStatus {
|
|
276
218
|
status: "ready" | "sign_in_required" | "expired";
|
|
277
|
-
authorizationUrl?: string;
|
|
278
|
-
code?: string;
|
|
279
|
-
error?: string;
|
|
280
219
|
}
|
|
281
220
|
export interface LocalAiLoginAttempt {
|
|
282
221
|
sessionId: string;
|
|
283
|
-
|
|
284
|
-
command?: string;
|
|
222
|
+
command: string;
|
|
285
223
|
expiresAt: string;
|
|
286
224
|
}
|
|
287
225
|
/** Preview-era copies of rotating local credentials must be reconnected. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-connections.d.ts","sourceRoot":"","sources":["../src/ai-connections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"ai-connections.d.ts","sourceRoot":"","sources":["../src/ai-connections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+EAA+E;AAC/E,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;wCAoB5C,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AAEF,eAAO,MAAM,YAAY,YACvB,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,KAAK,CACG,CAAC;AACX,eAAO,MAAM,gBAAgB;;;;;EAAuB,CAAC;AACrD,eAAO,MAAM,kBAAkB;;;EAAsC,CAAC;AACtE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAyBpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,eAAO,MAAM,0BAA0B;;;;;;;;;;;kBAAiC,CAAC;AACzE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,qFAAqF;AACrF,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAC7C,UAAU,EACV;IACE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CACd,MAAM,CAAC,YAAY,EAAE;QAAE,QAAQ,E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