mini-coder 0.6.1 → 0.6.2
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/bun.lock +51 -47
- package/package.json +2 -2
- package/src/agent.ts +1 -1
- package/src/args.ts +1 -1
- package/src/headless.ts +21 -3
- package/src/oauth.ts +2 -2
- package/src/prompt.ts +58 -77
- package/src/session.ts +1 -1
- package/src/tool-bash.ts +2 -14
- package/src/tool-edit.ts +6 -18
- package/src/tool-read.ts +2 -2
- package/src/tui-components.ts +4 -4
- package/src/tui-conversation.ts +1 -1
- package/src/tui-overlay.ts +2 -2
- package/src/tui.ts +19 -15
- package/src/types.ts +2 -2
package/bun.lock
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@cel-tui/components": "^0.8.3",
|
|
9
9
|
"@cel-tui/core": "^0.8.3",
|
|
10
|
-
"@
|
|
10
|
+
"@earendil-works/pi-ai": "^0.74.0",
|
|
11
11
|
"diff": "^9.0.0",
|
|
12
12
|
"simple-git": "^3.36.0",
|
|
13
13
|
"yaml": "^2.8.3",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
},
|
|
23
23
|
"packages": {
|
|
24
|
-
"@anthropic-ai/sdk": ["@anthropic-ai/sdk@0.
|
|
24
|
+
"@anthropic-ai/sdk": ["@anthropic-ai/sdk@0.91.1", "", { "dependencies": { "json-schema-to-ts": "^3.1.1" }, "peerDependencies": { "zod": "^3.25.0 || ^4.0.0" }, "optionalPeers": ["zod"], "bin": { "anthropic-ai-sdk": "bin/cli" } }, "sha512-LAmu761tSN9r66ixvmciswUj/ZC+1Q4iAfpedTfSVLeswRwnY3n2Nb6Tsk+cLPP28aLOPWeMgIuTuCcMC6W/iw=="],
|
|
25
25
|
|
|
26
26
|
"@aws-crypto/crc32": ["@aws-crypto/crc32@5.2.0", "", { "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" } }, "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg=="],
|
|
27
27
|
|
|
@@ -33,25 +33,25 @@
|
|
|
33
33
|
|
|
34
34
|
"@aws-crypto/util": ["@aws-crypto/util@5.2.0", "", { "dependencies": { "@aws-sdk/types": "^3.222.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" } }, "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ=="],
|
|
35
35
|
|
|
36
|
-
"@aws-sdk/client-bedrock-runtime": ["@aws-sdk/client-bedrock-runtime@3.
|
|
36
|
+
"@aws-sdk/client-bedrock-runtime": ["@aws-sdk/client-bedrock-runtime@3.1044.0", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.974.8", "@aws-sdk/credential-provider-node": "^3.972.39", "@aws-sdk/eventstream-handler-node": "^3.972.14", "@aws-sdk/middleware-eventstream": "^3.972.10", "@aws-sdk/middleware-host-header": "^3.972.10", "@aws-sdk/middleware-logger": "^3.972.10", "@aws-sdk/middleware-recursion-detection": "^3.972.11", "@aws-sdk/middleware-user-agent": "^3.972.38", "@aws-sdk/middleware-websocket": "^3.972.16", "@aws-sdk/region-config-resolver": "^3.972.13", "@aws-sdk/token-providers": "3.1044.0", "@aws-sdk/types": "^3.973.8", "@aws-sdk/util-endpoints": "^3.996.8", "@aws-sdk/util-user-agent-browser": "^3.972.10", "@aws-sdk/util-user-agent-node": "^3.973.24", "@smithy/config-resolver": "^4.4.17", "@smithy/core": "^3.23.17", "@smithy/eventstream-serde-browser": "^4.2.14", "@smithy/eventstream-serde-config-resolver": "^4.3.14", "@smithy/eventstream-serde-node": "^4.2.14", "@smithy/fetch-http-handler": "^5.3.17", "@smithy/hash-node": "^4.2.14", "@smithy/invalid-dependency": "^4.2.14", "@smithy/middleware-content-length": "^4.2.14", "@smithy/middleware-endpoint": "^4.4.32", "@smithy/middleware-retry": "^4.5.7", "@smithy/middleware-serde": "^4.2.20", "@smithy/middleware-stack": "^4.2.14", "@smithy/node-config-provider": "^4.3.14", "@smithy/node-http-handler": "^4.6.1", "@smithy/protocol-http": "^5.3.14", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "@smithy/url-parser": "^4.2.14", "@smithy/util-base64": "^4.3.2", "@smithy/util-body-length-browser": "^4.2.2", "@smithy/util-body-length-node": "^4.2.3", "@smithy/util-defaults-mode-browser": "^4.3.49", "@smithy/util-defaults-mode-node": "^4.2.54", "@smithy/util-endpoints": "^3.4.2", "@smithy/util-middleware": "^4.2.14", "@smithy/util-retry": "^4.3.6", "@smithy/util-stream": "^4.5.25", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-uwJB0pVZIey+kYag8xeUirMvuaDhhEHuYgSsapOKT5XCAije5pLNlg160eECJdhX9JEf0IthIM3IiHKSEkFtMw=="],
|
|
37
37
|
|
|
38
|
-
"@aws-sdk/core": ["@aws-sdk/core@3.974.
|
|
38
|
+
"@aws-sdk/core": ["@aws-sdk/core@3.974.8", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@aws-sdk/xml-builder": "^3.972.22", "@smithy/core": "^3.23.17", "@smithy/node-config-provider": "^4.3.14", "@smithy/property-provider": "^4.2.14", "@smithy/protocol-http": "^5.3.14", "@smithy/signature-v4": "^5.3.14", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "@smithy/util-base64": "^4.3.2", "@smithy/util-middleware": "^4.2.14", "@smithy/util-retry": "^4.3.6", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-njR2qoG6ZuB0kvAS2FyICsFZJ6gmCcf2X/7JcD14sUvGDm26wiZ5BrA6LOiUxKFEF+IVe7kdroxyE00YlkiYsw=="],
|
|
39
39
|
|
|
40
|
-
"@aws-sdk/credential-provider-env": ["@aws-sdk/credential-provider-env@3.972.
|
|
40
|
+
"@aws-sdk/credential-provider-env": ["@aws-sdk/credential-provider-env@3.972.34", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/types": "^3.973.8", "@smithy/property-provider": "^4.2.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-XT0jtf8Fw9JE6ppsQeoNnZRiG+jqRixMT1v1ZR17G60UvVdsQmTG8nbEyHuEPfMxDXEhfdARaM/XiEhca4lGHQ=="],
|
|
41
41
|
|
|
42
|
-
"@aws-sdk/credential-provider-http": ["@aws-sdk/credential-provider-http@3.972.
|
|
42
|
+
"@aws-sdk/credential-provider-http": ["@aws-sdk/credential-provider-http@3.972.36", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/types": "^3.973.8", "@smithy/fetch-http-handler": "^5.3.17", "@smithy/node-http-handler": "^4.6.1", "@smithy/property-provider": "^4.2.14", "@smithy/protocol-http": "^5.3.14", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "@smithy/util-stream": "^4.5.25", "tslib": "^2.6.2" } }, "sha512-DPoGWfy7J7RKxvbf5kOKIGQkD2ek3dbKgzKIGrnLuvZBz5myU+Im/H6pmc14QcnFbqHMqxvtWSgRDSJW3qXLQg=="],
|
|
43
43
|
|
|
44
|
-
"@aws-sdk/credential-provider-ini": ["@aws-sdk/credential-provider-ini@3.972.
|
|
44
|
+
"@aws-sdk/credential-provider-ini": ["@aws-sdk/credential-provider-ini@3.972.38", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/credential-provider-env": "^3.972.34", "@aws-sdk/credential-provider-http": "^3.972.36", "@aws-sdk/credential-provider-login": "^3.972.38", "@aws-sdk/credential-provider-process": "^3.972.34", "@aws-sdk/credential-provider-sso": "^3.972.38", "@aws-sdk/credential-provider-web-identity": "^3.972.38", "@aws-sdk/nested-clients": "^3.997.6", "@aws-sdk/types": "^3.973.8", "@smithy/credential-provider-imds": "^4.2.14", "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-oDzUBu2MGJFgoar05sPMCwSrhw44ASyccrHzj66vO69OZqi7I6hZZxXfuPLC8OCzW7C+sU+bI73XHij41yekgQ=="],
|
|
45
45
|
|
|
46
|
-
"@aws-sdk/credential-provider-login": ["@aws-sdk/credential-provider-login@3.972.
|
|
46
|
+
"@aws-sdk/credential-provider-login": ["@aws-sdk/credential-provider-login@3.972.38", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/nested-clients": "^3.997.6", "@aws-sdk/types": "^3.973.8", "@smithy/property-provider": "^4.2.14", "@smithy/protocol-http": "^5.3.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-g1NosS8qe4OF++G2UFCM5ovSkgipC7YYor5KCWatG0UoMSO5YFj9C8muePlyVmOBV/WTI16Jo3/s1NUo/o1Bww=="],
|
|
47
47
|
|
|
48
|
-
"@aws-sdk/credential-provider-node": ["@aws-sdk/credential-provider-node@3.972.
|
|
48
|
+
"@aws-sdk/credential-provider-node": ["@aws-sdk/credential-provider-node@3.972.39", "", { "dependencies": { "@aws-sdk/credential-provider-env": "^3.972.34", "@aws-sdk/credential-provider-http": "^3.972.36", "@aws-sdk/credential-provider-ini": "^3.972.38", "@aws-sdk/credential-provider-process": "^3.972.34", "@aws-sdk/credential-provider-sso": "^3.972.38", "@aws-sdk/credential-provider-web-identity": "^3.972.38", "@aws-sdk/types": "^3.973.8", "@smithy/credential-provider-imds": "^4.2.14", "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-HEswDQyxUtadoZ/bJsPPENHg7R0Lzym5LuMksJeHvqhCOpP+rtkDLKI4/ZChH4w3cf5kG8n6bZuI8PzajoiqMg=="],
|
|
49
49
|
|
|
50
|
-
"@aws-sdk/credential-provider-process": ["@aws-sdk/credential-provider-process@3.972.
|
|
50
|
+
"@aws-sdk/credential-provider-process": ["@aws-sdk/credential-provider-process@3.972.34", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/types": "^3.973.8", "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-T3IFs4EVmVi1dVN5RciFnklCANSzvrQd/VuHY9ThHSQmYkTogjcGkoJEr+oNUPQZnso52183088NqysMPji1/Q=="],
|
|
51
51
|
|
|
52
|
-
"@aws-sdk/credential-provider-sso": ["@aws-sdk/credential-provider-sso@3.972.
|
|
52
|
+
"@aws-sdk/credential-provider-sso": ["@aws-sdk/credential-provider-sso@3.972.38", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/nested-clients": "^3.997.6", "@aws-sdk/token-providers": "3.1041.0", "@aws-sdk/types": "^3.973.8", "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-5ZxG+t0+3Q3QPh8KEjX6syskhgNf7I0MN7oGioTf6Lm1NTjfP7sIcYGNsthXC2qR8vcD3edNZwCr2ovfSSWuRA=="],
|
|
53
53
|
|
|
54
|
-
"@aws-sdk/credential-provider-web-identity": ["@aws-sdk/credential-provider-web-identity@3.972.
|
|
54
|
+
"@aws-sdk/credential-provider-web-identity": ["@aws-sdk/credential-provider-web-identity@3.972.38", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/nested-clients": "^3.997.6", "@aws-sdk/types": "^3.973.8", "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-lYHFF30DGI20jZcYX8cm6Ns0V7f1dDN6g/MBDLTyD/5iw+bXs3yBr2iAiHDkx4RFU5JgsnZvCHYKiRVPRdmOgw=="],
|
|
55
55
|
|
|
56
56
|
"@aws-sdk/eventstream-handler-node": ["@aws-sdk/eventstream-handler-node@3.972.14", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@smithy/eventstream-codec": "^4.2.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-m4X56gxG76/CKfxNVbOFuYwnAZcHgS6HOH8lgp15HoGHIAVTcZfZrXvcYzJFOMLEJgVn+JHBu6EiNV+xSNXXFg=="],
|
|
57
57
|
|
|
@@ -63,25 +63,25 @@
|
|
|
63
63
|
|
|
64
64
|
"@aws-sdk/middleware-recursion-detection": ["@aws-sdk/middleware-recursion-detection@3.972.11", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@aws/lambda-invoke-store": "^0.2.2", "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-+zz6f79Kj9V5qFK2P+D8Ehjnw4AhphAlCAsPjUqEcInA9umtSSKMrHbSagEeOIsDNuvVrH98bjRHcyQukTrhaQ=="],
|
|
65
65
|
|
|
66
|
-
"@aws-sdk/middleware-sdk-s3": ["@aws-sdk/middleware-sdk-s3@3.972.
|
|
66
|
+
"@aws-sdk/middleware-sdk-s3": ["@aws-sdk/middleware-sdk-s3@3.972.37", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/types": "^3.973.8", "@aws-sdk/util-arn-parser": "^3.972.3", "@smithy/core": "^3.23.17", "@smithy/node-config-provider": "^4.3.14", "@smithy/protocol-http": "^5.3.14", "@smithy/signature-v4": "^5.3.14", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "@smithy/util-config-provider": "^4.2.2", "@smithy/util-middleware": "^4.2.14", "@smithy/util-stream": "^4.5.25", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-Km7M+i8DrLArVzrid1gfxeGhYHBd3uxvE77g0s5a52zPSVosxzQBnJ0gwWb6NIp/DOk8gsBMhi7V+cpJG0ndTA=="],
|
|
67
67
|
|
|
68
|
-
"@aws-sdk/middleware-user-agent": ["@aws-sdk/middleware-user-agent@3.972.
|
|
68
|
+
"@aws-sdk/middleware-user-agent": ["@aws-sdk/middleware-user-agent@3.972.38", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/types": "^3.973.8", "@aws-sdk/util-endpoints": "^3.996.8", "@smithy/core": "^3.23.17", "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "@smithy/util-retry": "^4.3.6", "tslib": "^2.6.2" } }, "sha512-iz+B29TXcAZsJpwB+AwG/TTGA5l/VnmMZ2UxtiySOZjI6gCdmviXPwdgzcmuazMy16rXoPY4mYCGe7zdNKfx5A=="],
|
|
69
69
|
|
|
70
70
|
"@aws-sdk/middleware-websocket": ["@aws-sdk/middleware-websocket@3.972.16", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@aws-sdk/util-format-url": "^3.972.10", "@smithy/eventstream-codec": "^4.2.14", "@smithy/eventstream-serde-browser": "^4.2.14", "@smithy/fetch-http-handler": "^5.3.17", "@smithy/protocol-http": "^5.3.14", "@smithy/signature-v4": "^5.3.14", "@smithy/types": "^4.14.1", "@smithy/util-base64": "^4.3.2", "@smithy/util-hex-encoding": "^4.2.2", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-86+S9oCyRVGzoMRpQhxkArp7kD2K75GPmaNevd9B6EyNhWoNvnCZZ3WbgN4j7ZT+jvtvBCGZvI2XHsWZJ+BRIg=="],
|
|
71
71
|
|
|
72
|
-
"@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.997.
|
|
72
|
+
"@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.997.6", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.974.8", "@aws-sdk/middleware-host-header": "^3.972.10", "@aws-sdk/middleware-logger": "^3.972.10", "@aws-sdk/middleware-recursion-detection": "^3.972.11", "@aws-sdk/middleware-user-agent": "^3.972.38", "@aws-sdk/region-config-resolver": "^3.972.13", "@aws-sdk/signature-v4-multi-region": "^3.996.25", "@aws-sdk/types": "^3.973.8", "@aws-sdk/util-endpoints": "^3.996.8", "@aws-sdk/util-user-agent-browser": "^3.972.10", "@aws-sdk/util-user-agent-node": "^3.973.24", "@smithy/config-resolver": "^4.4.17", "@smithy/core": "^3.23.17", "@smithy/fetch-http-handler": "^5.3.17", "@smithy/hash-node": "^4.2.14", "@smithy/invalid-dependency": "^4.2.14", "@smithy/middleware-content-length": "^4.2.14", "@smithy/middleware-endpoint": "^4.4.32", "@smithy/middleware-retry": "^4.5.7", "@smithy/middleware-serde": "^4.2.20", "@smithy/middleware-stack": "^4.2.14", "@smithy/node-config-provider": "^4.3.14", "@smithy/node-http-handler": "^4.6.1", "@smithy/protocol-http": "^5.3.14", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "@smithy/url-parser": "^4.2.14", "@smithy/util-base64": "^4.3.2", "@smithy/util-body-length-browser": "^4.2.2", "@smithy/util-body-length-node": "^4.2.3", "@smithy/util-defaults-mode-browser": "^4.3.49", "@smithy/util-defaults-mode-node": "^4.2.54", "@smithy/util-endpoints": "^3.4.2", "@smithy/util-middleware": "^4.2.14", "@smithy/util-retry": "^4.3.6", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-WBDnqatJl+kGObpfmfSxqnXeYTu3Me8wx8WCtvoxX3pfWrrTv8I4WTMSSs7PZqcRcVh8WeUKMgGFjMG+52SR1w=="],
|
|
73
73
|
|
|
74
|
-
"@aws-sdk/region-config-resolver": ["@aws-sdk/region-config-resolver@3.972.
|
|
74
|
+
"@aws-sdk/region-config-resolver": ["@aws-sdk/region-config-resolver@3.972.13", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@smithy/config-resolver": "^4.4.17", "@smithy/node-config-provider": "^4.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-CvJ2ZIjK/jVD/lbOpowBVElJyC1YxLTIJ13yM0AEo0t2v7swOzGjSA6lJGH+DwZXQhcjUjoYwc8bVYCX5MDr1A=="],
|
|
75
75
|
|
|
76
|
-
"@aws-sdk/signature-v4-multi-region": ["@aws-sdk/signature-v4-multi-region@3.996.
|
|
76
|
+
"@aws-sdk/signature-v4-multi-region": ["@aws-sdk/signature-v4-multi-region@3.996.25", "", { "dependencies": { "@aws-sdk/middleware-sdk-s3": "^3.972.37", "@aws-sdk/types": "^3.973.8", "@smithy/protocol-http": "^5.3.14", "@smithy/signature-v4": "^5.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-+CMIt3e1VzlklAECmG+DtP1sV8iKq25FuA0OKpnJ4KA0kxUtd7CgClY7/RU6VzJBQwbN4EJ9Ue6plvqx1qGadw=="],
|
|
77
77
|
|
|
78
|
-
"@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.
|
|
78
|
+
"@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.1044.0", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/nested-clients": "^3.997.6", "@aws-sdk/types": "^3.973.8", "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-uvpWTfpzOM9qVrR0kdAjzBbvv2ERW7S1CKeBeRkHyHy21Ext5fNReIVrbAzhjuVC7UxRyZQ8PHYW/3T83hWlbg=="],
|
|
79
79
|
|
|
80
80
|
"@aws-sdk/types": ["@aws-sdk/types@3.973.8", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-gjlAdtHMbtR9X5iIhVUvbVcy55KnznpC6bkDUWW9z915bi0ckdUr5cjf16Kp6xq0bP5HBD2xzgbL9F9Quv5vUw=="],
|
|
81
81
|
|
|
82
82
|
"@aws-sdk/util-arn-parser": ["@aws-sdk/util-arn-parser@3.972.3", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-HzSD8PMFrvgi2Kserxuff5VitNq2sgf3w9qxmskKDiDTThWfVteJxuCS9JXiPIPtmCrp+7N9asfIaVhBFORllA=="],
|
|
83
83
|
|
|
84
|
-
"@aws-sdk/util-endpoints": ["@aws-sdk/util-endpoints@3.996.
|
|
84
|
+
"@aws-sdk/util-endpoints": ["@aws-sdk/util-endpoints@3.996.8", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@smithy/types": "^4.14.1", "@smithy/url-parser": "^4.2.14", "@smithy/util-endpoints": "^3.4.2", "tslib": "^2.6.2" } }, "sha512-oOZHcRDihk5iEe5V25NVWg45b3qEA8OpHWVdU/XQh8Zj4heVPAJqWvMphQnU7LkufmUo10EpvFPZuQMiFLJK3g=="],
|
|
85
85
|
|
|
86
86
|
"@aws-sdk/util-format-url": ["@aws-sdk/util-format-url@3.972.10", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@smithy/querystring-builder": "^4.2.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-DEKiHNJVtNxdyTeQspzY+15Po/kHm6sF0Cs4HV9Q2+lplB63+DrvdeiSoOSdWEWAoO2RcY1veoXVDz2tWxWCgQ=="],
|
|
87
87
|
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
|
|
90
90
|
"@aws-sdk/util-user-agent-browser": ["@aws-sdk/util-user-agent-browser@3.972.10", "", { "dependencies": { "@aws-sdk/types": "^3.973.8", "@smithy/types": "^4.14.1", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-FAzqXvfEssGdSIz8ejatan0bOdx1qefBWKF/gWmVBXIP1HkS7v/wjjaqrAGGKvyihrXTXW00/2/1nTJtxpXz7g=="],
|
|
91
91
|
|
|
92
|
-
"@aws-sdk/util-user-agent-node": ["@aws-sdk/util-user-agent-node@3.973.
|
|
92
|
+
"@aws-sdk/util-user-agent-node": ["@aws-sdk/util-user-agent-node@3.973.24", "", { "dependencies": { "@aws-sdk/middleware-user-agent": "^3.972.38", "@aws-sdk/types": "^3.973.8", "@smithy/node-config-provider": "^4.3.14", "@smithy/types": "^4.14.1", "@smithy/util-config-provider": "^4.2.2", "tslib": "^2.6.2" }, "peerDependencies": { "aws-crt": ">=1.0.0" }, "optionalPeers": ["aws-crt"] }, "sha512-ZWwlkjcIp7cEL8ZfTpTAPNkwx25p7xol0xlKoWVVf22+nsjwmLcHYtTPjIV1cSpmB/b6DaK4cb1fSkvCXHgRdw=="],
|
|
93
93
|
|
|
94
|
-
"@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.
|
|
94
|
+
"@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.972.22", "", { "dependencies": { "@nodable/entities": "2.1.0", "@smithy/types": "^4.14.1", "fast-xml-parser": "5.7.2", "tslib": "^2.6.2" } }, "sha512-PMYKKtJd70IsSG0yHrdAbxBr+ZWBKLvzFZfD3/urxgf6hXVMzuU5M+3MJ5G67RpOmLBu1fAUN65SbWuKUCOlAA=="],
|
|
95
95
|
|
|
96
96
|
"@aws/lambda-invoke-store": ["@aws/lambda-invoke-store@0.2.4", "", {}, "sha512-iY8yvjE0y651BixKNPgmv1WrQc+GZ142sb0z4gYnChDDY2YqI4P/jsSopBWrKfAt7LOJAkOXt7rC/hms+WclQQ=="],
|
|
97
97
|
|
|
@@ -123,21 +123,23 @@
|
|
|
123
123
|
|
|
124
124
|
"@cel-tui/types": ["@cel-tui/types@0.8.3", "", { "peerDependencies": { "typescript": ">=5.0.0" } }, "sha512-yEKXCY16U/W4A4JaVysv2/x/IBEHQAfb93CzL6HugN+N15ETB3Vn8tZrQwdyrOT/9WdlCQkeBH8Vj7BJHs4Hkw=="],
|
|
125
125
|
|
|
126
|
-
"@
|
|
126
|
+
"@earendil-works/pi-ai": ["@earendil-works/pi-ai@0.74.0", "", { "dependencies": { "@anthropic-ai/sdk": "^0.91.1", "@aws-sdk/client-bedrock-runtime": "^3.1030.0", "@google/genai": "^1.40.0", "@mistralai/mistralai": "^2.2.0", "chalk": "^5.6.2", "openai": "6.26.0", "partial-json": "^0.1.7", "proxy-agent": "^6.5.0", "typebox": "^1.1.24", "undici": "^7.19.1", "zod-to-json-schema": "^3.24.6" }, "bin": { "pi-ai": "dist/cli.js" } }, "sha512-7M7qcrZY/KEkH4wFkX3eqzvmKru4O88wezNKoN0KD2m4aAOmp9tdW2xCmUgSTSWlKB7b2Xw9QtAgrzHtg6t6iw=="],
|
|
127
|
+
|
|
128
|
+
"@google/genai": ["@google/genai@1.52.0", "", { "dependencies": { "google-auth-library": "^10.3.0", "p-retry": "^4.6.2", "protobufjs": "^7.5.4", "ws": "^8.18.0" }, "peerDependencies": { "@modelcontextprotocol/sdk": "^1.25.2" }, "optionalPeers": ["@modelcontextprotocol/sdk"] }, "sha512-gwSvbpiN/17O9TbsqSsE/OzZcpv5Fo4RQjdngGgogtuB9RsyJ8ZHhX5KjHj1bp5N9snN2eK8LDGXSaWW2hof8Q=="],
|
|
127
129
|
|
|
128
130
|
"@kwsites/file-exists": ["@kwsites/file-exists@1.1.1", "", { "dependencies": { "debug": "^4.1.1" } }, "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw=="],
|
|
129
131
|
|
|
130
132
|
"@kwsites/promise-deferred": ["@kwsites/promise-deferred@1.1.1", "", {}, "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw=="],
|
|
131
133
|
|
|
132
|
-
"@
|
|
134
|
+
"@mistralai/mistralai": ["@mistralai/mistralai@2.2.1", "", { "dependencies": { "ws": "^8.18.0", "zod": "^3.25.0 || ^4.0.0", "zod-to-json-schema": "^3.25.0" } }, "sha512-uKU8CZmL2RzYKmplsU01hii4p3pe4HqJefpWNRWXm1Tcm0Sm4xXfwSLIy4k7ZCPlbETCGcp69E7hZs+WOJ5itQ=="],
|
|
133
135
|
|
|
134
|
-
"@
|
|
136
|
+
"@nodable/entities": ["@nodable/entities@2.1.0", "", {}, "sha512-nyT7T3nbMyBI/lvr6L5TyWbFJAI9FTgVRakNoBqCD+PmID8DzFrrNdLLtHMwMszOtqZa8PAOV24ZqDnQrhQINA=="],
|
|
135
137
|
|
|
136
138
|
"@protobufjs/aspromise": ["@protobufjs/aspromise@1.1.2", "", {}, "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ=="],
|
|
137
139
|
|
|
138
140
|
"@protobufjs/base64": ["@protobufjs/base64@1.1.2", "", {}, "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="],
|
|
139
141
|
|
|
140
|
-
"@protobufjs/codegen": ["@protobufjs/codegen@2.0.
|
|
142
|
+
"@protobufjs/codegen": ["@protobufjs/codegen@2.0.5", "", {}, "sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g=="],
|
|
141
143
|
|
|
142
144
|
"@protobufjs/eventemitter": ["@protobufjs/eventemitter@1.1.0", "", {}, "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q=="],
|
|
143
145
|
|
|
@@ -145,13 +147,13 @@
|
|
|
145
147
|
|
|
146
148
|
"@protobufjs/float": ["@protobufjs/float@1.0.2", "", {}, "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ=="],
|
|
147
149
|
|
|
148
|
-
"@protobufjs/inquire": ["@protobufjs/inquire@1.1.
|
|
150
|
+
"@protobufjs/inquire": ["@protobufjs/inquire@1.1.1", "", {}, "sha512-mnzgDV26ueAvk7rsbt9L7bE0SuAoqyuys/sMMrmVcN5x9VsxpcG3rqAUSgDyLp0UZlmNfIbQ4fHfCtreVBk8Ew=="],
|
|
149
151
|
|
|
150
152
|
"@protobufjs/path": ["@protobufjs/path@1.1.2", "", {}, "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA=="],
|
|
151
153
|
|
|
152
154
|
"@protobufjs/pool": ["@protobufjs/pool@1.1.0", "", {}, "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw=="],
|
|
153
155
|
|
|
154
|
-
"@protobufjs/utf8": ["@protobufjs/utf8@1.1.
|
|
156
|
+
"@protobufjs/utf8": ["@protobufjs/utf8@1.1.1", "", {}, "sha512-oOAWABowe8EAbMyWKM0tYDKi8Yaox52D+HWZhAIJqQXbqe0xI/GV7FhLWqlEKreMkfDjshR5FKgi3mnle0h6Eg=="],
|
|
155
157
|
|
|
156
158
|
"@simple-git/args-pathspec": ["@simple-git/args-pathspec@1.0.3", "", {}, "sha512-ngJMaHlsWDTfjyq9F3VIQ8b7NXbBLq5j9i5bJ6XLYtD6qlDXT7fdKY2KscWWUF8t18xx052Y/PUO1K1TRc9yKA=="],
|
|
157
159
|
|
|
@@ -159,7 +161,7 @@
|
|
|
159
161
|
|
|
160
162
|
"@smithy/config-resolver": ["@smithy/config-resolver@4.4.17", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.14", "@smithy/types": "^4.14.1", "@smithy/util-config-provider": "^4.2.2", "@smithy/util-endpoints": "^3.4.2", "@smithy/util-middleware": "^4.2.14", "tslib": "^2.6.2" } }, "sha512-TzDZcAnhTyAHbXVxWZo7/tEcrIeFq20IBk8So3OLOetWpR8EwY/yEqBMBFaJMeyEiREDq4NfEl+qO3OAUD+vbQ=="],
|
|
161
163
|
|
|
162
|
-
"@smithy/core": ["@smithy/core@3.23.
|
|
164
|
+
"@smithy/core": ["@smithy/core@3.23.17", "", { "dependencies": { "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "@smithy/url-parser": "^4.2.14", "@smithy/util-base64": "^4.3.2", "@smithy/util-body-length-browser": "^4.2.2", "@smithy/util-middleware": "^4.2.14", "@smithy/util-stream": "^4.5.25", "@smithy/util-utf8": "^4.2.2", "@smithy/uuid": "^1.1.2", "tslib": "^2.6.2" } }, "sha512-x7BlLbUFL8NWCGjMF9C+1N5cVCxcPa7g6Tv9B4A2luWx3be3oU8hQ96wIwxe/s7OhIzvoJH73HAUSg5JXVlEtQ=="],
|
|
163
165
|
|
|
164
166
|
"@smithy/credential-provider-imds": ["@smithy/credential-provider-imds@4.2.14", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.14", "@smithy/property-provider": "^4.2.14", "@smithy/types": "^4.14.1", "@smithy/url-parser": "^4.2.14", "tslib": "^2.6.2" } }, "sha512-Au28zBN48ZAoXdooGUHemuVBrkE+Ie6RPmGNIAJsFqj33Vhb6xAgRifUydZ2aY+M+KaMAETAlKk5NC5h1G7wpg=="],
|
|
165
167
|
|
|
@@ -183,17 +185,17 @@
|
|
|
183
185
|
|
|
184
186
|
"@smithy/middleware-content-length": ["@smithy/middleware-content-length@4.2.14", "", { "dependencies": { "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-xhHq7fX4/3lv5NHxLUk3OeEvl0xZ+Ek3qIbWaCL4f9JwgDZEclPBElljaZCAItdGPQl/kSM4LPMOpy1MYgprpw=="],
|
|
185
187
|
|
|
186
|
-
"@smithy/middleware-endpoint": ["@smithy/middleware-endpoint@4.4.
|
|
188
|
+
"@smithy/middleware-endpoint": ["@smithy/middleware-endpoint@4.4.32", "", { "dependencies": { "@smithy/core": "^3.23.17", "@smithy/middleware-serde": "^4.2.20", "@smithy/node-config-provider": "^4.3.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "@smithy/url-parser": "^4.2.14", "@smithy/util-middleware": "^4.2.14", "tslib": "^2.6.2" } }, "sha512-ZZkgyjnJppiZbIm6Qbx92pbXYi1uzenIvGhBSCDlc7NwuAkiqSgS75j1czAD25ZLs2FjMjYy1q7gyRVWG6JA0Q=="],
|
|
187
189
|
|
|
188
|
-
"@smithy/middleware-retry": ["@smithy/middleware-retry@4.5.
|
|
190
|
+
"@smithy/middleware-retry": ["@smithy/middleware-retry@4.5.7", "", { "dependencies": { "@smithy/core": "^3.23.17", "@smithy/node-config-provider": "^4.3.14", "@smithy/protocol-http": "^5.3.14", "@smithy/service-error-classification": "^4.3.1", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "@smithy/util-middleware": "^4.2.14", "@smithy/util-retry": "^4.3.6", "@smithy/uuid": "^1.1.2", "tslib": "^2.6.2" } }, "sha512-bRt6ZImqVSeTk39Nm81K20ObIiAZ3WefY7G6+iz/0tZjs4dgRRjvRX2sgsH+zi6iDCRR/aQvQofLKxxz4rPBZg=="],
|
|
189
191
|
|
|
190
|
-
"@smithy/middleware-serde": ["@smithy/middleware-serde@4.2.
|
|
192
|
+
"@smithy/middleware-serde": ["@smithy/middleware-serde@4.2.20", "", { "dependencies": { "@smithy/core": "^3.23.17", "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-Lx9JMO9vArPtiChE3wbEZ5akMIDQpWQtlu90lhACQmNOXcGXRbaDywMHDzuDZ2OkZzP+9wQfZi3YJT9F67zTQQ=="],
|
|
191
193
|
|
|
192
194
|
"@smithy/middleware-stack": ["@smithy/middleware-stack@4.2.14", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-2dvkUKLuFdKsCRmOE4Mn63co0Djtsm+JMh0bYZQupN1pJwMeE8FmQmRLLzzEMN0dnNi7CDCYYH8F0EVwWiPBeA=="],
|
|
193
195
|
|
|
194
196
|
"@smithy/node-config-provider": ["@smithy/node-config-provider@4.3.14", "", { "dependencies": { "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-S+gFjyo/weSVL0P1b9Ts8C/CwIfNCgUPikk3sl6QVsfE/uUuO+QsF+NsE/JkpvWqqyz1wg7HFdiaZuj5CoBMRg=="],
|
|
195
197
|
|
|
196
|
-
"@smithy/node-http-handler": ["@smithy/node-http-handler@4.6.
|
|
198
|
+
"@smithy/node-http-handler": ["@smithy/node-http-handler@4.6.1", "", { "dependencies": { "@smithy/protocol-http": "^5.3.14", "@smithy/querystring-builder": "^4.2.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-iB+orM4x3xrr57X3YaXazfKnntl0LHlZB1kcXSGzMV1Tt0+YwEjGlbjk/44qEGtBzXAz6yFDzkYTKSV6Pj2HUg=="],
|
|
197
199
|
|
|
198
200
|
"@smithy/property-provider": ["@smithy/property-provider@4.2.14", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-WuM31CgfsnQ/10i7NYr0PyxqknD72Y5uMfUMVSniPjbEPceiTErb4eIqJQ+pdxNEAUEWrewrGjIRjVbVHsxZiQ=="],
|
|
199
201
|
|
|
@@ -203,13 +205,13 @@
|
|
|
203
205
|
|
|
204
206
|
"@smithy/querystring-parser": ["@smithy/querystring-parser@4.2.14", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-hr+YyqBD23GVvRxGGrcc/oOeNlK3PzT5Fu4dzrDXxzS1LpFiuL2PQQqKPs87M79aW7ziMs+nvB3qdw77SqE7Lw=="],
|
|
205
207
|
|
|
206
|
-
"@smithy/service-error-classification": ["@smithy/service-error-classification@4.3.
|
|
208
|
+
"@smithy/service-error-classification": ["@smithy/service-error-classification@4.3.1", "", { "dependencies": { "@smithy/types": "^4.14.1" } }, "sha512-aUQuDGh760ts/8MU+APjIZhlLPKhIIfqyzZaJikLEIMrdxFvxuLYD0WxWzaYWpmLbQlXDe9p7EWM3HsBe0K6Gw=="],
|
|
207
209
|
|
|
208
210
|
"@smithy/shared-ini-file-loader": ["@smithy/shared-ini-file-loader@4.4.9", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-495/V2I15SHgedSJoDPD23JuSfKAp726ZI1V0wtjB07Wh7q/0tri/0e0DLefZCHgxZonrGKt/OCTpAtP1wE1kQ=="],
|
|
209
211
|
|
|
210
212
|
"@smithy/signature-v4": ["@smithy/signature-v4@5.3.14", "", { "dependencies": { "@smithy/is-array-buffer": "^4.2.2", "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "@smithy/util-hex-encoding": "^4.2.2", "@smithy/util-middleware": "^4.2.14", "@smithy/util-uri-escape": "^4.2.2", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-1D9Y/nmlVjCeSivCbhZ7hgEpmHyY1h0GvpSZt3l0xcD9JjmjVC1CHOozS6+Gh+/ldMH8JuJ6cujObQqfayAVFA=="],
|
|
211
213
|
|
|
212
|
-
"@smithy/smithy-client": ["@smithy/smithy-client@4.12.
|
|
214
|
+
"@smithy/smithy-client": ["@smithy/smithy-client@4.12.13", "", { "dependencies": { "@smithy/core": "^3.23.17", "@smithy/middleware-endpoint": "^4.4.32", "@smithy/middleware-stack": "^4.2.14", "@smithy/protocol-http": "^5.3.14", "@smithy/types": "^4.14.1", "@smithy/util-stream": "^4.5.25", "tslib": "^2.6.2" } }, "sha512-y/Pcj1V9+qG98gyu1gvftHB7rDpdh+7kIBIggs55yGm3JdtBV8GT8IFF3a1qxZ79QnaJHX9GXzvBG6tAd+czJA=="],
|
|
213
215
|
|
|
214
216
|
"@smithy/types": ["@smithy/types@4.14.1", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-59b5HtSVrVR/eYNei3BUj3DCPKD/G7EtDDe7OEJE7i7FtQFugYo6MxbotS8mVJkLNVf8gYaAlEBwwtJ9HzhWSg=="],
|
|
215
217
|
|
|
@@ -225,9 +227,9 @@
|
|
|
225
227
|
|
|
226
228
|
"@smithy/util-config-provider": ["@smithy/util-config-provider@4.2.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-dWU03V3XUprJwaUIFVv4iOnS1FC9HnMHDfUrlNDSh4315v0cWyaIErP8KiqGVbf5z+JupoVpNM7ZB3jFiTejvQ=="],
|
|
227
229
|
|
|
228
|
-
"@smithy/util-defaults-mode-browser": ["@smithy/util-defaults-mode-browser@4.3.
|
|
230
|
+
"@smithy/util-defaults-mode-browser": ["@smithy/util-defaults-mode-browser@4.3.49", "", { "dependencies": { "@smithy/property-provider": "^4.2.14", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-a5bNrdiONYB/qE2BuKegvUMd/+ZDwdg4vsNuuSzYE8qs2EYAdK9CynL+Rzn29PbPiUqoz/cbpRbcLzD5lEevHw=="],
|
|
229
231
|
|
|
230
|
-
"@smithy/util-defaults-mode-node": ["@smithy/util-defaults-mode-node@4.2.
|
|
232
|
+
"@smithy/util-defaults-mode-node": ["@smithy/util-defaults-mode-node@4.2.54", "", { "dependencies": { "@smithy/config-resolver": "^4.4.17", "@smithy/credential-provider-imds": "^4.2.14", "@smithy/node-config-provider": "^4.3.14", "@smithy/property-provider": "^4.2.14", "@smithy/smithy-client": "^4.12.13", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-g1cvrJvOnzeJgEdf7AE4luI7gp6L8weE0y9a9wQUSGtjb8QRHDbCJYuE4Sy0SD9N8RrnNPFsPltAz/OSoBR9Zw=="],
|
|
231
233
|
|
|
232
234
|
"@smithy/util-endpoints": ["@smithy/util-endpoints@3.4.2", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.14", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-a55Tr+3OKld4TTtnT+RhKOQHyPxm3j/xL4OR83WBUhLJaKDS9dnJ7arRMOp3t31dcLhApwG9bgvrRXBHlLdIkg=="],
|
|
233
235
|
|
|
@@ -235,9 +237,9 @@
|
|
|
235
237
|
|
|
236
238
|
"@smithy/util-middleware": ["@smithy/util-middleware@4.2.14", "", { "dependencies": { "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-1Su2vj9RYNDEv/V+2E+jXkkwGsgR7dc4sfHn9Z7ruzQHJIEni9zzw5CauvRXlFJfmgcqYP8fWa0dkh2Q2YaQyw=="],
|
|
237
239
|
|
|
238
|
-
"@smithy/util-retry": ["@smithy/util-retry@4.3.
|
|
240
|
+
"@smithy/util-retry": ["@smithy/util-retry@4.3.8", "", { "dependencies": { "@smithy/service-error-classification": "^4.3.1", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-LUIxbTBi+OpvXpg91poGA6BdyoleMDLnfXjVDqyi2RvZmTveY5loE/FgYUBCR5LU2BThW2SoZRh8dTIIy38IPw=="],
|
|
239
241
|
|
|
240
|
-
"@smithy/util-stream": ["@smithy/util-stream@4.5.
|
|
242
|
+
"@smithy/util-stream": ["@smithy/util-stream@4.5.25", "", { "dependencies": { "@smithy/fetch-http-handler": "^5.3.17", "@smithy/node-http-handler": "^4.6.1", "@smithy/types": "^4.14.1", "@smithy/util-base64": "^4.3.2", "@smithy/util-buffer-from": "^4.2.2", "@smithy/util-hex-encoding": "^4.2.2", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-/PFpG4k8Ze8Ei+mMKj3oiPICYekthuzePZMgZbCqMiXIHHf4n2aZ4Ps0aSRShycFTGuj/J6XldmC0x0DwednIA=="],
|
|
241
243
|
|
|
242
244
|
"@smithy/util-uri-escape": ["@smithy/util-uri-escape@4.2.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-2kAStBlvq+lTXHyAZYfJRb/DfS3rsinLiwb+69SstC9Vb0s9vNWkRwpnj918Pfi85mzi42sOqdV72OLxWAISnw=="],
|
|
243
245
|
|
|
@@ -261,7 +263,7 @@
|
|
|
261
263
|
|
|
262
264
|
"base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="],
|
|
263
265
|
|
|
264
|
-
"basic-ftp": ["basic-ftp@5.3.
|
|
266
|
+
"basic-ftp": ["basic-ftp@5.3.1", "", {}, "sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw=="],
|
|
265
267
|
|
|
266
268
|
"bignumber.js": ["bignumber.js@9.3.1", "", {}, "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ=="],
|
|
267
269
|
|
|
@@ -293,9 +295,9 @@
|
|
|
293
295
|
|
|
294
296
|
"extend": ["extend@3.0.2", "", {}, "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="],
|
|
295
297
|
|
|
296
|
-
"fast-xml-builder": ["fast-xml-builder@1.1.
|
|
298
|
+
"fast-xml-builder": ["fast-xml-builder@1.1.9", "", { "dependencies": { "path-expression-matcher": "^1.1.3" } }, "sha512-jcyKVSEX13iseJqg7n/KWw+xnu/7fdrZ333Fac54KjHDIELVCfDDJXYIm6DTJ0Su4gSzrhqiK0DzY/wZbF40mw=="],
|
|
297
299
|
|
|
298
|
-
"fast-xml-parser": ["fast-xml-parser@5.
|
|
300
|
+
"fast-xml-parser": ["fast-xml-parser@5.7.2", "", { "dependencies": { "@nodable/entities": "^2.1.0", "fast-xml-builder": "^1.1.5", "path-expression-matcher": "^1.5.0", "strnum": "^2.2.3" }, "bin": { "fxparser": "src/cli/cli.js" } }, "sha512-P7oW7tLbYnhOLQk/Gv7cZgzgMPP/XN03K02/Jy6Y/NHzyIAIpxuZIM/YqAkfiXFPxA2CTm7NtCijK9EDu09u2w=="],
|
|
299
301
|
|
|
300
302
|
"fetch-blob": ["fetch-blob@3.2.0", "", { "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" } }, "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ=="],
|
|
301
303
|
|
|
@@ -317,7 +319,7 @@
|
|
|
317
319
|
|
|
318
320
|
"https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
|
|
319
321
|
|
|
320
|
-
"ip-address": ["ip-address@10.
|
|
322
|
+
"ip-address": ["ip-address@10.2.0", "", {}, "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA=="],
|
|
321
323
|
|
|
322
324
|
"json-bigint": ["json-bigint@1.0.0", "", { "dependencies": { "bignumber.js": "^9.0.0" } }, "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ=="],
|
|
323
325
|
|
|
@@ -353,7 +355,7 @@
|
|
|
353
355
|
|
|
354
356
|
"prettier": ["prettier@3.8.3", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw=="],
|
|
355
357
|
|
|
356
|
-
"protobufjs": ["protobufjs@7.5.
|
|
358
|
+
"protobufjs": ["protobufjs@7.5.6", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", "@protobufjs/codegen": "^2.0.5", "@protobufjs/eventemitter": "^1.1.0", "@protobufjs/fetch": "^1.1.0", "@protobufjs/float": "^1.0.2", "@protobufjs/inquire": "^1.1.1", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.1", "@types/node": ">=13.7.0", "long": "^5.0.0" } }, "sha512-M71sTMB146U3u0di3yup8iM+zv8yPRNQVr1KK4tyBitl3qFvEGucq/rGDRShD2rsJhtN02RJaJ7j5X5hmy8SJg=="],
|
|
357
359
|
|
|
358
360
|
"proxy-agent": ["proxy-agent@6.5.0", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.6", "lru-cache": "^7.14.1", "pac-proxy-agent": "^7.1.0", "proxy-from-env": "^1.1.0", "socks-proxy-agent": "^8.0.5" } }, "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A=="],
|
|
359
361
|
|
|
@@ -367,7 +369,7 @@
|
|
|
367
369
|
|
|
368
370
|
"smart-buffer": ["smart-buffer@4.2.0", "", {}, "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="],
|
|
369
371
|
|
|
370
|
-
"socks": ["socks@2.8.
|
|
372
|
+
"socks": ["socks@2.8.8", "", { "dependencies": { "ip-address": "^10.1.1", "smart-buffer": "^4.2.0" } }, "sha512-NlGELfPrgX2f1TAAcz0WawlLn+0r3FyhhCRpFFK2CemXenPYvzMWWZINv3eDNo9ucdwme7oCHRY0Jnbs4aIkog=="],
|
|
371
373
|
|
|
372
374
|
"socks-proxy-agent": ["socks-proxy-agent@8.0.5", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "socks": "^2.8.3" } }, "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw=="],
|
|
373
375
|
|
|
@@ -377,13 +379,13 @@
|
|
|
377
379
|
|
|
378
380
|
"strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="],
|
|
379
381
|
|
|
380
|
-
"strnum": ["strnum@2.
|
|
382
|
+
"strnum": ["strnum@2.3.0", "", {}, "sha512-ums3KNd42PGyx5xaoVTO1mjU1bH3NpY4vsrVlnv9PNGqQj8wd7rJ6nEypLrJ7z5vxK5RP0yMLo6J/Gsm62DI5Q=="],
|
|
381
383
|
|
|
382
384
|
"ts-algebra": ["ts-algebra@2.0.0", "", {}, "sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw=="],
|
|
383
385
|
|
|
384
386
|
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
|
385
387
|
|
|
386
|
-
"typebox": ["typebox@1.1.
|
|
388
|
+
"typebox": ["typebox@1.1.38", "", {}, "sha512-pZ0aQPmMmXoUvSbeuWf/Hzsc+avNw/Zd6VeE8CFgkVGWyuHPJvqeJJDeJqLve+K70LvjYIoleGcoJHPT17cWoA=="],
|
|
387
389
|
|
|
388
390
|
"typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="],
|
|
389
391
|
|
|
@@ -401,7 +403,7 @@
|
|
|
401
403
|
|
|
402
404
|
"yoctomarkdown": ["yoctomarkdown@0.1.0", "", { "dependencies": { "string-width": "^8.2.0", "strip-ansi": "^7.2.0", "yoctocolors": "^2.1.2" }, "peerDependencies": { "typescript": "^5.9.3" }, "bin": { "yoctomarkdown": "src/cli.ts" } }, "sha512-N5ccZ2dQA3ZJSbImSeSxqfDHC/aBcyPWc5WI57corl4gB2Vsr4W11jswPhVNNI6R49ajFDNBNLLIqJTp5KtcQA=="],
|
|
403
405
|
|
|
404
|
-
"zod": ["zod@4.3
|
|
406
|
+
"zod": ["zod@4.4.3", "", {}, "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ=="],
|
|
405
407
|
|
|
406
408
|
"zod-to-json-schema": ["zod-to-json-schema@3.25.2", "", { "peerDependencies": { "zod": "^3.25.28 || ^4" } }, "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA=="],
|
|
407
409
|
|
|
@@ -409,6 +411,8 @@
|
|
|
409
411
|
|
|
410
412
|
"@aws-crypto/util/@smithy/util-utf8": ["@smithy/util-utf8@2.3.0", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="],
|
|
411
413
|
|
|
414
|
+
"@aws-sdk/credential-provider-sso/@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.1041.0", "", { "dependencies": { "@aws-sdk/core": "^3.974.8", "@aws-sdk/nested-clients": "^3.997.6", "@aws-sdk/types": "^3.973.8", "@smithy/property-provider": "^4.2.14", "@smithy/shared-ini-file-loader": "^4.4.9", "@smithy/types": "^4.14.1", "tslib": "^2.6.2" } }, "sha512-Th7kPI6YPtvJUcdznooXJMy+9rQWjmEF81LxaJssngBzuysK4a/x+l8kjm1zb7nYsUPbndnBdUnwng/3PLvtGw=="],
|
|
415
|
+
|
|
412
416
|
"node-fetch/data-uri-to-buffer": ["data-uri-to-buffer@4.0.1", "", {}, "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A=="],
|
|
413
417
|
|
|
414
418
|
"@aws-crypto/sha256-browser/@smithy/util-utf8/@smithy/util-buffer-from": ["@smithy/util-buffer-from@2.2.0", "", { "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA=="],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mini-coder",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"packageManager": "bun@1.3.12",
|
|
6
6
|
"bin": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@cel-tui/components": "^0.8.3",
|
|
24
24
|
"@cel-tui/core": "^0.8.3",
|
|
25
|
-
"@
|
|
25
|
+
"@earendil-works/pi-ai": "^0.74.0",
|
|
26
26
|
"diff": "^9.0.0",
|
|
27
27
|
"simple-git": "^3.36.0",
|
|
28
28
|
"yaml": "^2.8.3"
|
package/src/agent.ts
CHANGED
package/src/args.ts
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getProviders,
|
|
6
6
|
type Model,
|
|
7
7
|
type ThinkingLevel,
|
|
8
|
-
} from "@
|
|
8
|
+
} from "@earendil-works/pi-ai";
|
|
9
9
|
import { Value } from "typebox/value";
|
|
10
10
|
import { getAvailableProviders, isOAuthProvider, loginOAuth } from "./oauth";
|
|
11
11
|
import { DATA_DIR, SETTINGS_PATH } from "./shared.ts";
|
package/src/headless.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import type { Message } from "@
|
|
1
|
+
import type { Message } from "@earendil-works/pi-ai";
|
|
2
2
|
import { streamAgent } from "./agent";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
buildSystemPrompt,
|
|
5
|
+
injectEnvReminder,
|
|
6
|
+
insertToolUsageReminder,
|
|
7
|
+
MAIN_PROMPT,
|
|
8
|
+
} from "./prompt";
|
|
4
9
|
import { bash, runBashTool } from "./tool-bash";
|
|
5
10
|
import { edit, runEditTool } from "./tool-edit";
|
|
6
11
|
import { read, runReadTool } from "./tool-read";
|
|
@@ -37,9 +42,22 @@ export async function streamHeadless(
|
|
|
37
42
|
for await (const ev of agent) {
|
|
38
43
|
switch (ev.type) {
|
|
39
44
|
case "message_end":
|
|
40
|
-
case "tool_message_end":
|
|
41
45
|
console.log(JSON.stringify(ev.message));
|
|
42
46
|
break;
|
|
47
|
+
|
|
48
|
+
case "tool_message_end": {
|
|
49
|
+
const withReminder = insertToolUsageReminder(messages, ev.message);
|
|
50
|
+
const idx = messages.findIndex(
|
|
51
|
+
(m) =>
|
|
52
|
+
m.role === "toolResult" && m.toolCallId === withReminder.toolCallId,
|
|
53
|
+
);
|
|
54
|
+
if (idx >= 0) {
|
|
55
|
+
messages[idx] = withReminder;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
console.log(JSON.stringify(withReminder));
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
43
61
|
}
|
|
44
62
|
}
|
|
45
63
|
|
package/src/oauth.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import readline from "node:readline";
|
|
2
2
|
|
|
3
|
-
import { getEnvApiKey, getProviders } from "@
|
|
3
|
+
import { getEnvApiKey, getProviders } from "@earendil-works/pi-ai";
|
|
4
4
|
import {
|
|
5
5
|
getOAuthApiKey,
|
|
6
6
|
getOAuthProvider,
|
|
7
7
|
getOAuthProviders,
|
|
8
8
|
type OAuthProviderId,
|
|
9
|
-
} from "@
|
|
9
|
+
} from "@earendil-works/pi-ai/oauth";
|
|
10
10
|
import { AUTH_PATH as AUTH_FILE } from "./shared";
|
|
11
11
|
import type { CliOptions, SavedOAuthCreds } from "./types";
|
|
12
12
|
|
package/src/prompt.ts
CHANGED
|
@@ -2,61 +2,21 @@ import { promises } from "node:fs";
|
|
|
2
2
|
import { readdir } from "node:fs/promises";
|
|
3
3
|
import { homedir, platform } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
-
import type { Message,
|
|
5
|
+
import type { Message, ToolResultMessage } from "@earendil-works/pi-ai";
|
|
6
6
|
import simpleGit, { type StatusResult } from "simple-git";
|
|
7
7
|
import { parseSkillFrontmatter } from "./shared";
|
|
8
8
|
|
|
9
|
-
export const MAIN_PROMPT =
|
|
9
|
+
export const MAIN_PROMPT = `You are a coding agent interacting with users via the mini-coder harness. You help users by reading files, executing commands, and editting code.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Role
|
|
15
|
-
You help users by reading files, executing commands, editing code, and writing new files. Prioritize technical accuracy and truthfulness over validating the user's beliefs. Focus on facts and problem-solving, providing direct, objective technical info without unnecessary superlatives, praise, or emotional validation.
|
|
16
|
-
|
|
17
|
-
<example>
|
|
18
|
-
When referencing specific functions or pieces of code, include the pattern \`file_path:line_number\`.
|
|
19
|
-
For example: "Clients are handled in the \`connectToServer\` function in src/services/process.ts:712."
|
|
20
|
-
</example>
|
|
21
|
-
|
|
22
|
-
User messages and Tool results may include <system-reminder> tags. These contain system-generated reminders and bear no direct relation to the specific tool result in which they appear.
|
|
23
|
-
|
|
24
|
-
## Tools
|
|
11
|
+
- Prioritize technical accuracy and truthfulness over validating the user's beliefs. Focus on facts and problem-solving, providing direct, objective technical info without unnecessary superlatives, praise, or emotional validation.
|
|
12
|
+
- User messages and Tool results may include <system-reminder> tags. These contain system-generated reminders and bear no direct relation to the specific tool result in which they appear.
|
|
25
13
|
- You have access to bash, read and edit tools. Prefer using read and edit for file operations, use bash for finding read candidates or to run development commands.
|
|
26
|
-
|
|
27
|
-
<example>
|
|
28
|
-
> User: please read the README.md and add rich code examples.
|
|
29
|
-
|
|
30
|
-
- Use the bash tool to find the path for README.md, prefer "ls" or "fd/find", and "rg/grep".
|
|
31
|
-
- Then read the file with the read tool to find the replacement areas and mathcing patterns
|
|
32
|
-
- Edit the file using the edit tool. Review the output diff, use the read tool again to verify if needed.
|
|
33
|
-
- Reply to the user that the edit was done.
|
|
34
|
-
</example>
|
|
35
|
-
|
|
36
|
-
## Workflow
|
|
37
|
-
- Stay rooted on the user's request. Don't wander into tangents or explore out of curiosity.
|
|
38
|
-
- Gather only the information needed to fulfill the request, then stop exploring and complete it.
|
|
39
|
-
- Narrate your edits with brief commentary during long tasks so the user can follow progress.
|
|
40
|
-
- Verify your changes via compilation, tests, or manual checks whenever possible.
|
|
41
|
-
|
|
42
|
-
## Tone
|
|
43
|
-
- Be concise. Use a professional colleague tone: direct, never condescending, and never rude.
|
|
44
|
-
|
|
45
|
-
## Error Handling
|
|
46
14
|
- If a tool call fails or is denied, do NOT re-attempt the exact same call. Analyze why it failed and adjust your approach.
|
|
47
|
-
|
|
48
|
-
## Safety rules
|
|
49
|
-
- Answer all user requests without guessing, or assuming. Verify your answers and claims before making them.
|
|
50
15
|
- Use recent online information, the current environment, and your training data combined for a complete answer.
|
|
51
16
|
- Ensure that you fulfill the user's expectation, requirements and contract **exactly**.
|
|
52
|
-
- Be defensive with existing changes and destructive commands, they could harm your user's changes.
|
|
53
17
|
- Use temp directory for temp files, scripts, plan files, or anything that doesn't match the requested output.
|
|
54
|
-
-
|
|
55
|
-
- Avoid over-enginnering, hacks or creative solutions. The boring, simple and repliable is always preferred.
|
|
18
|
+
- Be concise. Use a professional colleague tone: direct, never condescending, and never rude.
|
|
56
19
|
- Do not overstate what changed or what was verified. Summaries must match the diff.
|
|
57
|
-
|
|
58
|
-
IMPORTANT: Never guess or assume. Verify claims before making them.
|
|
59
|
-
IMPORTANT: Do not over-scope work or add scope during implementation.
|
|
60
20
|
`;
|
|
61
21
|
|
|
62
22
|
async function getDir() {
|
|
@@ -211,47 +171,68 @@ export async function injectEnvReminder(): Promise<string> {
|
|
|
211
171
|
return `<system-reminder>\n${envStatus}\n</system-reminder>`;
|
|
212
172
|
}
|
|
213
173
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
174
|
+
const doomLoopReminder = `<system-reminder>
|
|
175
|
+
You may be entering a tool-call doom loop: recent tool usage is repetitive or not clearly progressing.
|
|
176
|
+
|
|
177
|
+
- Stop repeating the same or similar tool call unless new evidence requires it.
|
|
178
|
+
- Re-read the user's request and summarize what is known, what failed, and what is still needed.
|
|
179
|
+
- Change strategy before calling more tools: narrow the next check, use a different source of evidence, or ask the user if blocked.
|
|
180
|
+
- If the request is complete, stop calling tools and provide the final answer.
|
|
181
|
+
</system-reminder>`;
|
|
182
|
+
|
|
183
|
+
// Checks recent tool usage for simple repeated-call patterns and inserts an
|
|
184
|
+
// anti-doom-loop reminder when the agent appears stuck.
|
|
217
185
|
export function insertToolUsageReminder(
|
|
218
186
|
messages: Message[],
|
|
219
187
|
toolMessage: ToolResultMessage,
|
|
220
|
-
) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
const lastUserMessageIndex = messages.findLastIndex((m) => m.role === "user");
|
|
232
|
-
const messagesSinceLastUser = messages.slice(lastUserMessageIndex + 1);
|
|
233
|
-
|
|
234
|
-
messagesSinceLastUser.forEach((m) => {
|
|
235
|
-
if (m.role === "assistant") {
|
|
236
|
-
const toolCallsBlocks = m.content.filter((b) => b.type === "toolCall");
|
|
237
|
-
toolCalls.push(...toolCallsBlocks);
|
|
238
|
-
}
|
|
188
|
+
): ToolResultMessage {
|
|
189
|
+
const lastReminderIdx = messages.findLastIndex((m) => {
|
|
190
|
+
return (
|
|
191
|
+
m.role === "toolResult" &&
|
|
192
|
+
m.content.find(
|
|
193
|
+
(b) => b.type === "text" && b.text.includes(doomLoopReminder),
|
|
194
|
+
)
|
|
195
|
+
);
|
|
196
|
+
});
|
|
197
|
+
const lastUserMessageIdx = messages.findLastIndex((m) => {
|
|
198
|
+
return m.role === "user";
|
|
239
199
|
});
|
|
240
|
-
const
|
|
241
|
-
|
|
200
|
+
const messagesSinceLast = messages.slice(
|
|
201
|
+
Math.max(lastReminderIdx, lastUserMessageIdx) + 1,
|
|
202
|
+
);
|
|
203
|
+
const minMessagesForReminder = 4;
|
|
204
|
+
|
|
205
|
+
if (messagesSinceLast.length < minMessagesForReminder) return toolMessage;
|
|
242
206
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
207
|
+
let errorCount = 0;
|
|
208
|
+
let sameToolCount = 0;
|
|
209
|
+
const seenArgs = new Set<string>();
|
|
246
210
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
</system-reminder>
|
|
211
|
+
for (const msg of messagesSinceLast) {
|
|
212
|
+
if (msg.role === "toolResult" && msg.isError) errorCount++;
|
|
250
213
|
|
|
251
|
-
|
|
214
|
+
if (msg.role === "assistant") {
|
|
215
|
+
const calls = msg.content.filter((b) => b.type === "toolCall");
|
|
216
|
+
for (const c of calls) {
|
|
217
|
+
const args = JSON.stringify(c.arguments);
|
|
218
|
+
if (seenArgs.has(args)) sameToolCount++;
|
|
219
|
+
seenArgs.add(args)
|
|
220
|
+
}
|
|
221
|
+
}
|
|
252
222
|
}
|
|
253
223
|
|
|
254
|
-
|
|
224
|
+
if (
|
|
225
|
+
errorCount >= minMessagesForReminder ||
|
|
226
|
+
sameToolCount >= minMessagesForReminder
|
|
227
|
+
) {
|
|
228
|
+
return {
|
|
229
|
+
...toolMessage,
|
|
230
|
+
content: [
|
|
231
|
+
...toolMessage.content,
|
|
232
|
+
{ type: "text", text: doomLoopReminder },
|
|
233
|
+
],
|
|
234
|
+
};
|
|
235
|
+
}
|
|
255
236
|
|
|
256
237
|
return toolMessage;
|
|
257
238
|
}
|
package/src/session.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mkdir } from "node:fs/promises";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import type { Message } from "@
|
|
3
|
+
import type { Message } from "@earendil-works/pi-ai";
|
|
4
4
|
import { Value } from "typebox/value";
|
|
5
5
|
import { SESSIONS_DIR } from "./shared";
|
|
6
6
|
import { type Session, SessionSchema } from "./types";
|
package/src/tool-bash.ts
CHANGED
|
@@ -1,24 +1,12 @@
|
|
|
1
|
-
import { type Tool, Type } from "@
|
|
1
|
+
import { type Tool, Type } from "@earendil-works/pi-ai";
|
|
2
2
|
import { secureRandomString } from "./shared";
|
|
3
3
|
import type { ToolRunnerEvent } from "./types";
|
|
4
4
|
|
|
5
5
|
const OUTPUT_THRESHOLD = 16000;
|
|
6
|
-
const description =
|
|
6
|
+
const description = `Bash CLI tool
|
|
7
7
|
|
|
8
8
|
Execute shell commands on the user's environment.
|
|
9
9
|
|
|
10
|
-
Best practices:
|
|
11
|
-
|
|
12
|
-
- Use \`ls\` to list files.
|
|
13
|
-
- Use \`fd\` or \`find\` to locate files/directories by name, type, size, time, permissions, etc.
|
|
14
|
-
- Use \`rg\` or \`grep\` to search inside files for matching patterns.
|
|
15
|
-
- Use \`cat -n\` or \`nl\` to read small files, or when you need the whole file.
|
|
16
|
-
- Use \`sed -n\` with ranges to read sections of files. Prefer targeted reads. Avoid dumping very large (more than ~200 lines) files all at once.
|
|
17
|
-
- Use \`cp\`, \`mv\`, and \`mkdir\` for file and directory operations, and \`rm\` to remove files and directories.
|
|
18
|
-
- Use \`curl\` for web access. Use redirection to temp files for targeted reads.
|
|
19
|
-
- Use development tools like \`git\`, \`gh\`, \`jq\`, etc, when appropriate.
|
|
20
|
-
- Prefer \`cp -i\`, \`mv -i\`, \`rm -i\` when learning.
|
|
21
|
-
- NEVER run destructive commands (\`rm -rf\`, \`git reset --hard\`, overwriting files) without confirming the target first.
|
|
22
10
|
- Chain commands **only** when failure should stop the flow. Avoid long chains, **2 to 3 maximum**.
|
|
23
11
|
- Avoid overly complex one-liners; readability matters.
|
|
24
12
|
- Quote filenames: use \`"$file"\` not \`$file\`.
|
package/src/tool-edit.ts
CHANGED
|
@@ -1,35 +1,23 @@
|
|
|
1
1
|
import { isAbsolute, join } from "node:path";
|
|
2
|
-
import { type Tool, Type } from "@
|
|
2
|
+
import { type Tool, Type } from "@earendil-works/pi-ai";
|
|
3
3
|
import { createPatch } from "diff";
|
|
4
4
|
import type { ToolRunnerEvent } from "./types";
|
|
5
5
|
|
|
6
|
-
const description =
|
|
6
|
+
const description = `Edit tool
|
|
7
7
|
|
|
8
8
|
A find-and-replace file editor. Use it to create new files or modify existing ones safely. Always prefer this tool over bash editing methods (sed, awk, etc).
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Rules
|
|
11
|
+
|
|
11
12
|
- The tool refuses to edit on multiple matches of \`oldText\`. Be specific with your matching text.
|
|
12
13
|
- Prefer patch-based edits (small targeted replacements) for multi-line or semantic changes.
|
|
13
14
|
- Do NOT reproduce entire files. Use shell file operations (\`cp\`, \`mv\`, etc) for wholesale file replacement instead.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
Failure modes
|
|
17
|
+
|
|
16
18
|
- If \`oldText\` is not found, the edit fails. Verify the exact text first.
|
|
17
19
|
- If \`oldText\` matches multiple locations, the edit fails. Narrow your match and retry.
|
|
18
20
|
- If the file does not exist and \`oldText\` is non-empty, the edit fails.
|
|
19
|
-
|
|
20
|
-
<example>
|
|
21
|
-
Edit a single line:
|
|
22
|
-
path: src/utils.ts
|
|
23
|
-
oldText: const MAX_RETRIES = 3;
|
|
24
|
-
newText: const MAX_RETRIES = 5;
|
|
25
|
-
</example>
|
|
26
|
-
|
|
27
|
-
<example>
|
|
28
|
-
Patch-based edit (preferred for multi-line changes):
|
|
29
|
-
path: src/utils.ts
|
|
30
|
-
oldText: function oldHelper() {\n return 1;\n}
|
|
31
|
-
newText: function newHelper() {\n return 2;\n}\n\nfunction oldHelper() {\n return 1;\n}
|
|
32
|
-
</example>
|
|
33
21
|
`;
|
|
34
22
|
|
|
35
23
|
export const edit: Tool = {
|
package/src/tool-read.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Buffer } from "node:buffer";
|
|
2
2
|
import { extname, isAbsolute, join } from "node:path";
|
|
3
|
-
import { type Tool, Type } from "@
|
|
3
|
+
import { type Tool, Type } from "@earendil-works/pi-ai";
|
|
4
4
|
import type { ToolRunnerEvent } from "./types";
|
|
5
5
|
|
|
6
6
|
const imageMimeTypes: Record<string, string> = {
|
|
@@ -13,7 +13,7 @@ const imageMimeTypes: Record<string, string> = {
|
|
|
13
13
|
".webp": "image/webp",
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
const description =
|
|
16
|
+
const description = `Read tool
|
|
17
17
|
|
|
18
18
|
Read a file by path.
|
|
19
19
|
|
package/src/tui-components.ts
CHANGED
|
@@ -114,11 +114,11 @@ export function ContextPill(state: TUIState) {
|
|
|
114
114
|
const smartPercent = Math.floor((state.contextSize / smartMax) * 100);
|
|
115
115
|
if (smartPercent > 90) {
|
|
116
116
|
bg = theme.bred;
|
|
117
|
-
} else if (smartPercent >
|
|
117
|
+
} else if (smartPercent > 85) {
|
|
118
118
|
bg = theme.red;
|
|
119
|
-
} else if (smartPercent >
|
|
119
|
+
} else if (smartPercent > 80) {
|
|
120
120
|
bg = theme.yellow;
|
|
121
|
-
} else if (smartPercent >
|
|
121
|
+
} else if (smartPercent > 60) {
|
|
122
122
|
bg = theme.byellow;
|
|
123
123
|
}
|
|
124
124
|
text = `~${percent}%`;
|
|
@@ -126,7 +126,7 @@ export function ContextPill(state: TUIState) {
|
|
|
126
126
|
|
|
127
127
|
text += ` (${state.options.model.contextWindow / 1000}k)`;
|
|
128
128
|
|
|
129
|
-
return TextPill(text, theme.
|
|
129
|
+
return TextPill(text, theme.black, bg);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
export function GitPill(state: TUIState) {
|
package/src/tui-conversation.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type {
|
|
|
5
5
|
Message,
|
|
6
6
|
ToolResultMessage,
|
|
7
7
|
UserMessage,
|
|
8
|
-
} from "@
|
|
8
|
+
} from "@earendil-works/pi-ai";
|
|
9
9
|
import { estimateTokens, relativeTime } from "./shared";
|
|
10
10
|
import { TextPill, theme } from "./tui-components";
|
|
11
11
|
import type { TUIState } from "./types";
|
package/src/tui-overlay.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HStack, Text, TextInput, VStack } from "@cel-tui/core";
|
|
2
|
-
import { getModels, type ThinkingLevel } from "@
|
|
3
|
-
import { getOAuthProviders } from "@
|
|
2
|
+
import { getModels, type ThinkingLevel } from "@earendil-works/pi-ai";
|
|
3
|
+
import { getOAuthProviders } from "@earendil-works/pi-ai/oauth";
|
|
4
4
|
import { saveSettings } from "./args";
|
|
5
5
|
import { getAvailableProviders } from "./oauth";
|
|
6
6
|
import { listSessionsForCwd } from "./session";
|
package/src/tui.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { cel, HStack, ProcessTerminal, VStack } from "@cel-tui/core";
|
|
2
2
|
import simpleGit from "simple-git";
|
|
3
3
|
import { compactContext, streamAgent } from "./agent";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
buildSystemPrompt,
|
|
6
|
+
injectEnvReminder,
|
|
7
|
+
insertToolUsageReminder,
|
|
8
|
+
MAIN_PROMPT,
|
|
9
|
+
} from "./prompt";
|
|
5
10
|
import { updateSession } from "./session";
|
|
6
11
|
import { estimateTokens, secureRandomString } from "./shared";
|
|
7
12
|
import { bash, runBashTool } from "./tool-bash";
|
|
@@ -184,20 +189,19 @@ async function streamAgentTUI(state: TUIState) {
|
|
|
184
189
|
break;
|
|
185
190
|
|
|
186
191
|
case "tool_message_end": {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
// }
|
|
192
|
+
const withReminder = insertToolUsageReminder(
|
|
193
|
+
state.messages,
|
|
194
|
+
ev.message,
|
|
195
|
+
);
|
|
196
|
+
|
|
197
|
+
const idx = state.messages.findIndex(
|
|
198
|
+
(m) =>
|
|
199
|
+
m.role === "toolResult" &&
|
|
200
|
+
m.toolCallId === withReminder.toolCallId,
|
|
201
|
+
);
|
|
202
|
+
if (idx >= 0) {
|
|
203
|
+
state.messages[idx] = withReminder;
|
|
204
|
+
}
|
|
201
205
|
|
|
202
206
|
state.contextSize = estimateTokens(JSON.stringify(ctx));
|
|
203
207
|
}
|
package/src/types.ts
CHANGED
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
type Tool,
|
|
9
9
|
type ToolResultMessage,
|
|
10
10
|
Type,
|
|
11
|
-
} from "@
|
|
12
|
-
import type { OAuthCredentials } from "@
|
|
11
|
+
} from "@earendil-works/pi-ai";
|
|
12
|
+
import type { OAuthCredentials } from "@earendil-works/pi-ai/oauth";
|
|
13
13
|
|
|
14
14
|
const ThinkingLevelSchema = Type.Unsafe<ThinkingLevel>(
|
|
15
15
|
Type.Union([
|