pagegraph 0.14.0 → 0.14.1
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/dist/cli.js +3 -3
- package/dist/{dist-B6zg_Z3Z.js → dist-cFoAzruL.js} +2 -2
- package/dist/{dist-B6zg_Z3Z.js.map → dist-cFoAzruL.js.map} +1 -1
- package/dist/{pi-Bvw6J0gh.js → pi-D3mMmYey.js} +26 -16
- package/dist/pi-D3mMmYey.js.map +1 -0
- package/package.json +2 -2
- package/dist/pi-Bvw6J0gh.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as __exportAll$1 } from "./rolldown-runtime-B-lAHAz2.js";
|
|
2
|
-
import { $ as decodeUnknownEffect, A as Defect, Bi as none, Bn as runPromise, C as ConfigProvider, E as Boolean, Fn as provideService, Fr as findErrorOption, G as String$1, H as Number$1, Hn as runSync, K as Struct, L as Literal, Li as isSome, Lr as pretty, Nn as provide$1, Or as isSuccess, Q as Unknown, R as Literals, S as option, T as ArraySchema, Tn as mapError, U as Record, Vi as some, Vn as runPromiseExit, Z as Union, _ as prependUrl, _t as make$1, a as layer$1, b as String$2, c as mapRequest, dn as fn, er as timeoutOption, fr as provide, g as post, gn as gen, h as get, i as normalizeResearchState, jn as orElseSucceed, l as retryTransient, ln as fail, lr as effect, m as bodyJsonUnsafe, n as decodeActionState, ni as format, o as HttpClient, oi as minutes, ot as optional, pn as forEach, q as TaggedError, qn as succeed, r as decodeResearchState, si as seconds, sr as withSpan, t as actionStateJsonSchema, tr as tryPromise, un as flatMap, v as setHeaders, vt as value, w as fromEnv, wn as map, x as all, xi as Service$1, y as Redacted, zi as match } from "./state-BuJP_3Lr.js";
|
|
2
|
+
import { $ as decodeUnknownEffect, A as Defect, Bi as none, Bn as runPromise, C as ConfigProvider, E as Boolean, Fn as provideService, Fr as findErrorOption, G as String$1, H as Number$1, Hn as runSync, K as Struct, L as Literal, Li as isSome, Lr as pretty, Nn as provide$1, Or as isSuccess, Q as Unknown, R as Literals, S as option, T as ArraySchema, Tn as mapError, U as Record, V as NullOr, Vi as some, Vn as runPromiseExit, Z as Union, _ as prependUrl, _t as make$1, a as layer$1, b as String$2, c as mapRequest, dn as fn, er as timeoutOption, fr as provide, g as post, gn as gen, h as get, i as normalizeResearchState, jn as orElseSucceed, l as retryTransient, ln as fail, lr as effect, m as bodyJsonUnsafe, n as decodeActionState, ni as format, o as HttpClient, oi as minutes, ot as optional, pn as forEach, q as TaggedError, qn as succeed, r as decodeResearchState, rn as catch_, si as seconds, sr as withSpan, t as actionStateJsonSchema, tr as tryPromise, un as flatMap, v as setHeaders, vt as value, w as fromEnv, wn as map, x as all, xi as Service$1, y as Redacted, zi as match } from "./state-BuJP_3Lr.js";
|
|
3
3
|
import { a as ANTHROPIC_OAUTH_TOKEN_ENV, c as ANTHROPIC_WORKSPACE_ID_ENV, i as ANTHROPIC_IDENTITY_TOKEN_FILE_ENV, l as findEnvKeys, n as ANTHROPIC_AUTH_TOKEN_ENV, o as ANTHROPIC_ORGANIZATION_ID_ENV, r as ANTHROPIC_FEDERATION_RULE_ID_ENV, s as ANTHROPIC_SERVICE_ACCOUNT_ID_ENV, t as ANTHROPIC_API_KEY_ENV, u as getEnvApiKey } from "./env-api-keys-C-OA0yM-.js";
|
|
4
4
|
import { D as lazyApi, _ as normalizeContext, b as toToolDeclaration, d as getCurrentTools, i as createProvider, l as getCurrentSystemMessage, m as getToolStateChanges, r as createModels, s as createInitialSystemMessage, u as getCurrentSystemPrompt } from "./models-DcT5qOEL.js";
|
|
5
|
-
import { $ as Ref$1, A as Literal$1, At as IsNumber$1, B as Intersect, Bt as SomeAll$1, C as Number$2, Ct as IsInteger$1, D as IsLiteralBoolean, Dt as IsMinLength$2, E as IsLiteralBigInt, Et as IsMaxLength$2, F as IsBigInt$2, Ft as IsUndefined$1, G as IsCyclic, H as IsEnum$1, I as IsCodec, It as IsUnsafePropertyKey, J as _Object_, K as Unknown$1, L as Hash, Lt as IsValueLike, M as IsInteger$2, Mt as IsObjectNotArray$1, N as Boolean$1, Nt as IsString$1, O as IsLiteralNumber, Ot as IsMultipleOf$1, P as IsBoolean$2, Pt as IsSymbol$1, Q as IsRef$1, R as hash_exports, Rt as Keys$1, S as IsNumber$2, St as IsGreaterThan$1, T as IsLiteral, Tt as IsLessThan$1, U as Match$1, V as IsIntersect, Vt as guard_exports, W as Unsafe, X as Optional, Y as IsOptional, Z as IsNever, _ as IsUnion, _t as IsConstructor$1, a as With, at as IsSchema$1, b as String$3, bt as IsFunction$1, c as IsUndefined$2, ct as Counted$1, d as RecordKey, dt as Every$1, et as IsFunction$2, f as RecordPattern, ft as EveryAll, g as TemplateLiteralDecode, gt as IsBoolean$1, h as Tuple, ht as IsBigInt$1, i as Instantiate, it as _Array_, j as Integer, jt as IsObject$1, k as IsLiteralString, kt as IsNull$1, l as IsRecord, lt as Entries$2, m as IsTuple, mt as IsArray$1, n as Priority, nt as ArrayOptions, o as IsTemplateLiteral, ot as Clone$1, p as RecordValue, pt as HasPropertyKey$1, q as IsObject$2, r as Evaluate$1, rt as IsArray$2, s as IsVoid, st as Get$3, tt as IsConstructor$2, u as Record$1, ut as EntriesRegExp, v as Union$1, vt as IsDeepEqual$1, w as IsNull$2, wt as IsLessEqualThan$1, x as IsSymbol$2, xt as IsGreaterEqualThan$1, y as IsString$2, yt as IsEqual$1, z as Unreachable, zt as Some$1 } from "./dist-
|
|
5
|
+
import { $ as Ref$1, A as Literal$1, At as IsNumber$1, B as Intersect, Bt as SomeAll$1, C as Number$2, Ct as IsInteger$1, D as IsLiteralBoolean, Dt as IsMinLength$2, E as IsLiteralBigInt, Et as IsMaxLength$2, F as IsBigInt$2, Ft as IsUndefined$1, G as IsCyclic, H as IsEnum$1, I as IsCodec, It as IsUnsafePropertyKey, J as _Object_, K as Unknown$1, L as Hash, Lt as IsValueLike, M as IsInteger$2, Mt as IsObjectNotArray$1, N as Boolean$1, Nt as IsString$1, O as IsLiteralNumber, Ot as IsMultipleOf$1, P as IsBoolean$2, Pt as IsSymbol$1, Q as IsRef$1, R as hash_exports, Rt as Keys$1, S as IsNumber$2, St as IsGreaterThan$1, T as IsLiteral, Tt as IsLessThan$1, U as Match$1, V as IsIntersect, Vt as guard_exports, W as Unsafe, X as Optional, Y as IsOptional, Z as IsNever, _ as IsUnion, _t as IsConstructor$1, a as With, at as IsSchema$1, b as String$3, bt as IsFunction$1, c as IsUndefined$2, ct as Counted$1, d as RecordKey, dt as Every$1, et as IsFunction$2, f as RecordPattern, ft as EveryAll, g as TemplateLiteralDecode, gt as IsBoolean$1, h as Tuple, ht as IsBigInt$1, i as Instantiate, it as _Array_, j as Integer, jt as IsObject$1, k as IsLiteralString, kt as IsNull$1, l as IsRecord, lt as Entries$2, m as IsTuple, mt as IsArray$1, n as Priority, nt as ArrayOptions, o as IsTemplateLiteral, ot as Clone$1, p as RecordValue, pt as HasPropertyKey$1, q as IsObject$2, r as Evaluate$1, rt as IsArray$2, s as IsVoid, st as Get$3, tt as IsConstructor$2, u as Record$1, ut as EntriesRegExp, v as Union$1, vt as IsDeepEqual$1, w as IsNull$2, wt as IsLessEqualThan$1, x as IsSymbol$2, xt as IsGreaterEqualThan$1, y as IsString$2, yt as IsEqual$1, z as Unreachable, zt as Some$1 } from "./dist-cFoAzruL.js";
|
|
6
6
|
import { dirname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
7
7
|
import { lstat, mkdir, open, readFile, readdir, realpath, writeFile } from "node:fs/promises";
|
|
8
8
|
//#region node_modules/typebox/build/guard/emit.mjs
|
|
@@ -55805,7 +55805,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
55805
55805
|
return target;
|
|
55806
55806
|
};
|
|
55807
55807
|
//#endregion
|
|
55808
|
-
//#region node_modules/@pi-ext/executor/dist/tools-
|
|
55808
|
+
//#region node_modules/@pi-ext/executor/dist/tools-C-jym3aZ.js
|
|
55809
55809
|
/** The Executor connection settings are missing or unreadable. */
|
|
55810
55810
|
var ExecutorConfigError = class extends TaggedError()("ExecutorConfigError", { message: String$1 }) {};
|
|
55811
55811
|
/**
|
|
@@ -55854,14 +55854,18 @@ const SearchItem = Struct({
|
|
|
55854
55854
|
score: Number$1
|
|
55855
55855
|
});
|
|
55856
55856
|
const SearchResponse = Struct({ items: ArraySchema(SearchItem) });
|
|
55857
|
-
/**
|
|
55857
|
+
/**
|
|
55858
|
+
* The fields of `GET /api/tools/schema` this package reads. The server sends
|
|
55859
|
+
* `null` for a missing preview (MCP tools have no TypeScript definitions), so
|
|
55860
|
+
* every optional field also accepts `null`.
|
|
55861
|
+
*/
|
|
55858
55862
|
const ToolSchemaView = Struct({
|
|
55859
55863
|
address: String$1,
|
|
55860
|
-
name: optional(String$1),
|
|
55861
|
-
description: optional(String$1),
|
|
55862
|
-
inputTypeScript: optional(String$1),
|
|
55863
|
-
outputTypeScript: optional(String$1),
|
|
55864
|
-
typeScriptDefinitions: optional(Record(String$1, String$1))
|
|
55864
|
+
name: optional(NullOr(String$1)),
|
|
55865
|
+
description: optional(NullOr(String$1)),
|
|
55866
|
+
inputTypeScript: optional(NullOr(String$1)),
|
|
55867
|
+
outputTypeScript: optional(NullOr(String$1)),
|
|
55868
|
+
typeScriptDefinitions: optional(NullOr(Record(String$1, String$1)))
|
|
55865
55869
|
});
|
|
55866
55870
|
/**
|
|
55867
55871
|
* One tool call made by an execution. Optional on the wire until the Executor
|
|
@@ -56068,7 +56072,8 @@ const SearchHitSchema = _Object_({
|
|
|
56068
56072
|
description: Optional(String$3()),
|
|
56069
56073
|
inputTypeScript: Optional(String$3()),
|
|
56070
56074
|
outputTypeScript: Optional(String$3()),
|
|
56071
|
-
typeScriptDefinitions: Optional(Record$1(String$3(), String$3()))
|
|
56075
|
+
typeScriptDefinitions: Optional(Record$1(String$3(), String$3())),
|
|
56076
|
+
detailsError: Optional(String$3())
|
|
56072
56077
|
});
|
|
56073
56078
|
const SearchOutput = _Object_({ items: _Array_(SearchHitSchema) });
|
|
56074
56079
|
const SEARCH_TOOL = {
|
|
@@ -56112,6 +56117,7 @@ const searchText = (items) => {
|
|
|
56112
56117
|
lines.push("", `tools.${item.path}${description ? ` — ${description}` : ""}`);
|
|
56113
56118
|
if (item.inputTypeScript) lines.push(` input: ${item.inputTypeScript}`);
|
|
56114
56119
|
if (item.outputTypeScript) lines.push(` output: ${item.outputTypeScript}`);
|
|
56120
|
+
if (item.detailsError) lines.push(` types unavailable: ${item.detailsError}`);
|
|
56115
56121
|
for (const [name, body] of Object.entries(item.typeScriptDefinitions ?? {})) definitions.set(name, body);
|
|
56116
56122
|
}
|
|
56117
56123
|
if (definitions.size > 0) {
|
|
@@ -56127,15 +56133,19 @@ const search = (client, params) => gen(function* () {
|
|
|
56127
56133
|
});
|
|
56128
56134
|
if (!params.includeDetails) return items;
|
|
56129
56135
|
return yield* forEach(items, (item) => client.describe(item.path).pipe(map((view) => {
|
|
56130
|
-
const
|
|
56131
|
-
const
|
|
56136
|
+
const inputTypeScript = view.inputTypeScript ?? void 0;
|
|
56137
|
+
const outputTypeScript = view.outputTypeScript ?? void 0;
|
|
56138
|
+
const definitions = reachableDefinitions([inputTypeScript ?? "", outputTypeScript ?? ""], view.typeScriptDefinitions ?? {});
|
|
56132
56139
|
return {
|
|
56133
56140
|
...item,
|
|
56134
|
-
...
|
|
56135
|
-
...
|
|
56141
|
+
...inputTypeScript === void 0 ? {} : { inputTypeScript },
|
|
56142
|
+
...outputTypeScript === void 0 ? {} : { outputTypeScript },
|
|
56136
56143
|
...Object.keys(definitions).length === 0 ? {} : { typeScriptDefinitions: definitions }
|
|
56137
56144
|
};
|
|
56138
|
-
})
|
|
56145
|
+
}), catch_((error) => succeed({
|
|
56146
|
+
...item,
|
|
56147
|
+
detailsError: error.message
|
|
56148
|
+
}))), { concurrency: DESCRIBE_CONCURRENCY });
|
|
56139
56149
|
});
|
|
56140
56150
|
const ExecuteParams = _Object_({ code: String$3({ description: "TypeScript to run in Executor's sandbox. Call tools as `await tools.<path>(input)` and end with a top-level `return`." }) });
|
|
56141
56151
|
const EXECUTE_TOOL = {
|
|
@@ -56792,4 +56802,4 @@ const acquireWorkflowRunner = async (options) => {
|
|
|
56792
56802
|
//#endregion
|
|
56793
56803
|
export { WorkflowRunnerError, acquireWorkflowRunner, composeSystemPrompt, createPiRunner, envApiKeyAuth as n, lazyOAuth as r, validateToolArguments as t, totalUsage };
|
|
56794
56804
|
|
|
56795
|
-
//# sourceMappingURL=pi-
|
|
56805
|
+
//# sourceMappingURL=pi-D3mMmYey.js.map
|