@opencow-ai/opencow-agent-sdk 0.4.20 → 0.4.22
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/tools/AgentTool/loadAgentsDir.d.ts +3 -0
- package/dist/cli.mjs +30523 -30428
- package/dist/client.js +21053 -20887
- package/dist/constants/prompts.d.ts +1 -1
- package/dist/constants/system.d.ts +2 -3
- package/dist/entrypoints/sdk/runtimeTypes.d.ts +10 -0
- package/dist/lib/envDynamic.d.ts +1 -1
- package/dist/providers/shared/requestSideChannels.d.ts +6 -0
- package/dist/sdk.js +21053 -20887
- package/dist/session/branding.d.ts +9 -0
- package/dist/session/brandingConfig.d.ts +12 -0
- package/dist/session/state/als.d.ts +16 -0
- package/dist/session/state/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ResolvedBranding } from './brandingConfig.js';
|
|
2
|
+
export { DEFAULT_BRANDING, resolveBranding, type BrandingOptions, type ResolvedBranding, } from './brandingConfig.js';
|
|
3
|
+
export declare function runWithBranding<T>(branding: ResolvedBranding, fn: () => T): T;
|
|
4
|
+
export declare function getBranding(): ResolvedBranding;
|
|
5
|
+
export declare function getAssistantIdentityPrompt(): string;
|
|
6
|
+
export declare function getMcpClientInfo(): {
|
|
7
|
+
readonly title: string;
|
|
8
|
+
readonly description: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface BrandingOptions {
|
|
2
|
+
/** Product name shown in client display metadata and used as the assistant fallback. */
|
|
3
|
+
productName?: string;
|
|
4
|
+
/** Assistant identity used in model-facing prompts. Defaults to productName. */
|
|
5
|
+
assistantName?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ResolvedBranding {
|
|
8
|
+
readonly productName: string;
|
|
9
|
+
readonly assistantName: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const DEFAULT_BRANDING: ResolvedBranding;
|
|
12
|
+
export declare function resolveBranding(options?: BrandingOptions): ResolvedBranding;
|
|
@@ -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:
|
|
@@ -31,6 +31,7 @@ import type { ModelStrings } from 'src/providers/shared/model/modelStrings.js';
|
|
|
31
31
|
import type { SettingSource } from 'src/session/settings/constants.js';
|
|
32
32
|
import type { PluginHookMatcher } from 'src/session/settings/types.js';
|
|
33
33
|
import type { AgentColorName } from 'src/capabilities/tools/AgentTool/agentColorManager.js';
|
|
34
|
+
import type { ResolvedBranding } from '../brandingConfig.js';
|
|
34
35
|
export type RegisteredHookMatcher = HookCallbackMatcher | PluginHookMatcher;
|
|
35
36
|
/**
|
|
36
37
|
* Tracked invocation of a skill (from the SkillTool / SDK skill loading).
|
|
@@ -154,6 +155,7 @@ export interface PromptCacheState {
|
|
|
154
155
|
export type RuntimeMode = 'sdk' | 'cli-interactive' | 'cli-print' | 'cli-remote' | 'cli-direct-connect' | 'subagent';
|
|
155
156
|
export interface QueryConfig {
|
|
156
157
|
readonly runtimeMode: RuntimeMode;
|
|
158
|
+
readonly branding: ResolvedBranding;
|
|
157
159
|
readonly sessionSource: string | undefined;
|
|
158
160
|
/**
|
|
159
161
|
* Granular entrypoint identifier for telemetry — `'cli'`, `'sdk-cli'`,
|
package/package.json
CHANGED