@ai-sdk/harness-pi 1.0.135 → 1.0.136
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 +9 -0
- package/dist/index.d.ts +128 -123
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2935 -3538
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @ai-sdk/harness-pi
|
|
2
2
|
|
|
3
|
+
## 1.0.136
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ede5b89: chore: migrate package builds from tsup to tsdown
|
|
8
|
+
- Updated dependencies [ede5b89]
|
|
9
|
+
- @ai-sdk/harness@1.0.134
|
|
10
|
+
- @ai-sdk/provider-utils@5.0.52
|
|
11
|
+
|
|
3
12
|
## 1.0.135
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { CreateModelRuntimeOptions,
|
|
4
|
-
|
|
1
|
+
import { HarnessV1, HarnessV1Authentication, HarnessV1BuiltinTool } from "@ai-sdk/harness";
|
|
2
|
+
import "@ai-sdk/provider-utils";
|
|
3
|
+
import { CreateModelRuntimeOptions, ExtensionFactory, ModelRegistry, ModelRuntime, ProviderConfig } from "@earendil-works/pi-coding-agent";
|
|
4
|
+
//#region src/pi-auth.d.ts
|
|
5
5
|
/** Persistent credential storage consumed by Pi's model runtime. */
|
|
6
6
|
type PiCredentialStore = NonNullable<CreateModelRuntimeOptions['credentials']>;
|
|
7
7
|
/**
|
|
@@ -9,136 +9,141 @@ type PiCredentialStore = NonNullable<CreateModelRuntimeOptions['credentials']>;
|
|
|
9
9
|
* explicit gateway, then OpenAI / Anthropic / custom environment variables).
|
|
10
10
|
*/
|
|
11
11
|
type PiAuthenticationMode = HarnessV1Authentication<'openai' | 'anthropic' | 'custom'>;
|
|
12
|
-
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/pi-session.d.ts
|
|
13
14
|
type PiThinkingLevel = 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
14
|
-
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/pi-harness.d.ts
|
|
15
17
|
/**
|
|
16
18
|
* Configuration knobs for `createPi`. Pi runs as an in-process Node library
|
|
17
19
|
* (no bridge), so there's no `port` or `startupTimeoutMs` to set.
|
|
18
20
|
*/
|
|
19
21
|
type PiHarnessSettings = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
22
|
+
/** Where Pi sources API keys / gateway credentials from. */
|
|
23
|
+
readonly auth?: PiAuthenticationMode;
|
|
24
|
+
/**
|
|
25
|
+
* Application-owned credential storage for Pi's model runtime. When set,
|
|
26
|
+
* this replaces Pi's file-backed auth.json credential storage.
|
|
27
|
+
*/
|
|
28
|
+
readonly credentials?: PiCredentialStore;
|
|
29
|
+
/**
|
|
30
|
+
* Whether a suspended turn may reuse its live Pi session in this process.
|
|
31
|
+
* Disable this in stateless or multi-replica applications so every request
|
|
32
|
+
* restores from persisted lifecycle state with the current settings.
|
|
33
|
+
*
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
readonly reattachInProcess?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Explicit Pi provider configurations keyed by provider id. Use this to
|
|
39
|
+
* register custom models and their API protocol without coupling model
|
|
40
|
+
* metadata to authentication environment variables.
|
|
41
|
+
*/
|
|
42
|
+
readonly providers?: Readonly<Record<string, ProviderConfig>>;
|
|
43
|
+
/**
|
|
44
|
+
* Pi's extended-thinking budget level. Maps directly to the SDK's
|
|
45
|
+
* `thinkingLevel` option on `createAgentSession`.
|
|
46
|
+
*/
|
|
47
|
+
readonly thinkingLevel?: PiThinkingLevel;
|
|
48
|
+
/**
|
|
49
|
+
* Directory holding Pi's global agent config (auth.json, models.json,
|
|
50
|
+
* settings.json). When omitted, native subscription auth is discovered from
|
|
51
|
+
* Pi's default agent directory while model and general settings remain
|
|
52
|
+
* isolated per session.
|
|
53
|
+
*/
|
|
54
|
+
readonly agentDir?: string;
|
|
55
|
+
/**
|
|
56
|
+
* MCP server definitions keyed by server name. Each definition uses the
|
|
57
|
+
* underlying runtime's native MCP server configuration format.
|
|
58
|
+
*/
|
|
59
|
+
readonly mcpServers?: Record<string, unknown>;
|
|
60
|
+
/**
|
|
61
|
+
* Trusted inline Pi extensions loaded for each harness session.
|
|
62
|
+
*
|
|
63
|
+
* Filesystem-discovered user and project extensions remain disabled.
|
|
64
|
+
*/
|
|
65
|
+
readonly extensionFactories?: ReadonlyArray<ExtensionFactory>;
|
|
64
66
|
};
|
|
65
67
|
declare const PI_BUILTIN_TOOLS: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
68
|
+
readonly read: HarnessV1BuiltinTool<{
|
|
69
|
+
file_path: string;
|
|
70
|
+
offset?: number | undefined;
|
|
71
|
+
limit?: number | undefined;
|
|
72
|
+
}, unknown>;
|
|
73
|
+
readonly write: HarnessV1BuiltinTool<{
|
|
74
|
+
file_path: string;
|
|
75
|
+
content: string;
|
|
76
|
+
}, unknown>;
|
|
77
|
+
readonly edit: HarnessV1BuiltinTool<{
|
|
78
|
+
file_path: string;
|
|
79
|
+
old_string: string;
|
|
80
|
+
new_string: string;
|
|
81
|
+
}, unknown>;
|
|
82
|
+
readonly bash: HarnessV1BuiltinTool<{
|
|
83
|
+
command: string;
|
|
84
|
+
timeout?: number | undefined;
|
|
85
|
+
}, unknown>;
|
|
86
|
+
readonly grep: HarnessV1BuiltinTool<{
|
|
87
|
+
pattern: string;
|
|
88
|
+
path?: string | undefined;
|
|
89
|
+
glob?: string | undefined;
|
|
90
|
+
ignoreCase?: boolean | undefined;
|
|
91
|
+
literal?: boolean | undefined;
|
|
92
|
+
context?: number | undefined;
|
|
93
|
+
limit?: number | undefined;
|
|
94
|
+
}, unknown>;
|
|
95
|
+
readonly glob: HarnessV1BuiltinTool<{
|
|
96
|
+
pattern: string;
|
|
97
|
+
path?: string | undefined;
|
|
98
|
+
limit?: number | undefined;
|
|
99
|
+
}, unknown>;
|
|
100
|
+
readonly ls: HarnessV1BuiltinTool;
|
|
99
101
|
};
|
|
100
|
-
declare function createPi(settings?: PiHarnessSettings): HarnessV1<typeof PI_BUILTIN_TOOLS>;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
export declare function createPi(settings?: PiHarnessSettings): HarnessV1<typeof PI_BUILTIN_TOOLS>;
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/version.d.ts
|
|
105
|
+
export declare const VERSION: string;
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/index.d.ts
|
|
104
108
|
/**
|
|
105
109
|
* Default `pi` harness instance with no overrides — suitable for the common
|
|
106
110
|
* case where Pi's defaults are fine. Equivalent to `createPi()`.
|
|
107
111
|
*/
|
|
108
|
-
declare const pi:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
112
|
+
export declare const pi: import("@ai-sdk/harness").HarnessV1<{
|
|
113
|
+
readonly read: import("@ai-sdk/harness").HarnessV1BuiltinTool<{
|
|
114
|
+
file_path: string;
|
|
115
|
+
offset?: number | undefined;
|
|
116
|
+
limit?: number | undefined;
|
|
117
|
+
}, unknown>;
|
|
118
|
+
readonly write: import("@ai-sdk/harness").HarnessV1BuiltinTool<{
|
|
119
|
+
file_path: string;
|
|
120
|
+
content: string;
|
|
121
|
+
}, unknown>;
|
|
122
|
+
readonly edit: import("@ai-sdk/harness").HarnessV1BuiltinTool<{
|
|
123
|
+
file_path: string;
|
|
124
|
+
old_string: string;
|
|
125
|
+
new_string: string;
|
|
126
|
+
}, unknown>;
|
|
127
|
+
readonly bash: import("@ai-sdk/harness").HarnessV1BuiltinTool<{
|
|
128
|
+
command: string;
|
|
129
|
+
timeout?: number | undefined;
|
|
130
|
+
}, unknown>;
|
|
131
|
+
readonly grep: import("@ai-sdk/harness").HarnessV1BuiltinTool<{
|
|
132
|
+
pattern: string;
|
|
133
|
+
path?: string | undefined;
|
|
134
|
+
glob?: string | undefined;
|
|
135
|
+
ignoreCase?: boolean | undefined;
|
|
136
|
+
literal?: boolean | undefined;
|
|
137
|
+
context?: number | undefined;
|
|
138
|
+
limit?: number | undefined;
|
|
139
|
+
}, unknown>;
|
|
140
|
+
readonly glob: import("@ai-sdk/harness").HarnessV1BuiltinTool<{
|
|
141
|
+
pattern: string;
|
|
142
|
+
path?: string | undefined;
|
|
143
|
+
limit?: number | undefined;
|
|
144
|
+
}, unknown>;
|
|
145
|
+
readonly ls: import("@ai-sdk/harness").HarnessV1BuiltinTool;
|
|
142
146
|
}>;
|
|
143
|
-
|
|
144
|
-
export {
|
|
147
|
+
//#endregion
|
|
148
|
+
export type { PiAuthenticationMode, PiCredentialStore, PiHarnessSettings };
|
|
149
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/pi-auth.ts","../src/pi-session.ts","../src/pi-harness.ts","../src/version.ts","../src/index.ts"],"mappings":";;;;;KAeY,oBAAoB,YAC9B;;;;;KAsBU,uBAAuB;;;KC4LvB;;;;;;;KCzMA;;WAED,OAAO;;;;;WAKP,cAAc;;;;;;;;WAQd;;;;;;WAMA,YAAY,SAAS,eAAe;;;;;WAKpC,gBAAgB;;;;;;;WAOhB;;;;;WAKA,aAAa;;;;;;WAMb,qBAAqB,cAAc;;cAGxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA2EC,IAAA;;wBAGS,SACd,WAAU,oBACT,iBAAiB;;;qBCtJP;;;;;;;qBCIA,8BAAE"}
|