@liy/agent-runner 0.2.1 → 0.2.4
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 +5 -5
- package/dist/bin/agent-runner.js +49 -32
- package/dist/bin/agent-runner.js.map +3 -3
- package/dist/index.js +49 -32
- package/dist/index.js.map +3 -3
- package/dist/prompt.d.ts +10 -0
- package/dist/prompts/execute-task.md +26 -0
- package/dist/runner.d.ts +1 -9
- package/package.json +1 -1
package/dist/prompt.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ExecuteTaskRunnerSpec } from "@liy/mote-core";
|
|
2
|
+
/**
|
|
3
|
+
* Build the instruction prompt passed to the selected Task Agent harness.
|
|
4
|
+
*
|
|
5
|
+
* @param spec - Task spec for one task.
|
|
6
|
+
* @returns Prompt text sent to harness stdin.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare function buildHarnessPrompt(spec: ExecuteTaskRunnerSpec): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
You are the senior data analyst.
|
|
2
|
+
|
|
3
|
+
Use only the configured model and tool endpoints. An access token may be present temporarily; never log it, persist it, print it, or write it to artifacts.
|
|
4
|
+
Workspace directory: {{workspaceDir}}
|
|
5
|
+
Completion file path: {{completionFile}}
|
|
6
|
+
Artifact root directory: {{artifactRoot}}
|
|
7
|
+
|
|
8
|
+
Task
|
|
9
|
+
Title: {{taskTitle}}
|
|
10
|
+
{{taskContext}}
|
|
11
|
+
|
|
12
|
+
Intent
|
|
13
|
+
{{intentJson}}
|
|
14
|
+
|
|
15
|
+
User Query
|
|
16
|
+
{{userQueryJson}}
|
|
17
|
+
|
|
18
|
+
Approved Tools
|
|
19
|
+
{{approvedToolsJson}}
|
|
20
|
+
|
|
21
|
+
Artifact contract
|
|
22
|
+
- Allocate a UUID directory under artifacts for each artifact.
|
|
23
|
+
- Write artifact.json in that directory using the TaskArtifactDraft contract.
|
|
24
|
+
- Dataset artifacts must put schema and preview rows in artifact.json and the full CSV in data.csv.
|
|
25
|
+
- When the task reaches terminal point: task finished/canceled. Write terminal status to the `completion file path` with status, summary, and artifactIds. Then notify host that task has ended.
|
|
26
|
+
- Never include secrets, tokens, provider keys, DB credentials, or OSS credentials in artifacts, logs, or completion.
|
package/dist/runner.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ExecuteTaskCompletionPayload, type ExecuteTaskRunnerSpec } from "@liy/mote-core";
|
|
2
2
|
import { type AgentRunnerConfig, type ResolvedAgentRunnerHarnessConfig } from "./config.js";
|
|
3
|
+
export { buildHarnessPrompt } from "./prompt.js";
|
|
3
4
|
/**
|
|
4
5
|
* Optional runtime inputs for one agent-runner invocation.
|
|
5
6
|
*
|
|
@@ -48,15 +49,6 @@ export declare function createHarnessEnvironment(input: {
|
|
|
48
49
|
harness: ResolvedAgentRunnerHarnessConfig;
|
|
49
50
|
env?: NodeJS.ProcessEnv;
|
|
50
51
|
}): Record<string, string>;
|
|
51
|
-
/**
|
|
52
|
-
* Build the instruction prompt passed to the selected JSONL harness.
|
|
53
|
-
*
|
|
54
|
-
* @param spec - Task spec for one task.
|
|
55
|
-
* @returns Prompt text sent to harness stdin.
|
|
56
|
-
*
|
|
57
|
-
* @public
|
|
58
|
-
*/
|
|
59
|
-
export declare function buildHarnessPrompt(spec: ExecuteTaskRunnerSpec): string;
|
|
60
52
|
/**
|
|
61
53
|
* Read a runner spec JSON file from disk.
|
|
62
54
|
*
|