@opencow-ai/opencow-agent-sdk 0.4.21 → 0.4.23
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/capabilities/lsp/LSPServerManager.d.ts +2 -1
- package/dist/capabilities/mcp/types.d.ts +3 -3
- package/dist/capabilities/plugins/loadPluginAgents.d.ts +6 -0
- package/dist/capabilities/plugins/loadPluginCommands.d.ts +10 -0
- package/dist/capabilities/plugins/loadPluginHooks.d.ts +5 -0
- package/dist/capabilities/plugins/loadPluginOutputStyles.d.ts +6 -0
- package/dist/capabilities/plugins/lspPluginIntegration.d.ts +1 -0
- package/dist/capabilities/plugins/mcpPluginIntegration.d.ts +1 -0
- package/dist/capabilities/plugins/pluginOptionsStorage.d.ts +1 -0
- package/dist/capabilities/plugins/schemas.d.ts +4 -4
- package/dist/capabilities/plugins/sdkPluginRuntime.d.ts +35 -0
- package/dist/capabilities/todo/types.d.ts +2 -2
- package/dist/capabilities/tools/AgentTool/AgentTool.d.ts +8 -8
- package/dist/capabilities/tools/AgentTool/inputSchema.d.ts +3 -3
- package/dist/capabilities/tools/AgentTool/loadAgentsDir.d.ts +4 -0
- package/dist/capabilities/tools/TodoWriteTool/TodoWriteTool.d.ts +10 -10
- package/dist/cli.mjs +11952 -11679
- package/dist/client.d.ts +2 -0
- package/dist/client.js +8778 -3479
- package/dist/entrypoints/sdk/controlSchemas.d.ts +139 -139
- package/dist/entrypoints/sdk/coreSchemas.d.ts +57 -57
- package/dist/entrypoints/sdk/runtimeTypes.d.ts +82 -1
- package/dist/permissions/PermissionMode.d.ts +2 -2
- package/dist/permissions/PermissionPromptToolResultSchema.d.ts +1 -1
- package/dist/permissions/PermissionUpdateSchema.d.ts +1 -1
- package/dist/providers/anthropic/teleport/api.d.ts +3 -3
- package/dist/providers/shared/requestSideChannels.d.ts +6 -0
- package/dist/sdk.js +8778 -3479
- package/dist/session/layout/schemas.d.ts +12 -12
- package/dist/session/settings/types.d.ts +3 -3
- package/dist/session/state/als.d.ts +16 -0
- package/dist/session/state/index.d.ts +1 -1
- package/dist/session/state/registries.d.ts +4 -0
- package/dist/session/state/types.d.ts +4 -0
- package/dist/session/tasks.d.ts +2 -2
- package/dist/session/teammateMailbox.d.ts +2 -2
- package/dist/types/command.d.ts +2 -0
- package/dist/types/plugin.d.ts +2 -0
- package/package.json +1 -1
|
@@ -124,14 +124,14 @@ export declare const SdkRuleSchema: z.ZodObject<{
|
|
|
124
124
|
name?: string;
|
|
125
125
|
id?: string;
|
|
126
126
|
content?: string;
|
|
127
|
+
origin?: "local" | "user" | "project" | "managed" | "host-injected";
|
|
127
128
|
globs?: string[];
|
|
128
|
-
origin?: "user" | "project" | "local" | "managed" | "host-injected";
|
|
129
129
|
}, {
|
|
130
130
|
name?: string;
|
|
131
131
|
id?: string;
|
|
132
132
|
content?: string;
|
|
133
|
+
origin?: "local" | "user" | "project" | "managed" | "host-injected";
|
|
133
134
|
globs?: string[];
|
|
134
|
-
origin?: "user" | "project" | "local" | "managed" | "host-injected";
|
|
135
135
|
}>;
|
|
136
136
|
/**
|
|
137
137
|
* Validates ONLY the three v4-new fields of Options. Existing Options
|
|
@@ -215,24 +215,24 @@ export declare const OptionsPatchSchema: z.ZodEffects<z.ZodObject<{
|
|
|
215
215
|
name?: string;
|
|
216
216
|
id?: string;
|
|
217
217
|
content?: string;
|
|
218
|
+
origin?: "local" | "user" | "project" | "managed" | "host-injected";
|
|
218
219
|
globs?: string[];
|
|
219
|
-
origin?: "user" | "project" | "local" | "managed" | "host-injected";
|
|
220
220
|
}, {
|
|
221
221
|
name?: string;
|
|
222
222
|
id?: string;
|
|
223
223
|
content?: string;
|
|
224
|
+
origin?: "local" | "user" | "project" | "managed" | "host-injected";
|
|
224
225
|
globs?: string[];
|
|
225
|
-
origin?: "user" | "project" | "local" | "managed" | "host-injected";
|
|
226
226
|
}>, "many">>;
|
|
227
227
|
}, "strip", z.ZodTypeAny, {
|
|
228
228
|
rules?: {
|
|
229
229
|
name?: string;
|
|
230
230
|
id?: string;
|
|
231
231
|
content?: string;
|
|
232
|
+
origin?: "local" | "user" | "project" | "managed" | "host-injected";
|
|
232
233
|
globs?: string[];
|
|
233
|
-
origin?: "user" | "project" | "local" | "managed" | "host-injected";
|
|
234
234
|
}[];
|
|
235
|
-
fileSystemLayer?: "
|
|
235
|
+
fileSystemLayer?: "auto" | "disabled";
|
|
236
236
|
layoutProfile?: "agents" | "claude" | "gemini" | {
|
|
237
237
|
reads?: ("agents" | "claude" | "gemini" | {
|
|
238
238
|
instructionFile?: string;
|
|
@@ -252,10 +252,10 @@ export declare const OptionsPatchSchema: z.ZodEffects<z.ZodObject<{
|
|
|
252
252
|
name?: string;
|
|
253
253
|
id?: string;
|
|
254
254
|
content?: string;
|
|
255
|
+
origin?: "local" | "user" | "project" | "managed" | "host-injected";
|
|
255
256
|
globs?: string[];
|
|
256
|
-
origin?: "user" | "project" | "local" | "managed" | "host-injected";
|
|
257
257
|
}[];
|
|
258
|
-
fileSystemLayer?: "
|
|
258
|
+
fileSystemLayer?: "auto" | "disabled";
|
|
259
259
|
layoutProfile?: "agents" | "claude" | "gemini" | {
|
|
260
260
|
reads?: ("agents" | "claude" | "gemini" | {
|
|
261
261
|
instructionFile?: string;
|
|
@@ -275,10 +275,10 @@ export declare const OptionsPatchSchema: z.ZodEffects<z.ZodObject<{
|
|
|
275
275
|
name?: string;
|
|
276
276
|
id?: string;
|
|
277
277
|
content?: string;
|
|
278
|
+
origin?: "local" | "user" | "project" | "managed" | "host-injected";
|
|
278
279
|
globs?: string[];
|
|
279
|
-
origin?: "user" | "project" | "local" | "managed" | "host-injected";
|
|
280
280
|
}[];
|
|
281
|
-
fileSystemLayer?: "
|
|
281
|
+
fileSystemLayer?: "auto" | "disabled";
|
|
282
282
|
layoutProfile?: "agents" | "claude" | "gemini" | {
|
|
283
283
|
reads?: ("agents" | "claude" | "gemini" | {
|
|
284
284
|
instructionFile?: string;
|
|
@@ -298,10 +298,10 @@ export declare const OptionsPatchSchema: z.ZodEffects<z.ZodObject<{
|
|
|
298
298
|
name?: string;
|
|
299
299
|
id?: string;
|
|
300
300
|
content?: string;
|
|
301
|
+
origin?: "local" | "user" | "project" | "managed" | "host-injected";
|
|
301
302
|
globs?: string[];
|
|
302
|
-
origin?: "user" | "project" | "local" | "managed" | "host-injected";
|
|
303
303
|
}[];
|
|
304
|
-
fileSystemLayer?: "
|
|
304
|
+
fileSystemLayer?: "auto" | "disabled";
|
|
305
305
|
layoutProfile?: "agents" | "claude" | "gemini" | {
|
|
306
306
|
reads?: ("agents" | "claude" | "gemini" | {
|
|
307
307
|
instructionFile?: string;
|
|
@@ -20,8 +20,8 @@ export declare const PermissionsSchema: () => z.ZodObject<{
|
|
|
20
20
|
default: "default";
|
|
21
21
|
acceptEdits: "acceptEdits";
|
|
22
22
|
bypassPermissions: "bypassPermissions";
|
|
23
|
-
plan: "plan";
|
|
24
23
|
dontAsk: "dontAsk";
|
|
24
|
+
plan: "plan";
|
|
25
25
|
auto: "auto";
|
|
26
26
|
}>>;
|
|
27
27
|
disableBypassPermissionsMode: z.ZodOptional<z.ZodEnum<{
|
|
@@ -234,8 +234,8 @@ export declare const SettingsSchema: () => z.ZodObject<{
|
|
|
234
234
|
default: "default";
|
|
235
235
|
acceptEdits: "acceptEdits";
|
|
236
236
|
bypassPermissions: "bypassPermissions";
|
|
237
|
-
plan: "plan";
|
|
238
237
|
dontAsk: "dontAsk";
|
|
238
|
+
plan: "plan";
|
|
239
239
|
auto: "auto";
|
|
240
240
|
}>>;
|
|
241
241
|
disableBypassPermissionsMode: z.ZodOptional<z.ZodEnum<{
|
|
@@ -339,8 +339,8 @@ export declare const SettingsSchema: () => z.ZodObject<{
|
|
|
339
339
|
allowManagedPermissionRulesOnly: z.ZodOptional<z.ZodBoolean>;
|
|
340
340
|
allowManagedMcpServersOnly: z.ZodOptional<z.ZodBoolean>;
|
|
341
341
|
strictPluginOnlyCustomization: z.ZodCatch<z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodUnion<readonly [z.ZodBoolean, z.ZodArray<z.ZodEnum<{
|
|
342
|
-
skills: "skills";
|
|
343
342
|
agents: "agents";
|
|
343
|
+
skills: "skills";
|
|
344
344
|
hooks: "hooks";
|
|
345
345
|
mcp: "mcp";
|
|
346
346
|
}>>]>>>>;
|
|
@@ -105,6 +105,22 @@ export interface ChildContextOverrides {
|
|
|
105
105
|
* config).
|
|
106
106
|
*/
|
|
107
107
|
export declare function runWithChildQueryContext<T>(parent: QueryRuntime, overrides: ChildContextOverrides, fn: () => T): T;
|
|
108
|
+
/**
|
|
109
|
+
* Iterate an async iterable inside a child scope whose ONLY deviation from
|
|
110
|
+
* the parent is `config.env` — every other slot stays reference-shared
|
|
111
|
+
* (unlike `deriveChildQueryContext`, which also resets turn/diagnostics/
|
|
112
|
+
* registries and is therefore the wrong tool for a request-param override).
|
|
113
|
+
*
|
|
114
|
+
* Motivation: provider request params (extra_body, transport) are read from
|
|
115
|
+
* the query-scoped env at request-build time. A subagent with its own
|
|
116
|
+
* `extraBody` must override that env entry for exactly the span of its query
|
|
117
|
+
* iteration, without forking turn/cost accounting.
|
|
118
|
+
*
|
|
119
|
+
* The override wraps each `next()` call rather than iterable creation
|
|
120
|
+
* because async-generator bodies execute during iteration, not at
|
|
121
|
+
* construction.
|
|
122
|
+
*/
|
|
123
|
+
export declare function iterateWithQueryEnvOverrides<T>(iterable: AsyncIterable<T>, envOverrides: Record<string, string>): AsyncGenerator<T, void>;
|
|
108
124
|
/**
|
|
109
125
|
* Construct a child QueryRuntime from a parent. The per-slot
|
|
110
126
|
* inheritance policy is the v3 §6.2 contract:
|
|
@@ -28,7 +28,7 @@ export { clearBetaHeaderLatches, getAfkModeHeaderLatched, getCacheEditingHeaderL
|
|
|
28
28
|
export { getAllowedChannels, getAllowedSettingSources, getClientType, getDirectConnectServerUrl, getFileSystemLayer, getFlagSettingsInline, getHasDevChannels, getIsNonInteractiveSession, getQueryEnvForSpawn, getQueryEnvOverrides, getHostProvidedEnvVar, getQueryEnvVar, getQuestionPreviewFormat, getRuntimeMode, getSdkBetas, getSessionSource, isInteractive, isRemoteMode, preferThirdPartyAuthentication, setAllowedChannels, setAllowedSettingSources, setDirectConnectServerUrl, setFlagSettingsInline, setHasDevChannels, setSdkBetas, } from './config.js';
|
|
29
29
|
export { deleteEnvVar, resolveEnvVar, setEnvVar, } from '../../constants/envVars.js';
|
|
30
30
|
export type { EnvVarKey } from '../../constants/envVars.js';
|
|
31
|
-
export { addInvokedSkill, clearInvokedSkills, clearInvokedSkillsForAgent, clearRegisteredHooks, clearRegisteredPluginHooks, clearSystemPromptSectionState, getAgentColorMap, getCachedClaudeMdContent, getInitJsonSchema, getInvokedSkills, getInvokedSkillsForAgent, getPlanSlugCache, getRegisteredHooks, getSystemPromptSectionCache, registerHookCallbacks, resetSdkInitState, setCachedClaudeMdContent, setInitJsonSchema, setSystemPromptSectionCacheEntry, } from './registries.js';
|
|
31
|
+
export { addInvokedSkill, clearInvokedSkills, clearInvokedSkillsForAgent, clearRegisteredHooks, clearRegisteredPluginHooks, clearSystemPromptSectionState, getAgentColorMap, getCachedClaudeMdContent, getInitJsonSchema, getInvokedSkills, getInvokedSkillsForAgent, getPlanSlugCache, getRegisteredHooks, getSystemPromptSectionCache, registerHookCallbacks, resetSdkInitState, setCachedClaudeMdContent, setExplicitPluginRuntimeContext, setInitJsonSchema, setSystemPromptSectionCacheEntry, tryGetExplicitPluginDataPath, tryGetSessionLspManager, } from './registries.js';
|
|
32
32
|
export { getProvider } from './provider.js';
|
|
33
33
|
export { addToInMemoryErrorLog, getInMemoryErrorLog, getLastEmittedDate, getTeleportedSessionInfo, handleAutoModeTransition, handlePlanModeTransition, hasExitedPlanModeInSession, hasShownLspRecommendationThisSession, markFirstTeleportMessageLogged, needsAutoModeExitAttachment, needsPlanModeExitAttachment, setHasExitedPlanMode, setLastEmittedDate, setLspRecommendationShownThisSession, setNeedsAutoModeExitAttachment, setNeedsPlanModeExitAttachment, setTeleportedSessionInfo, } from './diagnostics.js';
|
|
34
34
|
export { getFeatureFlags, getKairosActive, getScheduledTasksEnabled, getSdkAgentProgressSummariesEnabled, getSessionBypassPermissionsMode, getSessionTrustAccepted, getStrictToolResultPairing, getUserMsgOptIn, isSessionPersistenceDisabled, setScheduledTasksEnabled, } from './featureFlags.js';
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
import type { HookEvent } from '../../entrypoints/sdk/coreTypes.js';
|
|
23
23
|
import type { AgentColorName } from 'src/capabilities/tools/AgentTool/agentColorManager.js';
|
|
24
24
|
import type { InvokedSkillInfo, RegisteredHookMatcher } from './types.js';
|
|
25
|
+
import type { LSPServerManager } from '../../capabilities/lsp/LSPServerManager.js';
|
|
25
26
|
export declare function getRegisteredHooks(): Partial<Record<HookEvent, RegisteredHookMatcher[]>> | null;
|
|
26
27
|
/**
|
|
27
28
|
* Append matcher entries to the hook registry. Multiple calls accumulate
|
|
@@ -44,6 +45,9 @@ export declare function setInitJsonSchema(schema: Record<string, unknown>): void
|
|
|
44
45
|
* hooks/hooksConfigSnapshot.ts before re-establishing the hook registry.
|
|
45
46
|
*/
|
|
46
47
|
export declare function resetSdkInitState(): void;
|
|
48
|
+
export declare function setExplicitPluginRuntimeContext(dataPaths: ReadonlyMap<string, string>, lspManager: LSPServerManager | null): void;
|
|
49
|
+
export declare function tryGetExplicitPluginDataPath(pluginId: string): string | undefined;
|
|
50
|
+
export declare function tryGetSessionLspManager(): LSPServerManager | undefined;
|
|
47
51
|
export declare function addInvokedSkill(skillName: string, skillPath: string, content: string, agentId?: string | null): void;
|
|
48
52
|
export declare function getInvokedSkills(): Map<string, InvokedSkillInfo>;
|
|
49
53
|
export declare function getInvokedSkillsForAgent(agentId: string | undefined | null): Map<string, InvokedSkillInfo>;
|
|
@@ -286,6 +286,10 @@ export interface QueryRegistries {
|
|
|
286
286
|
* Inline `import(...)` avoids cycles.
|
|
287
287
|
*/
|
|
288
288
|
dynamicSkills: import('../../capabilities/skills/loadSkillsDir.js').DynamicSkillsState;
|
|
289
|
+
/** Host-managed plugin data roots keyed by stable plugin id. */
|
|
290
|
+
pluginDataPaths: Map<string, string>;
|
|
291
|
+
/** Session-scoped LSP manager for explicit SDK plugins; null uses CLI fallback. */
|
|
292
|
+
lspManager: import('../../capabilities/lsp/LSPServerManager.js').LSPServerManager | null;
|
|
289
293
|
}
|
|
290
294
|
export interface QueryDiagnostics {
|
|
291
295
|
inMemoryErrorLog: Array<{
|
package/dist/session/tasks.d.ts
CHANGED
|
@@ -24,8 +24,8 @@ export declare function notifyTasksUpdated(): void;
|
|
|
24
24
|
export declare const TASK_STATUSES: readonly ["pending", "in_progress", "completed"];
|
|
25
25
|
export declare const TaskStatusSchema: () => z.ZodEnum<{
|
|
26
26
|
pending: "pending";
|
|
27
|
-
completed: "completed";
|
|
28
27
|
in_progress: "in_progress";
|
|
28
|
+
completed: "completed";
|
|
29
29
|
}>;
|
|
30
30
|
export type TaskStatus = z.infer<ReturnType<typeof TaskStatusSchema>>;
|
|
31
31
|
export declare const TaskSchema: () => z.ZodObject<{
|
|
@@ -36,8 +36,8 @@ export declare const TaskSchema: () => z.ZodObject<{
|
|
|
36
36
|
owner: z.ZodOptional<z.ZodString>;
|
|
37
37
|
status: z.ZodEnum<{
|
|
38
38
|
pending: "pending";
|
|
39
|
-
completed: "completed";
|
|
40
39
|
in_progress: "in_progress";
|
|
40
|
+
completed: "completed";
|
|
41
41
|
}>;
|
|
42
42
|
blocks: z.ZodArray<z.ZodString>;
|
|
43
43
|
blockedBy: z.ZodArray<z.ZodString>;
|
|
@@ -250,8 +250,8 @@ export declare const PlanApprovalResponseMessageSchema: () => z.ZodObject<{
|
|
|
250
250
|
default: "default";
|
|
251
251
|
acceptEdits: "acceptEdits";
|
|
252
252
|
bypassPermissions: "bypassPermissions";
|
|
253
|
-
plan: "plan";
|
|
254
253
|
dontAsk: "dontAsk";
|
|
254
|
+
plan: "plan";
|
|
255
255
|
}>>;
|
|
256
256
|
}, z.core.$strip>;
|
|
257
257
|
export type PlanApprovalResponseMessage = z.infer<ReturnType<typeof PlanApprovalResponseMessageSchema>>;
|
|
@@ -397,8 +397,8 @@ export declare const ModeSetRequestMessageSchema: () => z.ZodObject<{
|
|
|
397
397
|
default: "default";
|
|
398
398
|
acceptEdits: "acceptEdits";
|
|
399
399
|
bypassPermissions: "bypassPermissions";
|
|
400
|
-
plan: "plan";
|
|
401
400
|
dontAsk: "dontAsk";
|
|
401
|
+
plan: "plan";
|
|
402
402
|
}>;
|
|
403
403
|
from: z.ZodString;
|
|
404
404
|
}, z.core.$strip>;
|
package/dist/types/command.d.ts
CHANGED
|
@@ -137,6 +137,8 @@ export type CommandBase = {
|
|
|
137
137
|
/** Defaults to false. Only set when the command should be hidden from typeahead/help. */
|
|
138
138
|
isHidden?: boolean;
|
|
139
139
|
name: string;
|
|
140
|
+
/** Absolute source markdown path when the command was loaded from disk. */
|
|
141
|
+
sourcePath?: string;
|
|
140
142
|
aliases?: string[];
|
|
141
143
|
isMcp?: boolean;
|
|
142
144
|
argumentHint?: string;
|
package/dist/types/plugin.d.ts
CHANGED
package/package.json
CHANGED