experimental-ash 0.47.0 → 0.48.0
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/CHANGELOG.md +25 -0
- package/dist/docs/public/advanced/hooks.mdx +7 -7
- package/dist/docs/public/advanced/typescript-api.md +1 -1
- package/dist/docs/public/channels/index.md +2 -2
- package/dist/docs/public/channels/slack.mdx +12 -17
- package/dist/docs/public/frontend/use-ash-agent.md +13 -17
- package/dist/src/channel/adapter.js +1 -1
- package/dist/src/channel/routes.d.ts +5 -7
- package/dist/src/channel/send.js +1 -1
- package/dist/src/channel/types.d.ts +3 -3
- package/dist/src/context/build-dynamic-tools.d.ts +13 -0
- package/dist/src/context/build-dynamic-tools.js +1 -0
- package/dist/src/context/dynamic-instruction-lifecycle.d.ts +13 -13
- package/dist/src/context/dynamic-instruction-lifecycle.js +1 -1
- package/dist/src/context/dynamic-resolve-context.d.ts +12 -0
- package/dist/src/context/dynamic-resolve-context.js +1 -0
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.d.ts +4 -10
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/hook-lifecycle.d.ts +2 -2
- package/dist/src/context/hook-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +30 -23
- package/dist/src/context/keys.js +1 -1
- package/dist/src/execution/workflow-entry.js +1 -1
- package/dist/src/harness/code-mode.js +1 -1
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/prompt-cache.d.ts +11 -1
- package/dist/src/harness/prompt-cache.js +1 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/harness/types.d.ts +4 -5
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/packages/ash-scaffold/src/channels.js +1 -1
- package/dist/src/public/channels/ash.js +2 -2
- package/dist/src/public/channels/discord/discordChannel.d.ts +1 -2
- package/dist/src/public/channels/discord/discordChannel.js +1 -1
- package/dist/src/public/channels/slack/slackChannel.d.ts +3 -7
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/teams/teamsChannel.d.ts +1 -2
- package/dist/src/public/channels/teams/teamsChannel.js +1 -1
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +1 -2
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/definitions/instructions.d.ts +7 -12
- package/dist/src/public/definitions/skill.js +1 -1
- package/dist/src/shared/dynamic-tool-definition.d.ts +20 -0
- package/dist/src/shared/dynamic-tool-definition.js +1 -1
- package/package.json +1 -1
|
@@ -11,6 +11,14 @@ type ToolContext = SessionContext;
|
|
|
11
11
|
*/
|
|
12
12
|
export type DynamicToolEventName = Extract<HandleMessageStreamEvent["type"], "session.started" | "turn.started" | "step.started">;
|
|
13
13
|
export declare const ALLOWED_DYNAMIC_TOOL_EVENTS: ReadonlySet<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Instructions and skills are restricted to session/turn boundaries.
|
|
16
|
+
* They contribute to the system prompt, which is the most
|
|
17
|
+
* cache-sensitive position in the Anthropic wire format. Keeping them
|
|
18
|
+
* stable across steps within a turn maximizes cache hits.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ALLOWED_DYNAMIC_INSTRUCTION_EVENTS: ReadonlySet<string>;
|
|
21
|
+
export declare const ALLOWED_DYNAMIC_SKILL_EVENTS: ReadonlySet<string>;
|
|
14
22
|
/**
|
|
15
23
|
* Context passed to a dynamic resolver's event handler (tools and skills).
|
|
16
24
|
*
|
|
@@ -118,4 +126,16 @@ export declare const INSTRUCTIONS_BRAND: unique symbol;
|
|
|
118
126
|
* properly wrapped.
|
|
119
127
|
*/
|
|
120
128
|
export declare function isBrandedInstructionsEntry(value: unknown): boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Symbol-based brand stamped by `defineSkill` on every entry. Invisible
|
|
131
|
+
* in IntelliSense but checked at runtime to detect single-entry vs
|
|
132
|
+
* map-of-entries return shapes in dynamic skill resolvers.
|
|
133
|
+
*/
|
|
134
|
+
export declare const SKILL_BRAND: unique symbol;
|
|
135
|
+
/**
|
|
136
|
+
* Returns true if `value` was stamped by `defineSkill` (has the brand
|
|
137
|
+
* symbol). Used to detect single entry vs map of entries, and to
|
|
138
|
+
* validate that entries are properly wrapped.
|
|
139
|
+
*/
|
|
140
|
+
export declare function isBrandedSkillEntry(value: unknown): boolean;
|
|
121
141
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const ALLOWED_DYNAMIC_TOOL_EVENTS=new Set([`session.started`,`turn.started`,`step.started`]),DYNAMIC_SENTINEL_KIND=`ash:dynamic`;function isDynamicSentinel(e){return typeof e==`object`&&!!e&&e.kind===`ash:dynamic`}const TOOL_BRAND=Symbol.for(`ash:tool-brand`);function isBrandedToolEntry(e){return typeof e==`object`&&!!e&&e[TOOL_BRAND]===!0}const INSTRUCTIONS_BRAND=Symbol.for(`ash:instructions-brand`);function isBrandedInstructionsEntry(e){return typeof e==`object`&&!!e&&e[INSTRUCTIONS_BRAND]===!0}export{ALLOWED_DYNAMIC_TOOL_EVENTS,DYNAMIC_SENTINEL_KIND,INSTRUCTIONS_BRAND,TOOL_BRAND,isBrandedInstructionsEntry,isBrandedToolEntry,isDynamicSentinel};
|
|
1
|
+
const ALLOWED_DYNAMIC_TOOL_EVENTS=new Set([`session.started`,`turn.started`,`step.started`]),ALLOWED_DYNAMIC_INSTRUCTION_EVENTS=new Set([`session.started`,`turn.started`]),ALLOWED_DYNAMIC_SKILL_EVENTS=new Set([`session.started`,`turn.started`]),DYNAMIC_SENTINEL_KIND=`ash:dynamic`;function isDynamicSentinel(e){return typeof e==`object`&&!!e&&e.kind===`ash:dynamic`}const TOOL_BRAND=Symbol.for(`ash:tool-brand`);function isBrandedToolEntry(e){return typeof e==`object`&&!!e&&e[TOOL_BRAND]===!0}const INSTRUCTIONS_BRAND=Symbol.for(`ash:instructions-brand`);function isBrandedInstructionsEntry(e){return typeof e==`object`&&!!e&&e[INSTRUCTIONS_BRAND]===!0}const SKILL_BRAND=Symbol.for(`ash:skill-brand`);function isBrandedSkillEntry(e){return typeof e==`object`&&!!e&&e[SKILL_BRAND]===!0}export{ALLOWED_DYNAMIC_INSTRUCTION_EVENTS,ALLOWED_DYNAMIC_SKILL_EVENTS,ALLOWED_DYNAMIC_TOOL_EVENTS,DYNAMIC_SENTINEL_KIND,INSTRUCTIONS_BRAND,SKILL_BRAND,TOOL_BRAND,isBrandedInstructionsEntry,isBrandedSkillEntry,isBrandedToolEntry,isDynamicSentinel};
|