@keystrokehq/keystroke 0.1.33 → 0.1.34
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/README.md +2 -0
- package/dist/action.d.cts +2 -2
- package/dist/action.d.mts +2 -2
- package/dist/agent-types.d.cts +1 -1
- package/dist/agent-types.d.mts +1 -1
- package/dist/agent.cjs +8 -11
- package/dist/agent.cjs.map +1 -1
- package/dist/agent.d.cts +4 -4
- package/dist/agent.d.mts +4 -4
- package/dist/agent.mjs +8 -11
- package/dist/agent.mjs.map +1 -1
- package/dist/app.d.cts +2 -2
- package/dist/app.d.mts +2 -2
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/credentials.d.cts +1 -1
- package/dist/credentials.d.mts +1 -1
- package/dist/{index-BIEIqsqn.d.mts → index-B8TghKBH.d.cts} +2 -2
- package/dist/{index-aryys7z5.d.cts.map → index-B8TghKBH.d.cts.map} +1 -1
- package/dist/{index-BWOPtMGc.d.mts → index-BEfdZB3v.d.mts} +2 -2
- package/dist/{index-JFo1zRHh.d.cts.map → index-BEfdZB3v.d.mts.map} +1 -1
- package/dist/{index-DD1dNpCS.d.mts → index-BRWAzePY.d.mts} +6 -6
- package/dist/{index-DD1dNpCS.d.mts.map → index-BRWAzePY.d.mts.map} +1 -1
- package/dist/{index-Doe9BY28.d.cts → index-BeMWb72a.d.cts} +2 -2
- package/dist/{index-ClbddHis.d.mts.map → index-BeMWb72a.d.cts.map} +1 -1
- package/dist/{index-aryys7z5.d.cts → index-Bu4y6idD.d.mts} +2 -2
- package/dist/{index-BIEIqsqn.d.mts.map → index-Bu4y6idD.d.mts.map} +1 -1
- package/dist/{index-BboH3db0.d.mts → index-CRXEFP7Z.d.mts} +3 -3
- package/dist/{index-BboH3db0.d.mts.map → index-CRXEFP7Z.d.mts.map} +1 -1
- package/dist/{index-B620A78g.d.cts → index-CZlM_i9j.d.cts} +6 -6
- package/dist/{index-B620A78g.d.cts.map → index-CZlM_i9j.d.cts.map} +1 -1
- package/dist/{index-DHLs5qPc.d.cts → index-CnInmEEd.d.cts} +4 -4
- package/dist/{index-DHLs5qPc.d.cts.map → index-CnInmEEd.d.cts.map} +1 -1
- package/dist/{index-DHLs5qPc.d.mts → index-CnInmEEd.d.mts} +4 -4
- package/dist/{index-DHLs5qPc.d.mts.map → index-CnInmEEd.d.mts.map} +1 -1
- package/dist/{index-DHCs9z3O.d.cts → index-D7xFWnPN.d.cts} +3 -3
- package/dist/{index-DHCs9z3O.d.cts.map → index-D7xFWnPN.d.cts.map} +1 -1
- package/dist/{index-ClbddHis.d.mts → index-DfwLjqnt.d.mts} +2 -2
- package/dist/{index-Doe9BY28.d.cts.map → index-DfwLjqnt.d.mts.map} +1 -1
- package/dist/{index-JFo1zRHh.d.cts → index-DnVlmAdf.d.cts} +2 -2
- package/dist/{index-BWOPtMGc.d.mts.map → index-DnVlmAdf.d.cts.map} +1 -1
- package/dist/sandbox.d.cts +2 -2
- package/dist/sandbox.d.mts +2 -2
- package/dist/trigger.d.cts +3 -3
- package/dist/trigger.d.mts +3 -3
- package/dist/workflow.d.cts +2 -2
- package/dist/workflow.d.mts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,6 +19,8 @@ Public authoring facade for [keystroke](../../README.md) user projects. Re-expor
|
|
|
19
19
|
|
|
20
20
|
`zod` is a **peer dependency** of `@keystrokehq/keystroke` — install it in your project and import from `"zod"` in actions, agents, and credentials. Keystroke does not re-export or bundle it.
|
|
21
21
|
|
|
22
|
+
`@keystrokehq/cli` bundles local dev tooling — `keystroke lint`, `typecheck`, and `test` — plus oxlint, TypeScript, and vitest configs. Projects do not declare those separately.
|
|
23
|
+
|
|
22
24
|
## Imports
|
|
23
25
|
|
|
24
26
|
```typescript
|
package/dist/action.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { D as credential, N as normalizeCredentialList, O as credentialInputSchema, P as toCredentialRequirement, _ as DefineStaticCredentialInput, a as CREDENTIAL_SCOPE_TYPES, c as CredentialAuthKind, d as CredentialList, f as CredentialRequirement, g as DefineOAuthCredentialInput, h as DefineCredentialInput, j as isCredentialInput, k as defineCredential, m as CredentialScopeType, o as Credential, u as CredentialInput, w as ResolvedCredentials, y as NormalizeCredential } from "./index-
|
|
2
|
-
import { C as registerProjectScopeGetter, D as runWithMcpCredentialContext, E as runOutsideActionExecution, O as runWithRunSignal, S as isWithinActionExecution, T as resolveActionTool, _ as getRegisteredProjectScopeId, a as McpCredentialContext, b as isAction, c as StepInvocation, d as actionCoreSchema, f as createStepInvocation, g as getRegisteredMcpCredentialContext, h as getActionCredentialRequirements, i as AgentRunOptions, k as runWithinActionExecution, l as WorkflowActionDefinition, m as executeAction, n as ActionDefinition, o as ResolveActionCredentialsFn, p as defineAction, r as ActionDefinitionInput, s as ResolveActionToolOptions, t as ActionCredentialConsumer, u as WorkflowRunHandle, v as getRunSignal, w as registerWorkflowRunGetter, x as isStepInvocation, y as getWorkflowRunHandle } from "./index-
|
|
1
|
+
import { D as credential, N as normalizeCredentialList, O as credentialInputSchema, P as toCredentialRequirement, _ as DefineStaticCredentialInput, a as CREDENTIAL_SCOPE_TYPES, c as CredentialAuthKind, d as CredentialList, f as CredentialRequirement, g as DefineOAuthCredentialInput, h as DefineCredentialInput, j as isCredentialInput, k as defineCredential, m as CredentialScopeType, o as Credential, u as CredentialInput, w as ResolvedCredentials, y as NormalizeCredential } from "./index-CnInmEEd.cjs";
|
|
2
|
+
import { C as registerProjectScopeGetter, D as runWithMcpCredentialContext, E as runOutsideActionExecution, O as runWithRunSignal, S as isWithinActionExecution, T as resolveActionTool, _ as getRegisteredProjectScopeId, a as McpCredentialContext, b as isAction, c as StepInvocation, d as actionCoreSchema, f as createStepInvocation, g as getRegisteredMcpCredentialContext, h as getActionCredentialRequirements, i as AgentRunOptions, k as runWithinActionExecution, l as WorkflowActionDefinition, m as executeAction, n as ActionDefinition, o as ResolveActionCredentialsFn, p as defineAction, r as ActionDefinitionInput, s as ResolveActionToolOptions, t as ActionCredentialConsumer, u as WorkflowRunHandle, v as getRunSignal, w as registerWorkflowRunGetter, x as isStepInvocation, y as getWorkflowRunHandle } from "./index-BeMWb72a.cjs";
|
|
3
3
|
export { type ActionCredentialConsumer, type ActionDefinition, type ActionDefinitionInput, type AgentRunOptions, CREDENTIAL_SCOPE_TYPES, type Credential, type CredentialAuthKind, type CredentialInput, type CredentialList, type CredentialRequirement, type CredentialScopeType, type DefineCredentialInput, type DefineOAuthCredentialInput, type DefineStaticCredentialInput, type McpCredentialContext, type NormalizeCredential, type ResolveActionCredentialsFn, type ResolveActionToolOptions, type ResolvedCredentials, type StepInvocation, type WorkflowActionDefinition, type WorkflowRunHandle, actionCoreSchema, createStepInvocation, credential, credentialInputSchema, defineAction, defineCredential, executeAction, getActionCredentialRequirements, getRegisteredMcpCredentialContext, getRegisteredProjectScopeId, getRunSignal, getWorkflowRunHandle, isAction, isCredentialInput, isStepInvocation, isWithinActionExecution, normalizeCredentialList, registerProjectScopeGetter, registerWorkflowRunGetter, resolveActionTool, runOutsideActionExecution, runWithMcpCredentialContext, runWithRunSignal, runWithinActionExecution, toCredentialRequirement };
|
package/dist/action.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { D as credential, N as normalizeCredentialList, O as credentialInputSchema, P as toCredentialRequirement, _ as DefineStaticCredentialInput, a as CREDENTIAL_SCOPE_TYPES, c as CredentialAuthKind, d as CredentialList, f as CredentialRequirement, g as DefineOAuthCredentialInput, h as DefineCredentialInput, j as isCredentialInput, k as defineCredential, m as CredentialScopeType, o as Credential, u as CredentialInput, w as ResolvedCredentials, y as NormalizeCredential } from "./index-
|
|
2
|
-
import { C as registerProjectScopeGetter, D as runWithMcpCredentialContext, E as runOutsideActionExecution, O as runWithRunSignal, S as isWithinActionExecution, T as resolveActionTool, _ as getRegisteredProjectScopeId, a as McpCredentialContext, b as isAction, c as StepInvocation, d as actionCoreSchema, f as createStepInvocation, g as getRegisteredMcpCredentialContext, h as getActionCredentialRequirements, i as AgentRunOptions, k as runWithinActionExecution, l as WorkflowActionDefinition, m as executeAction, n as ActionDefinition, o as ResolveActionCredentialsFn, p as defineAction, r as ActionDefinitionInput, s as ResolveActionToolOptions, t as ActionCredentialConsumer, u as WorkflowRunHandle, v as getRunSignal, w as registerWorkflowRunGetter, x as isStepInvocation, y as getWorkflowRunHandle } from "./index-
|
|
1
|
+
import { D as credential, N as normalizeCredentialList, O as credentialInputSchema, P as toCredentialRequirement, _ as DefineStaticCredentialInput, a as CREDENTIAL_SCOPE_TYPES, c as CredentialAuthKind, d as CredentialList, f as CredentialRequirement, g as DefineOAuthCredentialInput, h as DefineCredentialInput, j as isCredentialInput, k as defineCredential, m as CredentialScopeType, o as Credential, u as CredentialInput, w as ResolvedCredentials, y as NormalizeCredential } from "./index-CnInmEEd.mjs";
|
|
2
|
+
import { C as registerProjectScopeGetter, D as runWithMcpCredentialContext, E as runOutsideActionExecution, O as runWithRunSignal, S as isWithinActionExecution, T as resolveActionTool, _ as getRegisteredProjectScopeId, a as McpCredentialContext, b as isAction, c as StepInvocation, d as actionCoreSchema, f as createStepInvocation, g as getRegisteredMcpCredentialContext, h as getActionCredentialRequirements, i as AgentRunOptions, k as runWithinActionExecution, l as WorkflowActionDefinition, m as executeAction, n as ActionDefinition, o as ResolveActionCredentialsFn, p as defineAction, r as ActionDefinitionInput, s as ResolveActionToolOptions, t as ActionCredentialConsumer, u as WorkflowRunHandle, v as getRunSignal, w as registerWorkflowRunGetter, x as isStepInvocation, y as getWorkflowRunHandle } from "./index-DfwLjqnt.mjs";
|
|
3
3
|
export { type ActionCredentialConsumer, type ActionDefinition, type ActionDefinitionInput, type AgentRunOptions, CREDENTIAL_SCOPE_TYPES, type Credential, type CredentialAuthKind, type CredentialInput, type CredentialList, type CredentialRequirement, type CredentialScopeType, type DefineCredentialInput, type DefineOAuthCredentialInput, type DefineStaticCredentialInput, type McpCredentialContext, type NormalizeCredential, type ResolveActionCredentialsFn, type ResolveActionToolOptions, type ResolvedCredentials, type StepInvocation, type WorkflowActionDefinition, type WorkflowRunHandle, actionCoreSchema, createStepInvocation, credential, credentialInputSchema, defineAction, defineCredential, executeAction, getActionCredentialRequirements, getRegisteredMcpCredentialContext, getRegisteredProjectScopeId, getRunSignal, getWorkflowRunHandle, isAction, isCredentialInput, isStepInvocation, isWithinActionExecution, normalizeCredentialList, registerProjectScopeGetter, registerWorkflowRunGetter, resolveActionTool, runOutsideActionExecution, runWithMcpCredentialContext, runWithRunSignal, runWithinActionExecution, toCredentialRequirement };
|
package/dist/agent-types.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as AgentToolUpdateCallback, n as AgentToolParameters, r as AgentToolResult, t as AgentTool } from "./index-
|
|
1
|
+
import { i as AgentToolUpdateCallback, n as AgentToolParameters, r as AgentToolResult, t as AgentTool } from "./index-CnInmEEd.cjs";
|
|
2
2
|
import { a as UIMessage } from "./index-DRrVeTcD.cjs";
|
|
3
3
|
import { n as AgentStreamEvent, r as ThinkingLevel, t as AgentMessage } from "./types-ZU829C7A.cjs";
|
|
4
4
|
export { AgentMessage, AgentStreamEvent, type AgentTool, type AgentToolParameters, type AgentToolResult, type AgentToolUpdateCallback, ThinkingLevel, type UIMessage };
|
package/dist/agent-types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as AgentToolUpdateCallback, n as AgentToolParameters, r as AgentToolResult, t as AgentTool } from "./index-
|
|
1
|
+
import { i as AgentToolUpdateCallback, n as AgentToolParameters, r as AgentToolResult, t as AgentTool } from "./index-CnInmEEd.mjs";
|
|
2
2
|
import { a as UIMessage } from "./index-laoo2SkM.mjs";
|
|
3
3
|
import { n as AgentStreamEvent, r as ThinkingLevel, t as AgentMessage } from "./types-DpYxSJ5x.mjs";
|
|
4
4
|
export { AgentMessage, AgentStreamEvent, type AgentTool, type AgentToolParameters, type AgentToolResult, type AgentToolUpdateCallback, ThinkingLevel, type UIMessage };
|
package/dist/agent.cjs
CHANGED
|
@@ -1296,7 +1296,6 @@ function isWithinAgentPromptExecution() {
|
|
|
1296
1296
|
return executingAgentPrompt.getStore() === true;
|
|
1297
1297
|
}
|
|
1298
1298
|
const TITLE_MODEL_ID = "deepseek/deepseek-v4-flash";
|
|
1299
|
-
const TitleOutputSchema = zod.z.object({ title: zod.z.string().max(120).describe("A short, clear chat title in title case; specific, no quotes or emojis") });
|
|
1300
1299
|
const TITLE_SYSTEM_PROMPT = [
|
|
1301
1300
|
"You are an expert chat title generator.",
|
|
1302
1301
|
"",
|
|
@@ -1311,16 +1310,19 @@ const TITLE_SYSTEM_PROMPT = [
|
|
|
1311
1310
|
"- Keep it under 120 characters when possible",
|
|
1312
1311
|
"- Do not use quotes or emojis",
|
|
1313
1312
|
"",
|
|
1313
|
+
"CRITICAL: Respond with ONLY the title text and nothing else. No reasoning, no explanation,",
|
|
1314
|
+
"no preamble, no labels, no quotes — just the raw title on a single line.",
|
|
1315
|
+
"",
|
|
1314
1316
|
"Examples:",
|
|
1315
1317
|
"",
|
|
1316
1318
|
"User: How do I set up a new Next.js project with TypeScript?",
|
|
1317
|
-
"
|
|
1319
|
+
"Setting Up Next.js Project with TypeScript",
|
|
1318
1320
|
"",
|
|
1319
1321
|
"User: Help me debug this React hook that's causing infinite re-renders. Here's the code...",
|
|
1320
|
-
"
|
|
1322
|
+
"Debugging Infinite Re-render in React Hook",
|
|
1321
1323
|
"",
|
|
1322
1324
|
"User: Write a cold email sequence for fundraising from YC alums",
|
|
1323
|
-
"
|
|
1325
|
+
"YC Alumni Fundraising Cold Email Sequence"
|
|
1324
1326
|
].join("\n");
|
|
1325
1327
|
const MAX_INPUT_CHARS = 2e3;
|
|
1326
1328
|
const MAX_TITLE_CHARS = 120;
|
|
@@ -1333,19 +1335,14 @@ function normalizeTitle(raw) {
|
|
|
1333
1335
|
async function generateSessionTitle(message) {
|
|
1334
1336
|
const input = message.trim();
|
|
1335
1337
|
if (!input) return null;
|
|
1336
|
-
const {
|
|
1338
|
+
const { text } = await require_dist$2.generateText({
|
|
1337
1339
|
model: (await resolveAgentModel(TITLE_MODEL_ID)).languageModel,
|
|
1338
1340
|
system: TITLE_SYSTEM_PROMPT,
|
|
1339
1341
|
prompt: input.slice(0, MAX_INPUT_CHARS),
|
|
1340
|
-
output: require_dist$2.output_exports.object({
|
|
1341
|
-
name: "ChatTitle",
|
|
1342
|
-
description: "Short chat session title",
|
|
1343
|
-
schema: TitleOutputSchema
|
|
1344
|
-
}),
|
|
1345
1342
|
maxOutputTokens: 512,
|
|
1346
1343
|
reasoning: "minimal"
|
|
1347
1344
|
});
|
|
1348
|
-
return
|
|
1345
|
+
return text ? normalizeTitle(text) : null;
|
|
1349
1346
|
}
|
|
1350
1347
|
/**
|
|
1351
1348
|
* Generate and persist a session title from the opening message. Never throws — titling is a
|