@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 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 * as _ai_sdk_harness from '@ai-sdk/harness';
2
- import { HarnessV1Authentication, HarnessV1, HarnessV1BuiltinTool } from '@ai-sdk/harness';
3
- import { CreateModelRuntimeOptions, ProviderConfig, ExtensionFactory } from '@earendil-works/pi-coding-agent';
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
- /** Where Pi sources API keys / gateway credentials from. */
21
- readonly auth?: PiAuthenticationMode;
22
- /**
23
- * Application-owned credential storage for Pi's model runtime. When set,
24
- * this replaces Pi's file-backed auth.json credential storage.
25
- */
26
- readonly credentials?: PiCredentialStore;
27
- /**
28
- * Whether a suspended turn may reuse its live Pi session in this process.
29
- * Disable this in stateless or multi-replica applications so every request
30
- * restores from persisted lifecycle state with the current settings.
31
- *
32
- * @default true
33
- */
34
- readonly reattachInProcess?: boolean;
35
- /**
36
- * Explicit Pi provider configurations keyed by provider id. Use this to
37
- * register custom models and their API protocol without coupling model
38
- * metadata to authentication environment variables.
39
- */
40
- readonly providers?: Readonly<Record<string, ProviderConfig>>;
41
- /**
42
- * Pi's extended-thinking budget level. Maps directly to the SDK's
43
- * `thinkingLevel` option on `createAgentSession`.
44
- */
45
- readonly thinkingLevel?: PiThinkingLevel;
46
- /**
47
- * Directory holding Pi's global agent config (auth.json, models.json,
48
- * settings.json). When omitted, native subscription auth is discovered from
49
- * Pi's default agent directory while model and general settings remain
50
- * isolated per session.
51
- */
52
- readonly agentDir?: string;
53
- /**
54
- * MCP server definitions keyed by server name. Each definition uses the
55
- * underlying runtime's native MCP server configuration format.
56
- */
57
- readonly mcpServers?: Record<string, unknown>;
58
- /**
59
- * Trusted inline Pi extensions loaded for each harness session.
60
- *
61
- * Filesystem-discovered user and project extensions remain disabled.
62
- */
63
- readonly extensionFactories?: ReadonlyArray<ExtensionFactory>;
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
- readonly read: HarnessV1BuiltinTool<{
67
- file_path: string;
68
- offset?: number | undefined;
69
- limit?: number | undefined;
70
- }, unknown>;
71
- readonly write: HarnessV1BuiltinTool<{
72
- file_path: string;
73
- content: string;
74
- }, unknown>;
75
- readonly edit: HarnessV1BuiltinTool<{
76
- file_path: string;
77
- old_string: string;
78
- new_string: string;
79
- }, unknown>;
80
- readonly bash: HarnessV1BuiltinTool<{
81
- command: string;
82
- timeout?: number | undefined;
83
- }, unknown>;
84
- readonly grep: HarnessV1BuiltinTool<{
85
- pattern: string;
86
- path?: string | undefined;
87
- glob?: string | undefined;
88
- ignoreCase?: boolean | undefined;
89
- literal?: boolean | undefined;
90
- context?: number | undefined;
91
- limit?: number | undefined;
92
- }, unknown>;
93
- readonly glob: HarnessV1BuiltinTool<{
94
- pattern: string;
95
- path?: string | undefined;
96
- limit?: number | undefined;
97
- }, unknown>;
98
- readonly ls: HarnessV1BuiltinTool;
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
- declare const VERSION: string;
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: _ai_sdk_harness.HarnessV1<{
109
- readonly read: _ai_sdk_harness.HarnessV1BuiltinTool<{
110
- file_path: string;
111
- offset?: number | undefined;
112
- limit?: number | undefined;
113
- }, unknown>;
114
- readonly write: _ai_sdk_harness.HarnessV1BuiltinTool<{
115
- file_path: string;
116
- content: string;
117
- }, unknown>;
118
- readonly edit: _ai_sdk_harness.HarnessV1BuiltinTool<{
119
- file_path: string;
120
- old_string: string;
121
- new_string: string;
122
- }, unknown>;
123
- readonly bash: _ai_sdk_harness.HarnessV1BuiltinTool<{
124
- command: string;
125
- timeout?: number | undefined;
126
- }, unknown>;
127
- readonly grep: _ai_sdk_harness.HarnessV1BuiltinTool<{
128
- pattern: string;
129
- path?: string | undefined;
130
- glob?: string | undefined;
131
- ignoreCase?: boolean | undefined;
132
- literal?: boolean | undefined;
133
- context?: number | undefined;
134
- limit?: number | undefined;
135
- }, unknown>;
136
- readonly glob: _ai_sdk_harness.HarnessV1BuiltinTool<{
137
- pattern: string;
138
- path?: string | undefined;
139
- limit?: number | undefined;
140
- }, unknown>;
141
- readonly ls: _ai_sdk_harness.HarnessV1BuiltinTool;
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 { type PiAuthenticationMode, type PiCredentialStore, type PiHarnessSettings, VERSION, createPi, pi };
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"}