@cortexkit/anthropic-auth-core 2.2.1 → 2.2.3
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/claude-code.d.ts +2 -1
- package/dist/constants.d.ts +5 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1575 -913
- package/dist/internal-types/claustrum/consumer.d.ts +3 -1
- package/dist/internal-types/claustrum/enrollment.d.ts +5 -0
- package/dist/internal-types/claustrum/index.d.ts +1 -0
- package/dist/internal-types/claustrum/quota-writer.d.ts +18 -0
- package/dist/internal-types/claustrum/roster.d.ts +18 -2
- package/dist/internal-types/fs/private-files.d.ts +2 -0
- package/dist/internal-types/fs/with-lock.d.ts +1 -0
- package/dist/internal-types/quota/format.d.ts +19 -0
- package/dist/internal-types/quota/index.d.ts +3 -3
- package/dist/internal-types/quota/map.d.ts +24 -1
- package/dist/internal-types/quota/merge.d.ts +6 -1
- package/dist/internal-types/quota/projection.d.ts +3 -1
- package/dist/internal-types/setup/enroll.d.ts +34 -0
- package/dist/internal-types/setup/index.d.ts +1 -0
- package/dist/internal-types/setup/process-fence.d.ts +14 -0
- package/dist/internal-types/setup/types.d.ts +5 -0
- package/dist/mid-conversation-output-config.d.ts +19 -15
- package/dist/model-capabilities.d.ts +136 -0
- package/dist/models.d.ts +28 -59
- package/dist/native-enrollment-authority.d.ts +19 -0
- package/dist/native-ui.d.ts +10 -1
- package/dist/native-vault-runtime.d.ts +1 -1
- package/dist/turn-end-note.d.ts +4 -3
- package/package.json +2 -2
package/dist/models.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { normalizeAnthropicModelId } from './model-capabilities.ts';
|
|
2
|
+
export { normalizeAnthropicModelId };
|
|
1
3
|
export declare const CLAUDE_FABLE_5_MODEL_ID = "claude-fable-5";
|
|
2
4
|
export declare const CLAUDE_MYTHOS_5_MODEL_ID = "claude-mythos-5";
|
|
3
5
|
export declare const CLAUDE_FABLE_5_1_MODEL_ID = "claude-fable-5-1";
|
|
@@ -9,8 +11,6 @@ export declare const CLAUDE_MYTHOS_5_1_MODEL_ID = "claude-mythos-5-1";
|
|
|
9
11
|
* above so per-million-token cost estimation does not conflate families.
|
|
10
12
|
*/
|
|
11
13
|
export declare const CLAUDE_HAIKU_4_5_MODEL_ID = "claude-haiku-4-5";
|
|
12
|
-
/** Remove OpenCode's context-window qualifier before model-family checks. */
|
|
13
|
-
export declare function normalizeAnthropicModelId(model: string): string;
|
|
14
14
|
/**
|
|
15
15
|
* Per-million-token USD pricing for Haiku 4.5. Used to project the cumulative
|
|
16
16
|
* cost of prime requests from persisted usage counters — never persisted on
|
|
@@ -27,24 +27,13 @@ export declare const CLAUDE_FABLE_MYTHOS_5_SUMMARIZED_THINKING: {
|
|
|
27
27
|
readonly type: 'adaptive';
|
|
28
28
|
readonly display: 'summarized';
|
|
29
29
|
};
|
|
30
|
-
export declare const CLAUDE_FABLE_MYTHOS_5_PRICING:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export declare const CLAUDE_FABLE_MYTHOS_5_1_PRICING: {
|
|
38
|
-
readonly input: 10;
|
|
39
|
-
readonly output: 50;
|
|
40
|
-
readonly cacheRead: 0.25;
|
|
41
|
-
readonly cacheWrite5m: 12.5;
|
|
42
|
-
readonly cacheWrite1h: 20;
|
|
43
|
-
};
|
|
44
|
-
export declare const CLAUDE_FABLE_MYTHOS_5_CONTEXT_WINDOW = 1000000;
|
|
45
|
-
export declare const CLAUDE_FABLE_MYTHOS_5_MAX_OUTPUT_TOKENS = 128000;
|
|
46
|
-
export declare const CLAUDE_FABLE_MYTHOS_5_RELEASE_DATE = "2026-06-09";
|
|
47
|
-
export declare const CLAUDE_FABLE_MYTHOS_5_1_RELEASE_DATE = "2026-09-01";
|
|
30
|
+
export declare const CLAUDE_FABLE_MYTHOS_5_PRICING: import("./model-capabilities.ts").ClaudeModelPricing;
|
|
31
|
+
export declare const CLAUDE_FABLE_MYTHOS_5_1_PRICING: import("./model-capabilities.ts").ClaudeModelPricing;
|
|
32
|
+
export declare const CLAUDE_FABLE_MYTHOS_5_CONTEXT_WINDOW: number;
|
|
33
|
+
export declare const CLAUDE_FABLE_MYTHOS_5_MAX_OUTPUT_TOKENS: number;
|
|
34
|
+
export declare const CLAUDE_FABLE_MYTHOS_5_RELEASE_DATE: string;
|
|
35
|
+
export declare const CLAUDE_FABLE_MYTHOS_5_1_RELEASE_DATE: string;
|
|
36
|
+
/** Name and availability of each Fable and Mythos id, from the capability table. */
|
|
48
37
|
export declare const CLAUDE_FABLE_MYTHOS_5_MODEL_SPECS: Record<ClaudeFableMythos5ModelId, {
|
|
49
38
|
id: ClaudeFableMythos5ModelId;
|
|
50
39
|
name: string;
|
|
@@ -62,10 +51,14 @@ export declare const CLAUDE_FABLE_MYTHOS_5_1_MODEL_SPECS: {
|
|
|
62
51
|
limited?: boolean;
|
|
63
52
|
};
|
|
64
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* Any Fable or Mythos row. An unknown id that extends a known Fable or Mythos
|
|
56
|
+
* id with `-` (for example `claude-fable-5-5`) resolves to the shorter row.
|
|
57
|
+
*/
|
|
65
58
|
export declare function isClaudeFableOrMythos5Model(model: unknown): boolean;
|
|
66
59
|
export declare function isClaudeFableOrMythos51Model(model: unknown): boolean;
|
|
67
60
|
export declare function isClaudeFable51Model(model: unknown): boolean;
|
|
68
|
-
export declare function getClaudeFableMythos5ReleaseDate(model: unknown):
|
|
61
|
+
export declare function getClaudeFableMythos5ReleaseDate(model: unknown): string;
|
|
69
62
|
export declare const CLAUDE_SONNET_5_MODEL_ID = "claude-sonnet-5";
|
|
70
63
|
/**
|
|
71
64
|
* Sonnet 5 enables adaptive thinking by default but ships `display: "omitted"`,
|
|
@@ -79,41 +72,23 @@ export declare const CLAUDE_SONNET_5_ADAPTIVE_THINKING: {
|
|
|
79
72
|
};
|
|
80
73
|
export declare function isClaudeSonnet5Model(model: unknown): boolean;
|
|
81
74
|
export declare const CLAUDE_SONNET_5_5_MODEL_ID = "claude-sonnet-5-5";
|
|
82
|
-
export declare const CLAUDE_SONNET_5_5_RELEASE_DATE
|
|
83
|
-
export declare const CLAUDE_SONNET_5_5_CONTEXT_WINDOW
|
|
84
|
-
export declare const CLAUDE_SONNET_5_5_MAX_OUTPUT_TOKENS
|
|
85
|
-
export declare const CLAUDE_SONNET_5_5_PRICING:
|
|
86
|
-
readonly input: 2;
|
|
87
|
-
readonly output: 10;
|
|
88
|
-
readonly cacheRead: 0.2;
|
|
89
|
-
readonly cacheWrite5m: 2.5;
|
|
90
|
-
readonly cacheWrite1h: 4;
|
|
91
|
-
};
|
|
75
|
+
export declare const CLAUDE_SONNET_5_5_RELEASE_DATE: string;
|
|
76
|
+
export declare const CLAUDE_SONNET_5_5_CONTEXT_WINDOW: number;
|
|
77
|
+
export declare const CLAUDE_SONNET_5_5_MAX_OUTPUT_TOKENS: number;
|
|
78
|
+
export declare const CLAUDE_SONNET_5_5_PRICING: import("./model-capabilities.ts").ClaudeModelPricing;
|
|
92
79
|
export declare const CLAUDE_SONNET_5_5_ADAPTIVE_THINKING: {
|
|
93
80
|
readonly type: 'adaptive';
|
|
94
81
|
readonly display: 'summarized';
|
|
95
82
|
};
|
|
96
83
|
export declare function isClaudeSonnet55Model(model: unknown): boolean;
|
|
97
84
|
export declare const CLAUDE_HAIKU_5_5_MODEL_ID = "claude-haiku-5-5";
|
|
98
|
-
export declare const CLAUDE_HAIKU_5_5_RELEASE_DATE
|
|
99
|
-
export declare const CLAUDE_HAIKU_5_5_CONTEXT_WINDOW
|
|
100
|
-
export declare const CLAUDE_HAIKU_5_5_MAX_OUTPUT_TOKENS
|
|
101
|
-
export declare const CLAUDE_HAIKU_5_5_LONG_CONTEXT_THRESHOLD
|
|
102
|
-
export declare const CLAUDE_HAIKU_5_5_PRICING:
|
|
103
|
-
readonly input: 0.1;
|
|
104
|
-
readonly output: 0.5;
|
|
105
|
-
readonly cacheRead: 0.01;
|
|
106
|
-
readonly cacheWrite5m: 0.125;
|
|
107
|
-
readonly cacheWrite1h: 0.2;
|
|
108
|
-
};
|
|
85
|
+
export declare const CLAUDE_HAIKU_5_5_RELEASE_DATE: string;
|
|
86
|
+
export declare const CLAUDE_HAIKU_5_5_CONTEXT_WINDOW: number;
|
|
87
|
+
export declare const CLAUDE_HAIKU_5_5_MAX_OUTPUT_TOKENS: number;
|
|
88
|
+
export declare const CLAUDE_HAIKU_5_5_LONG_CONTEXT_THRESHOLD: number;
|
|
89
|
+
export declare const CLAUDE_HAIKU_5_5_PRICING: import("./model-capabilities.ts").ClaudeModelPricing;
|
|
109
90
|
/** Haiku 5.5's higher rates apply to every token in requests with more than 100K input tokens, including cached input. */
|
|
110
|
-
export declare const CLAUDE_HAIKU_5_5_LONG_CONTEXT_PRICING:
|
|
111
|
-
readonly input: 0.5;
|
|
112
|
-
readonly output: 2.5;
|
|
113
|
-
readonly cacheRead: 0.05;
|
|
114
|
-
readonly cacheWrite5m: 0.625;
|
|
115
|
-
readonly cacheWrite1h: 1;
|
|
116
|
-
};
|
|
91
|
+
export declare const CLAUDE_HAIKU_5_5_LONG_CONTEXT_PRICING: import("./model-capabilities.ts").ClaudeModelPricing;
|
|
117
92
|
export declare const CLAUDE_HAIKU_5_5_ADAPTIVE_THINKING: {
|
|
118
93
|
readonly type: 'adaptive';
|
|
119
94
|
readonly display: 'summarized';
|
|
@@ -134,16 +109,10 @@ export declare const CLAUDE_OPUS_5_ADAPTIVE_THINKING: {
|
|
|
134
109
|
};
|
|
135
110
|
export declare function isClaudeOpus5Model(model: unknown): boolean;
|
|
136
111
|
export declare const CLAUDE_OPUS_5_5_MODEL_ID = "claude-opus-5-5";
|
|
137
|
-
export declare const CLAUDE_OPUS_5_5_RELEASE_DATE
|
|
138
|
-
export declare const CLAUDE_OPUS_5_5_CONTEXT_WINDOW
|
|
139
|
-
export declare const CLAUDE_OPUS_5_5_MAX_OUTPUT_TOKENS
|
|
140
|
-
export declare const CLAUDE_OPUS_5_5_PRICING:
|
|
141
|
-
readonly input: 4;
|
|
142
|
-
readonly output: 20;
|
|
143
|
-
readonly cacheRead: 0.2;
|
|
144
|
-
readonly cacheWrite5m: 5;
|
|
145
|
-
readonly cacheWrite1h: 8;
|
|
146
|
-
};
|
|
112
|
+
export declare const CLAUDE_OPUS_5_5_RELEASE_DATE: string;
|
|
113
|
+
export declare const CLAUDE_OPUS_5_5_CONTEXT_WINDOW: number;
|
|
114
|
+
export declare const CLAUDE_OPUS_5_5_MAX_OUTPUT_TOKENS: number;
|
|
115
|
+
export declare const CLAUDE_OPUS_5_5_PRICING: import("./model-capabilities.ts").ClaudeModelPricing;
|
|
147
116
|
export declare const CLAUDE_OPUS_5_5_ADAPTIVE_THINKING: {
|
|
148
117
|
readonly type: 'adaptive';
|
|
149
118
|
readonly display: 'summarized';
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { enrollmentAuthority, readClaustrumEnrollmentStatus } from "./internal-types/claustrum/index.js";
|
|
2
|
+
import { NativeCustodyError } from './native-custody.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Shown instead of `Native custody refused: invalid-token` when the
|
|
5
|
+
* enrollment files could not be read because the private-files backend did
|
|
6
|
+
* not load. Older common-auth passes on the backend's
|
|
7
|
+
* `unsupported-filesystem`, which is what every private-file check returns on
|
|
8
|
+
* Windows when the @cortexkit/private-files native addon did not load; newer
|
|
9
|
+
* common-auth refuses with `ERR_PRIVATE_FILES_UNAVAILABLE`. Either way the
|
|
10
|
+
* enrollment itself may be fine.
|
|
11
|
+
*/
|
|
12
|
+
export declare const PRIVATE_FILES_UNAVAILABLE_MESSAGE = "Private file support didn't load on this machine (@cortexkit/private-files). Reinstall the plugin; if this persists, report it with your OS and Node version.";
|
|
13
|
+
/**
|
|
14
|
+
* The enrollment refusal for a private-files backend that did not load. It
|
|
15
|
+
* keeps the `invalid-token` code, so every caller that branches on the code
|
|
16
|
+
* treats it exactly as before; only the message names the cause and remedy.
|
|
17
|
+
*/
|
|
18
|
+
export declare class NativePrivateFilesUnavailableError extends NativeCustodyError {
|
|
19
|
+
constructor();
|
|
20
|
+
}
|
|
2
21
|
/** Enrollment files, not account settings, choose the host's credential source. */
|
|
3
22
|
export declare function readNativeEnrollmentMode(host: 'opencode' | 'pi', env?: NodeJS.ProcessEnv, dependencies?: {
|
|
4
23
|
enrollmentAuthority: typeof enrollmentAuthority;
|
package/dist/native-ui.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CommandInvocation, type CommandMenu } from "./internal-types/commands/index.js";
|
|
1
|
+
import { type CommandApplyResult, type CommandInvocation, type CommandMenu } from "./internal-types/commands/index.js";
|
|
2
2
|
export type { CommandApplyRequest, CommandApplyResult, CommandDialogPayload, CommandInvocation, CommandMenu, CommandMenuModel, KnobValue, KnobValues, MenuAction, MenuItem, MenuKnob, MenuSection, NotifyKind, SectionSlot, } from "./internal-types/commands/index.js";
|
|
3
3
|
export { parseApplyRequest, runPiCommandMenu, } from "./internal-types/commands/index.js";
|
|
4
4
|
import { type NativeMenuDispatch, type NativeVaultDisconnect } from './native-menu-executor.ts';
|
|
@@ -36,6 +36,15 @@ export interface NativeUiOptions {
|
|
|
36
36
|
/** The host sets this flag; RPC callers cannot declare themselves interactive. */
|
|
37
37
|
readonly interactive: boolean;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* A menu result as Core returns it. After a successful OAuth start,
|
|
41
|
+
* `authorizationUrl` carries the one checked sign-in link from `text` as its
|
|
42
|
+
* own field, so a host can show it in a dialog of its own instead of finding
|
|
43
|
+
* it in the message text. Every other result leaves it out.
|
|
44
|
+
*/
|
|
45
|
+
export type NativeCommandApplyResult = CommandApplyResult & {
|
|
46
|
+
readonly authorizationUrl?: string;
|
|
47
|
+
};
|
|
39
48
|
/**
|
|
40
49
|
* Builds the Claude menu from the supported commands for OpenCode or Pi.
|
|
41
50
|
* Shared renderers display it, but each submitted action still goes through
|
|
@@ -122,7 +122,7 @@ export interface NativeVaultRuntime {
|
|
|
122
122
|
export declare function publishNativeVaultRosterSeed(paths: Pick<NativeVaultPaths, 'roster'>, input: NativeRosterSeedInput, options?: {
|
|
123
123
|
assertOwned?: () => Promise<void>;
|
|
124
124
|
}): Promise<NativeVaultRosterSeed>;
|
|
125
|
-
/** Match imported metadata to the
|
|
125
|
+
/** Match imported custody metadata to the current roster without blocking roster writers. The optional assertOwned callback separately rechecks the caller's captured input before rename. */
|
|
126
126
|
export declare function publishNativeVaultRuntimeSeed(paths: Pick<NativeVaultPaths, 'roster' | 'runtime' | 'storageId'>, state: NativeRuntimeState, options?: {
|
|
127
127
|
assertOwned?: () => Promise<void>;
|
|
128
128
|
}): Promise<void>;
|
package/dist/turn-end-note.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { TURN_END_NOTE_BETA } from './model-capabilities.ts';
|
|
2
|
+
export { TURN_END_NOTE_BETA };
|
|
2
3
|
export declare const TURN_END_NOTE_MIN_VISIBLE_CHARACTERS = 350;
|
|
3
4
|
export declare const TURN_END_NOTE_CONTENT = "Your reply above has already reached the user. The tool call after it was housekeeping and changed nothing they need to know. Do not repeat, summarize or rewrite that reply. If no new work remains, end the turn without restating anything.";
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
-
* message (`clear_at: "next_user_message"`), which needs the
|
|
6
|
+
* Models that get turn-end notes (capability `turnEndNote`). The note is a
|
|
7
|
+
* turn-scoped system message (`clear_at: "next_user_message"`), which needs the
|
|
7
8
|
* mid-conversation-system-clear-at beta that Claude Code sends for these models.
|
|
8
9
|
*/
|
|
9
10
|
export declare function supportsTurnEndNote(model: unknown): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/anthropic-auth-core",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"prepublishOnly": "bun run build"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@cortexkit/common-auth": "0.
|
|
33
|
+
"@cortexkit/common-auth": "0.24.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@cortexkit/claustrum-client": "0.12.0",
|