@bike4mind/cli 0.2.80 → 0.2.81-conard-tavern-claude.22456
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/{ConfigStore-CG7DYbjy.mjs → ConfigStore-COErsj58.mjs} +77 -1
- package/dist/commands/doctorCommand.mjs +1 -1
- package/dist/commands/headlessCommand.mjs +2 -2
- package/dist/commands/mcpCommand.mjs +1 -1
- package/dist/commands/updateCommand.mjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{tools-BYBHpm5w.mjs → tools-B8Qh_Fon.mjs} +3 -2
- package/dist/{updateChecker-YklUziR2.mjs → updateChecker-BZYzc4wB.mjs} +1 -1
- package/package.json +7 -7
|
@@ -673,6 +673,11 @@ let ApiKeyScope = /* @__PURE__ */ function(ApiKeyScope) {
|
|
|
673
673
|
ApiKeyScope["AI_CHAT"] = "ai:chat";
|
|
674
674
|
ApiKeyScope["READ_PROJECTS"] = "projects:read";
|
|
675
675
|
ApiKeyScope["WRITE_PROJECTS"] = "projects:write";
|
|
676
|
+
/** Authorizes only the cc-bridge WS actions (cc_agent_register /
|
|
677
|
+
* cc_agent_event / cc_agent_disconnect). Keys with this scope CANNOT
|
|
678
|
+
* call chat/completions — a leaked bridge key has the narrow blast
|
|
679
|
+
* radius of a sprite-spawning credential, not a billable AI key. */
|
|
680
|
+
ApiKeyScope["CC_BRIDGE"] = "cc-bridge:connect";
|
|
676
681
|
ApiKeyScope["ADMIN"] = "admin:*";
|
|
677
682
|
return ApiKeyScope;
|
|
678
683
|
}({});
|
|
@@ -1881,6 +1886,74 @@ const TavernStockUpdateAction = z.object({
|
|
|
1881
1886
|
totalValue: z.number()
|
|
1882
1887
|
}))
|
|
1883
1888
|
});
|
|
1889
|
+
/**
|
|
1890
|
+
* ========================================
|
|
1891
|
+
* Claude Code Bridge Actions
|
|
1892
|
+
*
|
|
1893
|
+
* Bridge (`@bike4mind/cc-bridge`) runs on the user's machine, hosts Claude
|
|
1894
|
+
* Code sessions, and forwards events up so each session appears as a sprite
|
|
1895
|
+
* in the Tavern. See CLAUDE_CODE_TAVERN_PLAN.md.
|
|
1896
|
+
* ========================================
|
|
1897
|
+
*/
|
|
1898
|
+
/** Lifecycle status of a Claude Code session, as seen by the Tavern. */
|
|
1899
|
+
const CcAgentStatus = z.enum([
|
|
1900
|
+
"running",
|
|
1901
|
+
"idle",
|
|
1902
|
+
"awaiting_input",
|
|
1903
|
+
"awaiting_permission",
|
|
1904
|
+
"disconnected"
|
|
1905
|
+
]);
|
|
1906
|
+
/**
|
|
1907
|
+
* Bridge → Server: announce a new Claude Code session.
|
|
1908
|
+
*
|
|
1909
|
+
* The server persists an ActiveCodeAgent record keyed by instanceId, picks a
|
|
1910
|
+
* sprite, and broadcasts an `add_entity` scene command so every connected tab
|
|
1911
|
+
* of the user's account sees the new agent appear in the Tavern.
|
|
1912
|
+
*/
|
|
1913
|
+
const CcAgentRegisterAction = z.object({
|
|
1914
|
+
action: z.literal("cc_agent_register"),
|
|
1915
|
+
accessToken: z.string().max(512).optional(),
|
|
1916
|
+
instanceId: z.string().min(1).max(128),
|
|
1917
|
+
deviceId: z.string().min(1).max(128),
|
|
1918
|
+
workspaceName: z.string().min(1).max(200),
|
|
1919
|
+
workspacePath: z.string().max(1024),
|
|
1920
|
+
claudeVersion: z.string().max(32).optional(),
|
|
1921
|
+
startedAt: z.string().max(40)
|
|
1922
|
+
});
|
|
1923
|
+
/**
|
|
1924
|
+
* Bridge → Server: stream an event for an already-registered session.
|
|
1925
|
+
*
|
|
1926
|
+
* v1 PoC carries two event variants; more (tool_call, tool_result,
|
|
1927
|
+
* permission_request, artifact) will be added as later phases land.
|
|
1928
|
+
*/
|
|
1929
|
+
const CcAgentEventPayload = z.discriminatedUnion("type", [z.object({
|
|
1930
|
+
type: z.literal("status"),
|
|
1931
|
+
status: CcAgentStatus,
|
|
1932
|
+
text: z.string().max(4e3).optional()
|
|
1933
|
+
}), z.object({
|
|
1934
|
+
type: z.literal("message"),
|
|
1935
|
+
role: z.enum(["user", "assistant"]),
|
|
1936
|
+
text: z.string().max(4e3)
|
|
1937
|
+
})]);
|
|
1938
|
+
const CcAgentEventAction = z.object({
|
|
1939
|
+
action: z.literal("cc_agent_event"),
|
|
1940
|
+
accessToken: z.string().max(512).optional(),
|
|
1941
|
+
instanceId: z.string().min(1).max(128),
|
|
1942
|
+
timestamp: z.string().max(40),
|
|
1943
|
+
event: CcAgentEventPayload
|
|
1944
|
+
});
|
|
1945
|
+
/**
|
|
1946
|
+
* Bridge → Server: the CC session ended cleanly.
|
|
1947
|
+
*
|
|
1948
|
+
* The server also sweeps `ActiveCodeAgent` records on `$disconnect`, so this
|
|
1949
|
+
* message is an optimization (immediate despawn) rather than a requirement.
|
|
1950
|
+
*/
|
|
1951
|
+
const CcAgentDisconnectAction = z.object({
|
|
1952
|
+
action: z.literal("cc_agent_disconnect"),
|
|
1953
|
+
accessToken: z.string().max(512).optional(),
|
|
1954
|
+
instanceId: z.string().min(1).max(128),
|
|
1955
|
+
reason: z.string().max(200).optional()
|
|
1956
|
+
});
|
|
1884
1957
|
const SessionCreatedAction = shareableDocumentSchema.extend({
|
|
1885
1958
|
action: z.literal("session.created"),
|
|
1886
1959
|
id: z.string(),
|
|
@@ -1930,7 +2003,10 @@ z.discriminatedUnion("action", [
|
|
|
1930
2003
|
KeepCommandRequestAction,
|
|
1931
2004
|
KeepCommandResponseAction,
|
|
1932
2005
|
TavernSceneCommandRequestAction,
|
|
1933
|
-
JupyterCellOutputAction
|
|
2006
|
+
JupyterCellOutputAction,
|
|
2007
|
+
CcAgentRegisterAction,
|
|
2008
|
+
CcAgentEventAction,
|
|
2009
|
+
CcAgentDisconnectAction
|
|
1934
2010
|
]);
|
|
1935
2011
|
z.discriminatedUnion("action", [
|
|
1936
2012
|
DataSubscriptionUpdateAction,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as version, n as fetchLatestVersion, r as forceCheckForUpdate } from "../updateChecker-
|
|
2
|
+
import { i as version, n as fetchLatestVersion, r as forceCheckForUpdate } from "../updateChecker-BZYzc4wB.mjs";
|
|
3
3
|
import { execSync } from "child_process";
|
|
4
4
|
import { constants, existsSync, promises } from "fs";
|
|
5
5
|
import { homedir } from "os";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { B as CustomCommandStore, C as getApiUrl, E as generateCliTools, I as buildCoreSystemPrompt, P as setWebSocketToolExecutor, R as isReadOnlyTool, S as loadContextFiles, T as PermissionManager, U as SessionStore, V as CheckpointStore, _ as ServerLlmBackend, a as createBackgroundAgentTools, c as AgentStore, f as ApiClient, g as WebSocketLlmBackend, h as FallbackLlmBackend, i as createWriteTodosTool, l as SubagentOrchestrator, m as WebSocketConnectionManager, n as createFindDefinitionTool, o as BackgroundAgentManager, p as WebSocketToolExecutor, r as createTodoStore, s as createAgentDelegateTool, t as createGetFileStructureTool, u as createSkillTool, v as McpManager, z as ReActAgent } from "../tools-
|
|
3
|
-
import { n as logger, t as ConfigStore } from "../ConfigStore-
|
|
2
|
+
import { B as CustomCommandStore, C as getApiUrl, E as generateCliTools, I as buildCoreSystemPrompt, P as setWebSocketToolExecutor, R as isReadOnlyTool, S as loadContextFiles, T as PermissionManager, U as SessionStore, V as CheckpointStore, _ as ServerLlmBackend, a as createBackgroundAgentTools, c as AgentStore, f as ApiClient, g as WebSocketLlmBackend, h as FallbackLlmBackend, i as createWriteTodosTool, l as SubagentOrchestrator, m as WebSocketConnectionManager, n as createFindDefinitionTool, o as BackgroundAgentManager, p as WebSocketToolExecutor, r as createTodoStore, s as createAgentDelegateTool, t as createGetFileStructureTool, u as createSkillTool, v as McpManager, z as ReActAgent } from "../tools-B8Qh_Fon.mjs";
|
|
3
|
+
import { n as logger, t as ConfigStore } from "../ConfigStore-COErsj58.mjs";
|
|
4
4
|
import { t as DEFAULT_SANDBOX_CONFIG } from "../types-DBEjF9YS.mjs";
|
|
5
5
|
import { t as createSandboxRuntime } from "../SandboxRuntimeAdapter-C1B4t20N.mjs";
|
|
6
6
|
import { t as SandboxOrchestrator } from "../SandboxOrchestrator-BEW3rqYi.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as version, r as forceCheckForUpdate } from "../updateChecker-
|
|
2
|
+
import { i as version, r as forceCheckForUpdate } from "../updateChecker-BZYzc4wB.mjs";
|
|
3
3
|
import { execSync } from "child_process";
|
|
4
4
|
//#region src/commands/updateCommand.ts
|
|
5
5
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { n as useCliStore, t as selectActiveBackgroundAgents } from "./store-Dw1nZX2Y.mjs";
|
|
3
|
-
import { A as DEFAULT_RETRY_CONFIG, B as CustomCommandStore, C as getApiUrl, D as ALWAYS_DENIED_FOR_AGENTS, E as generateCliTools, F as OllamaBackend, G as hasFileReferences, H as CommandHistoryStore, I as buildCoreSystemPrompt, J as mergeCommands, K as processFileReferences, L as buildSkillsPromptSection, M as clearFeatureModuleTools, N as registerFeatureModuleTools, O as DEFAULT_AGENT_MODEL, P as setWebSocketToolExecutor, R as isReadOnlyTool, S as loadContextFiles, T as PermissionManager, U as SessionStore, V as CheckpointStore, W as OAuthClient, X as searchFiles, Y as formatFileSize, Z as warmFileCache, _ as ServerLlmBackend, a as createBackgroundAgentTools, b as formatStep, c as AgentStore, d as parseAgentConfig, f as ApiClient, g as WebSocketLlmBackend, h as FallbackLlmBackend, i as createWriteTodosTool, j as DEFAULT_THOROUGHNESS, k as DEFAULT_MAX_ITERATIONS, l as SubagentOrchestrator, m as WebSocketConnectionManager, n as createFindDefinitionTool, o as BackgroundAgentManager, p as WebSocketToolExecutor, q as searchCommands, r as createTodoStore, s as createAgentDelegateTool, t as createGetFileStructureTool, u as createSkillTool, v as McpManager, w as getEnvironmentName, x as extractCompactInstructions, y as substituteArguments, z as ReActAgent } from "./tools-
|
|
4
|
-
import { Dt as validateJupyterKernelName, Ot as validateNotebookPath$1, g as ChatModels, m as CREDIT_DEDUCT_TRANSACTION_TYPES, n as logger, t as ConfigStore } from "./ConfigStore-
|
|
5
|
-
import { i as version, t as checkForUpdate } from "./updateChecker-
|
|
3
|
+
import { A as DEFAULT_RETRY_CONFIG, B as CustomCommandStore, C as getApiUrl, D as ALWAYS_DENIED_FOR_AGENTS, E as generateCliTools, F as OllamaBackend, G as hasFileReferences, H as CommandHistoryStore, I as buildCoreSystemPrompt, J as mergeCommands, K as processFileReferences, L as buildSkillsPromptSection, M as clearFeatureModuleTools, N as registerFeatureModuleTools, O as DEFAULT_AGENT_MODEL, P as setWebSocketToolExecutor, R as isReadOnlyTool, S as loadContextFiles, T as PermissionManager, U as SessionStore, V as CheckpointStore, W as OAuthClient, X as searchFiles, Y as formatFileSize, Z as warmFileCache, _ as ServerLlmBackend, a as createBackgroundAgentTools, b as formatStep, c as AgentStore, d as parseAgentConfig, f as ApiClient, g as WebSocketLlmBackend, h as FallbackLlmBackend, i as createWriteTodosTool, j as DEFAULT_THOROUGHNESS, k as DEFAULT_MAX_ITERATIONS, l as SubagentOrchestrator, m as WebSocketConnectionManager, n as createFindDefinitionTool, o as BackgroundAgentManager, p as WebSocketToolExecutor, q as searchCommands, r as createTodoStore, s as createAgentDelegateTool, t as createGetFileStructureTool, u as createSkillTool, v as McpManager, w as getEnvironmentName, x as extractCompactInstructions, y as substituteArguments, z as ReActAgent } from "./tools-B8Qh_Fon.mjs";
|
|
4
|
+
import { Dt as validateJupyterKernelName, Ot as validateNotebookPath$1, g as ChatModels, m as CREDIT_DEDUCT_TRANSACTION_TYPES, n as logger, t as ConfigStore } from "./ConfigStore-COErsj58.mjs";
|
|
5
|
+
import { i as version, t as checkForUpdate } from "./updateChecker-BZYzc4wB.mjs";
|
|
6
6
|
import React, { useCallback, useEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
7
7
|
import { Box, Static, Text, render, useApp, useInput } from "ink";
|
|
8
8
|
import { execSync } from "child_process";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as RegInviteEvents, A as ImageGenerationUsageTransaction, B as OpenAIEmbeddingModel, C as FileEvents, Ct as getViewById, D as GenericCreditAddTransaction, E as GenerateImageToolCallSchema, Et as sanitizeTelemetryError, F as KnowledgeType, G as ProjectEvents, H as Permission, I as LLMEvents, J as QuestMasterParamsSchema, K as PromptMetaZodSchema, L as MiscEvents, M as InboxEvents, N as InviteEvents, O as GenericCreditDeductTransaction, P as InviteType, Q as RechartsChartTypeList, R as ModalEvents, S as FeedbackEvents, St as getMcpProviderMetadata, T as GEMINI_IMAGE_MODELS, Tt as resolveNavigationIntents, U as PermissionDeniedError, V as OpenAIImageGenerationInput, W as ProfileEvents, X as RealtimeVoiceUsageTransaction, Y as REASONING_SUPPORTED_MODELS, Z as ReceivedCreditTransaction, _ as CompletionApiUsageTransaction, _t as VoyageAIEmbeddingModel, a as ApiKeyEvents, at as SpeechToTextModels, b as FIXED_TEMPERATURE_MODELS, bt as getAccessibleDataLakes, c as AppFileEvents, ct as TagType, d as BFL_IMAGE_MODELS, dt as ToolUsageTransaction, et as ResearchModeParamsSchema, f as BFL_SAFETY_TOLERANCE, ft as TransferCreditTransaction, g as ChatModels, gt as VideoModels, h as ChatCompletionCreateInputSchema, ht as VideoGenerationUsageTransaction, i as AiEvents, it as SessionEvents, j as ImageModels, k as ImageEditUsageTransaction, kt as CollectionType, l as ArtifactTypeSchema, lt as TaskScheduleHandler, mt as VIDEO_SIZE_CONSTRAINTS, n as logger, nt as ResearchTaskPeriodicFrequencyType, o as ApiKeyScope, ot as SubscriptionCreditTransaction, p as BedrockEmbeddingModel, pt as UiNavigationEvents, q as PurchaseTransaction, r as ALERT_THRESHOLDS, rt as ResearchTaskType, s as ApiKeyType, st as SupportedFabFileMimeTypes, t as ConfigStore, tt as ResearchTaskExecutionType, u as AuthEvents, ut as TextGenerationUsageTransaction, v as DashboardParamsSchema, vt as XAI_IMAGE_MODELS, w as FriendshipEvents, wt as isGPTImageModel, x as FavoriteDocumentType, xt as getDataLakeTags, y as ElabsEvents, yt as b4mLLMTools, z as ModelBackend } from "./ConfigStore-
|
|
2
|
+
import { $ as RegInviteEvents, A as ImageGenerationUsageTransaction, B as OpenAIEmbeddingModel, C as FileEvents, Ct as getViewById, D as GenericCreditAddTransaction, E as GenerateImageToolCallSchema, Et as sanitizeTelemetryError, F as KnowledgeType, G as ProjectEvents, H as Permission, I as LLMEvents, J as QuestMasterParamsSchema, K as PromptMetaZodSchema, L as MiscEvents, M as InboxEvents, N as InviteEvents, O as GenericCreditDeductTransaction, P as InviteType, Q as RechartsChartTypeList, R as ModalEvents, S as FeedbackEvents, St as getMcpProviderMetadata, T as GEMINI_IMAGE_MODELS, Tt as resolveNavigationIntents, U as PermissionDeniedError, V as OpenAIImageGenerationInput, W as ProfileEvents, X as RealtimeVoiceUsageTransaction, Y as REASONING_SUPPORTED_MODELS, Z as ReceivedCreditTransaction, _ as CompletionApiUsageTransaction, _t as VoyageAIEmbeddingModel, a as ApiKeyEvents, at as SpeechToTextModels, b as FIXED_TEMPERATURE_MODELS, bt as getAccessibleDataLakes, c as AppFileEvents, ct as TagType, d as BFL_IMAGE_MODELS, dt as ToolUsageTransaction, et as ResearchModeParamsSchema, f as BFL_SAFETY_TOLERANCE, ft as TransferCreditTransaction, g as ChatModels, gt as VideoModels, h as ChatCompletionCreateInputSchema, ht as VideoGenerationUsageTransaction, i as AiEvents, it as SessionEvents, j as ImageModels, k as ImageEditUsageTransaction, kt as CollectionType, l as ArtifactTypeSchema, lt as TaskScheduleHandler, mt as VIDEO_SIZE_CONSTRAINTS, n as logger, nt as ResearchTaskPeriodicFrequencyType, o as ApiKeyScope, ot as SubscriptionCreditTransaction, p as BedrockEmbeddingModel, pt as UiNavigationEvents, q as PurchaseTransaction, r as ALERT_THRESHOLDS, rt as ResearchTaskType, s as ApiKeyType, st as SupportedFabFileMimeTypes, t as ConfigStore, tt as ResearchTaskExecutionType, u as AuthEvents, ut as TextGenerationUsageTransaction, v as DashboardParamsSchema, vt as XAI_IMAGE_MODELS, w as FriendshipEvents, wt as isGPTImageModel, x as FavoriteDocumentType, xt as getDataLakeTags, y as ElabsEvents, yt as b4mLLMTools, z as ModelBackend } from "./ConfigStore-COErsj58.mjs";
|
|
3
3
|
import { n as isPathAllowed, t as assertPathAllowed } from "./pathValidation-CIytuhr3-Dt5dntLx.mjs";
|
|
4
4
|
import { execFile, execFileSync, spawn } from "child_process";
|
|
5
5
|
import { createHash, randomBytes } from "crypto";
|
|
@@ -13747,7 +13747,8 @@ z.object({
|
|
|
13747
13747
|
createdFrom: z.enum([
|
|
13748
13748
|
"dashboard",
|
|
13749
13749
|
"cli",
|
|
13750
|
-
"api"
|
|
13750
|
+
"api",
|
|
13751
|
+
"bridge"
|
|
13751
13752
|
])
|
|
13752
13753
|
})
|
|
13753
13754
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bike4mind/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.81-conard-tavern-claude.22456+7123b1fce",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive CLI tool for Bike4Mind with ReAct agents",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -115,11 +115,11 @@
|
|
|
115
115
|
"zustand": "^4.5.4"
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
|
-
"@bike4mind/agents": "0.4.
|
|
119
|
-
"@bike4mind/common": "2.85.
|
|
120
|
-
"@bike4mind/mcp": "1.35.
|
|
121
|
-
"@bike4mind/services": "2.75.
|
|
122
|
-
"@bike4mind/utils": "2.17.
|
|
118
|
+
"@bike4mind/agents": "0.4.17-conard-tavern-claude.22456+7123b1fce",
|
|
119
|
+
"@bike4mind/common": "2.85.2-conard-tavern-claude.22456+7123b1fce",
|
|
120
|
+
"@bike4mind/mcp": "1.35.2-conard-tavern-claude.22456+7123b1fce",
|
|
121
|
+
"@bike4mind/services": "2.75.4-conard-tavern-claude.22456+7123b1fce",
|
|
122
|
+
"@bike4mind/utils": "2.17.4-conard-tavern-claude.22456+7123b1fce",
|
|
123
123
|
"@types/better-sqlite3": "^7.6.13",
|
|
124
124
|
"@types/jsonwebtoken": "^9.0.4",
|
|
125
125
|
"@types/node": "^22.9.0",
|
|
@@ -136,5 +136,5 @@
|
|
|
136
136
|
"optionalDependencies": {
|
|
137
137
|
"@vscode/ripgrep": "^1.17.1"
|
|
138
138
|
},
|
|
139
|
-
"gitHead": "
|
|
139
|
+
"gitHead": "7123b1fce6beaff2da2d458b4c9dc168d4caf8ea"
|
|
140
140
|
}
|