@songsid/agend 2.1.2-beta.2 → 2.1.2-beta.21
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/access-path.js +15 -6
- package/dist/access-path.js.map +1 -1
- package/dist/agent-endpoint.d.ts +2 -0
- package/dist/agent-endpoint.js +17 -1
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/backend/antigravity.d.ts +18 -0
- package/dist/backend/antigravity.js +32 -3
- package/dist/backend/antigravity.js.map +1 -1
- package/dist/backend/claude-code.d.ts +37 -0
- package/dist/backend/claude-code.js +43 -1
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/codex.d.ts +1 -0
- package/dist/backend/codex.js +25 -0
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/grok.d.ts +23 -0
- package/dist/backend/grok.js +45 -0
- package/dist/backend/grok.js.map +1 -1
- package/dist/backend/kiro.d.ts +20 -0
- package/dist/backend/kiro.js +77 -2
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +34 -0
- package/dist/backend/types.js +1 -1
- package/dist/backend/types.js.map +1 -1
- package/dist/channel/adapters/discord.d.ts +15 -0
- package/dist/channel/adapters/discord.js +91 -2
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/adapters/telegram.d.ts +21 -0
- package/dist/channel/adapters/telegram.js +82 -0
- package/dist/channel/adapters/telegram.js.map +1 -1
- package/dist/channel/ipc-bridge.d.ts +17 -1
- package/dist/channel/ipc-bridge.js +53 -17
- package/dist/channel/ipc-bridge.js.map +1 -1
- package/dist/channel/ipc-timeouts.d.ts +46 -0
- package/dist/channel/ipc-timeouts.js +65 -0
- package/dist/channel/ipc-timeouts.js.map +1 -0
- package/dist/channel/mcp-server.js +30 -14
- package/dist/channel/mcp-server.js.map +1 -1
- package/dist/channel/mcp-tools.js +28 -1
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/reconnect-backoff.d.ts +17 -0
- package/dist/channel/reconnect-backoff.js +21 -0
- package/dist/channel/reconnect-backoff.js.map +1 -0
- package/dist/channel/types.d.ts +29 -0
- package/dist/classic-channel-manager.js +1 -5
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli.js +132 -52
- package/dist/cli.js.map +1 -1
- package/dist/completion.d.ts +27 -0
- package/dist/completion.js +121 -0
- package/dist/completion.js.map +1 -0
- package/dist/config-validator.js +9 -0
- package/dist/config-validator.js.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/cost-guard.d.ts +3 -1
- package/dist/cost-guard.js +3 -1
- package/dist/cost-guard.js.map +1 -1
- package/dist/daemon.d.ts +219 -13
- package/dist/daemon.js +919 -303
- package/dist/daemon.js.map +1 -1
- package/dist/event-log.d.ts +31 -0
- package/dist/event-log.js +96 -0
- package/dist/event-log.js.map +1 -1
- package/dist/fleet-manager.d.ts +238 -2
- package/dist/fleet-manager.js +1008 -90
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +22 -0
- package/dist/general-knowledge/skills/model-discovery/SKILL.md +14 -23
- package/dist/general-knowledge/skills/session-management/SKILL.md +15 -34
- package/dist/hang-detector.d.ts +19 -13
- package/dist/hang-detector.js +19 -49
- package/dist/hang-detector.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +13 -1
- package/dist/instance-lifecycle.js +84 -3
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.d.ts +5 -0
- package/dist/instructions.js +9 -11
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +2 -1
- package/dist/locale.js.map +1 -1
- package/dist/logger.js +14 -0
- package/dist/logger.js.map +1 -1
- package/dist/mcp-liveness.d.ts +21 -0
- package/dist/mcp-liveness.js +27 -0
- package/dist/mcp-liveness.js.map +1 -0
- package/dist/outbound-handlers.d.ts +16 -0
- package/dist/outbound-handlers.js +121 -27
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +8 -3
- package/dist/outbound-schemas.js +13 -2
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/pane-write-lock.d.ts +48 -0
- package/dist/pane-write-lock.js +73 -0
- package/dist/pane-write-lock.js.map +1 -0
- package/dist/process-memory.d.ts +31 -0
- package/dist/process-memory.js +79 -0
- package/dist/process-memory.js.map +1 -0
- package/dist/quickstart.js +17 -16
- package/dist/quickstart.js.map +1 -1
- package/dist/reply-dedup.d.ts +41 -0
- package/dist/reply-dedup.js +0 -0
- package/dist/reply-dedup.js.map +1 -0
- package/dist/scheduler/db.js +3 -0
- package/dist/scheduler/db.js.map +1 -1
- package/dist/sd-notify.d.ts +27 -0
- package/dist/sd-notify.js +33 -1
- package/dist/sd-notify.js.map +1 -1
- package/dist/secret-file.d.ts +33 -0
- package/dist/secret-file.js +36 -0
- package/dist/secret-file.js.map +1 -0
- package/dist/setup-wizard.js +9 -7
- package/dist/setup-wizard.js.map +1 -1
- package/dist/tmux-control.d.ts +58 -5
- package/dist/tmux-control.js +102 -14
- package/dist/tmux-control.js.map +1 -1
- package/dist/tmux-manager.d.ts +31 -1
- package/dist/tmux-manager.js +40 -11
- package/dist/tmux-manager.js.map +1 -1
- package/dist/topic-commands.d.ts +50 -10
- package/dist/topic-commands.js +242 -106
- package/dist/topic-commands.js.map +1 -1
- package/dist/tui-glyphs.d.ts +25 -0
- package/dist/tui-glyphs.js +26 -0
- package/dist/tui-glyphs.js.map +1 -0
- package/dist/types.d.ts +6 -0
- package/dist/ui/view.html +123 -2
- package/dist/usage/format-rich.d.ts +11 -0
- package/dist/usage/format-rich.js +108 -0
- package/dist/usage/format-rich.js.map +1 -0
- package/dist/usage/providers.d.ts +97 -0
- package/dist/usage/providers.js +834 -0
- package/dist/usage/providers.js.map +1 -0
- package/dist/usage/usage-api.d.ts +50 -0
- package/dist/usage/usage-api.js +111 -0
- package/dist/usage/usage-api.js.map +1 -0
- package/dist/view-api.d.ts +3 -0
- package/dist/view-api.js +11 -2
- package/dist/view-api.js.map +1 -1
- package/dist/web-api.js +5 -2
- package/dist/web-api.js.map +1 -1
- package/package.json +4 -1
- package/dist/channel/tool-tracker.d.ts +0 -13
- package/dist/channel/tool-tracker.js +0 -58
- package/dist/channel/tool-tracker.js.map +0 -1
- package/dist/daemon-entry.d.ts +0 -1
- package/dist/daemon-entry.js +0 -30
- package/dist/daemon-entry.js.map +0 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export interface UsageMetric {
|
|
2
|
+
label: string;
|
|
3
|
+
type: "percent" | "dollars" | "count" | "text";
|
|
4
|
+
used?: number;
|
|
5
|
+
limit?: number;
|
|
6
|
+
value?: number | string;
|
|
7
|
+
unit?: string;
|
|
8
|
+
note?: string;
|
|
9
|
+
resetsAt?: string | null;
|
|
10
|
+
windowMs?: number | null;
|
|
11
|
+
}
|
|
12
|
+
export interface ProviderUsage {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
status: "ok" | "error" | "no-credentials";
|
|
16
|
+
plan?: string | null;
|
|
17
|
+
error?: string;
|
|
18
|
+
hint?: string;
|
|
19
|
+
metrics: UsageMetric[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Where the Claude OAuth bearer comes from, in preference order:
|
|
23
|
+
*
|
|
24
|
+
* 1. `~/.claude/.credentials.json` (`claudeAiOauth.accessToken`) when present and
|
|
25
|
+
* unexpired — the interactive `/login` flow. Carries plan metadata.
|
|
26
|
+
* 2. `CLAUDE_CODE_OAUTH_TOKEN` — the long-lived (annual) token minted by
|
|
27
|
+
* `claude setup-token`. Users on this flow often have NO credentials file at
|
|
28
|
+
* all (or a stale one from an old login), which is why /usage showed them
|
|
29
|
+
* "not logged in" / "token expired" while their CLI worked fine. Same token
|
|
30
|
+
* family (`sk-ant-oat…`), same usage endpoint; it just carries no plan
|
|
31
|
+
* metadata, so plan shows unknown.
|
|
32
|
+
* 3. An expired file token with no env fallback stays an explicit error.
|
|
33
|
+
* 4. `ANTHROPIC_API_KEY` alone is named in the hint but NOT used: console API
|
|
34
|
+
* keys are pay-per-token and have no subscription usage to query — the OAuth
|
|
35
|
+
* endpoint rejects them, and pretending otherwise would render a misleading
|
|
36
|
+
* error instead of an accurate "log in" hint.
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolveClaudeAuth(file: {
|
|
39
|
+
accessToken?: string;
|
|
40
|
+
expiresAt?: number;
|
|
41
|
+
subscriptionType?: string;
|
|
42
|
+
rateLimitTier?: string;
|
|
43
|
+
} | null, env?: NodeJS.ProcessEnv): {
|
|
44
|
+
token: string;
|
|
45
|
+
plan: string | null;
|
|
46
|
+
} | {
|
|
47
|
+
error: string;
|
|
48
|
+
plan: string | null;
|
|
49
|
+
} | null;
|
|
50
|
+
interface AgyBucket {
|
|
51
|
+
bucketId?: string;
|
|
52
|
+
displayName?: string;
|
|
53
|
+
remainingFraction?: number;
|
|
54
|
+
resetTime?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Pool the summary's buckets into at most four metrics.
|
|
58
|
+
*
|
|
59
|
+
* Two payload shapes exist. Older accounts report pooled ids (`gemini-5h`,
|
|
60
|
+
* `gemini-weekly`, `3p-5h`, `3p-weekly`), which map 1:1. This machine's live
|
|
61
|
+
* response instead lists PER-MODEL buckets (`gemini-3.6-flash-high`,
|
|
62
|
+
* `claude-sonnet-4-6`, `gpt-oss-120b-medium`, …) — those aggregate into a
|
|
63
|
+
* Gemini pool and an everything-else pool, keeping each pool's WORST remaining
|
|
64
|
+
* fraction, because eleven per-model meters is noise and the binding constraint
|
|
65
|
+
* is the one that runs out first.
|
|
66
|
+
*/
|
|
67
|
+
export declare function agyPoolMetrics(buckets: AgyBucket[]): UsageMetric[];
|
|
68
|
+
interface KiroToken {
|
|
69
|
+
access_token?: string;
|
|
70
|
+
expires_at?: string;
|
|
71
|
+
region?: string;
|
|
72
|
+
profile_arn?: string;
|
|
73
|
+
/** IAM Identity Center portal URL — present only for Q Developer Pro logins. */
|
|
74
|
+
start_url?: string;
|
|
75
|
+
/** Social login provider (google/github/…) — present only for free-tier logins. */
|
|
76
|
+
provider?: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Which Kiro login is in use. Verified against a real kiro-cli auth store:
|
|
80
|
+
* - IAM Identity Center (Amazon Q Developer Pro) tokens carry `start_url`
|
|
81
|
+
* (e.g. `https://d-xxxx.awsapps.com/start/`) and no social `provider`.
|
|
82
|
+
* - Free-tier social logins (Builder ID / Google / GitHub) carry `provider`
|
|
83
|
+
* and a `profile_arn`.
|
|
84
|
+
* Q Developer Pro is a seat-licensed subscription, so the credit/usage endpoint
|
|
85
|
+
* that Builder ID reports against does not describe it.
|
|
86
|
+
*/
|
|
87
|
+
export type KiroAuthKind = "q-developer-pro" | "builder-id";
|
|
88
|
+
export declare function kiroAuthKind(token: KiroToken): KiroAuthKind;
|
|
89
|
+
/** Exported for tests: the Q-Pro and expired paths return without any network call. */
|
|
90
|
+
export declare function fetchKiroUsage(): Promise<Omit<ProviderUsage, "id" | "name">>;
|
|
91
|
+
/** Fetch every provider in parallel. Providers without local credentials are
|
|
92
|
+
* skipped (per the panel's contract: absent CLIs simply don't show). */
|
|
93
|
+
export declare function fetchAllUsage(): Promise<{
|
|
94
|
+
fetchedAt: string;
|
|
95
|
+
providers: ProviderUsage[];
|
|
96
|
+
}>;
|
|
97
|
+
export {};
|