@caupulican/pi-adaptative 0.80.84 → 0.80.85
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 +19 -0
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +42 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/cost-guard.d.ts +1 -1
- package/dist/core/cost-guard.d.ts.map +1 -1
- package/dist/core/cost-guard.js +2 -2
- package/dist/core/cost-guard.js.map +1 -1
- package/dist/core/profile-registry.d.ts +2 -1
- package/dist/core/profile-registry.d.ts.map +1 -1
- package/dist/core/profile-registry.js +32 -2
- package/dist/core/profile-registry.js.map +1 -1
- package/dist/core/settings-manager.d.ts +2 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +33 -3
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/modes/interactive/components/profile-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/profile-selector.js +2 -0
- package/dist/modes/interactive/components/profile-selector.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-selector.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/profile-selector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,UAAU,EAAsC,MAAM,oBAAoB,CAAC;AAChH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"profile-selector.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/profile-selector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,UAAU,EAAsC,MAAM,oBAAoB,CAAC;AAChH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AA8B3E,qBAAa,wBAAyB,SAAQ,SAAS;IACtD,OAAO,CAAC,UAAU,CAAa;IAE/B,YACC,QAAQ,EAAE,iBAAiB,EAAE,EAC7B,kBAAkB,EAAE,MAAM,EAAE,EAC5B,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,EACvC,QAAQ,EAAE,MAAM,IAAI,EAgDpB;IAED,aAAa,IAAI,UAAU,CAE1B;CACD","sourcesContent":["import { Container, type SelectItem, SelectList, type SelectListLayoutOptions, Text } from \"@caupulican/pi-tui\";\nimport type { NormalizedProfile } from \"../../../core/profile-registry.ts\";\nimport { getSelectListTheme, theme } from \"../theme/theme.ts\";\nimport { DynamicBorder } from \"./dynamic-border.ts\";\n\nconst PROFILE_SELECT_LIST_LAYOUT: SelectListLayoutOptions = {\n\tminPrimaryColumnWidth: 12,\n\tmaxPrimaryColumnWidth: 32,\n};\n\nfunction profileSourceLabel(profile: NormalizedProfile): string {\n\tswitch (profile.source) {\n\t\tcase \"global-settings\":\n\t\t\treturn \"global settings\";\n\t\tcase \"project-settings\":\n\t\t\treturn \"project settings\";\n\t\tcase \"external-settings\":\n\t\t\treturn \"external settings\";\n\t\tcase \"directory-overlay\":\n\t\t\treturn \"directory overlay\";\n\t\tcase \"profile-file\":\n\t\t\treturn \"profile file\";\n\t\tcase \"inline\":\n\t\t\treturn \"runtime\";\n\t\tcase \"embedded\":\n\t\t\treturn \"embedded\";\n\t\tcase \"bundle\":\n\t\t\treturn \"bundle\";\n\t}\n}\n\nexport class ProfileSelectorComponent extends Container {\n\tprivate selectList: SelectList;\n\n\tconstructor(\n\t\tprofiles: NormalizedProfile[],\n\t\tactiveProfileNames: string[],\n\t\tonSelect: (profileName: string) => void,\n\t\tonCancel: () => void,\n\t) {\n\t\tsuper();\n\n\t\tthis.addChild(new DynamicBorder());\n\t\tthis.addChild(new Text(theme.fg(\"accent\", theme.bold(\"Profiles\")), 1, 0));\n\n\t\tconst active = new Set(activeProfileNames);\n\t\tconst items: SelectItem[] = [\n\t\t\t{\n\t\t\t\tvalue: \"(none)\",\n\t\t\t\tlabel: \"(none)\",\n\t\t\t\tdescription: active.size === 0 ? \"active\" : \"Use configured profile selection (session default)\",\n\t\t\t},\n\t\t\t...profiles.map((profile) => ({\n\t\t\t\tvalue: profile.name,\n\t\t\t\tlabel: profile.name,\n\t\t\t\tdescription: [\n\t\t\t\t\tactive.has(profile.name) ? \"active\" : undefined,\n\t\t\t\t\tprofileSourceLabel(profile),\n\t\t\t\t\tprofile.description,\n\t\t\t\t]\n\t\t\t\t\t.filter((part): part is string => Boolean(part))\n\t\t\t\t\t.join(\" · \"),\n\t\t\t})),\n\t\t];\n\n\t\tif (profiles.length === 0) {\n\t\t\titems.push({\n\t\t\t\tvalue: \"\",\n\t\t\t\tlabel: \"No profiles found\",\n\t\t\t\tdescription: \"Create profiles under ~/.pi/agent/profiles/ or settings.resourceProfiles\",\n\t\t\t});\n\t\t}\n\n\t\tthis.selectList = new SelectList(items, 10, getSelectListTheme(), PROFILE_SELECT_LIST_LAYOUT);\n\t\tconst activeIndex = items.findIndex((item) => item.value && active.has(item.value));\n\t\tconst selectedIndex = activeIndex >= 0 ? activeIndex : items.length > 0 && items[0].value === \"(none)\" ? 0 : -1;\n\t\tif (selectedIndex >= 0) {\n\t\t\tthis.selectList.setSelectedIndex(selectedIndex);\n\t\t}\n\t\tthis.selectList.onSelect = (item) => {\n\t\t\tif (!item.value) return;\n\t\t\tonSelect(item.value);\n\t\t};\n\t\tthis.selectList.onCancel = onCancel;\n\t\tthis.addChild(this.selectList);\n\t\tthis.addChild(new DynamicBorder());\n\t}\n\n\tgetSelectList(): SelectList {\n\t\treturn this.selectList;\n\t}\n}\n"]}
|
|
@@ -11,6 +11,8 @@ function profileSourceLabel(profile) {
|
|
|
11
11
|
return "global settings";
|
|
12
12
|
case "project-settings":
|
|
13
13
|
return "project settings";
|
|
14
|
+
case "external-settings":
|
|
15
|
+
return "external settings";
|
|
14
16
|
case "directory-overlay":
|
|
15
17
|
return "directory overlay";
|
|
16
18
|
case "profile-file":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-selector.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/profile-selector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,UAAU,EAAgC,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAEhH,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,0BAA0B,GAA4B;IAC3D,qBAAqB,EAAE,EAAE;IACzB,qBAAqB,EAAE,EAAE;CACzB,CAAC;AAEF,SAAS,kBAAkB,CAAC,OAA0B,EAAU;IAC/D,QAAQ,OAAO,CAAC,MAAM,EAAE,CAAC;QACxB,KAAK,iBAAiB;YACrB,OAAO,iBAAiB,CAAC;QAC1B,KAAK,kBAAkB;YACtB,OAAO,kBAAkB,CAAC;QAC3B,KAAK,mBAAmB;YACvB,OAAO,mBAAmB,CAAC;QAC5B,KAAK,cAAc;YAClB,OAAO,cAAc,CAAC;QACvB,KAAK,QAAQ;YACZ,OAAO,SAAS,CAAC;QAClB,KAAK,UAAU;YACd,OAAO,UAAU,CAAC;QACnB,KAAK,QAAQ;YACZ,OAAO,QAAQ,CAAC;IAClB,CAAC;AAAA,CACD;AAED,MAAM,OAAO,wBAAyB,SAAQ,SAAS;IAC9C,UAAU,CAAa;IAE/B,YACC,QAA6B,EAC7B,kBAA4B,EAC5B,QAAuC,EACvC,QAAoB,EACnB;QACD,KAAK,EAAE,CAAC;QAER,IAAI,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AE,EAAE,0BAA0B,CAAC,CAAC;QAC9F,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACpF,MAAM,aAAa,GAAG,WAAW,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAChH,IAAI,aAAa,IAAI,CAAC,EAAE,CAAC;YACxB,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QACjD,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC;YACpC,IAAI,CAAC,IAAI,CAAC,KAAK;gBAAE,OAAO;YACxB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAAA,CACrB,CAAC;QACF,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACpC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,aAAa,EAAE,CAAC,CAAC;IAAA,CACnC;IAED,aAAa,GAAe;QAC3B,OAAO,IAAI,CAAC,UAAU,CAAC;IAAA,CACvB;CACD","sourcesContent":["import { Container, type SelectItem, SelectList, type SelectListLayoutOptions, Text } from \"@caupulican/pi-tui\";\nimport type { NormalizedProfile } from \"../../../core/profile-registry.ts\";\nimport { getSelectListTheme, theme } from \"../theme/theme.ts\";\nimport { DynamicBorder } from \"./dynamic-border.ts\";\n\nconst PROFILE_SELECT_LIST_LAYOUT: SelectListLayoutOptions = {\n\tminPrimaryColumnWidth: 12,\n\tmaxPrimaryColumnWidth: 32,\n};\n\nfunction profileSourceLabel(profile: NormalizedProfile): string {\n\tswitch (profile.source) {\n\t\tcase \"global-settings\":\n\t\t\treturn \"global settings\";\n\t\tcase \"project-settings\":\n\t\t\treturn \"project settings\";\n\t\tcase \"directory-overlay\":\n\t\t\treturn \"directory overlay\";\n\t\tcase \"profile-file\":\n\t\t\treturn \"profile file\";\n\t\tcase \"inline\":\n\t\t\treturn \"runtime\";\n\t\tcase \"embedded\":\n\t\t\treturn \"embedded\";\n\t\tcase \"bundle\":\n\t\t\treturn \"bundle\";\n\t}\n}\n\nexport class ProfileSelectorComponent extends Container {\n\tprivate selectList: SelectList;\n\n\tconstructor(\n\t\tprofiles: NormalizedProfile[],\n\t\tactiveProfileNames: string[],\n\t\tonSelect: (profileName: string) => void,\n\t\tonCancel: () => void,\n\t) {\n\t\tsuper();\n\n\t\tthis.addChild(new DynamicBorder());\n\t\tthis.addChild(new Text(theme.fg(\"accent\", theme.bold(\"Profiles\")), 1, 0));\n\n\t\tconst active = new Set(activeProfileNames);\n\t\tconst items: SelectItem[] = [\n\t\t\t{\n\t\t\t\tvalue: \"(none)\",\n\t\t\t\tlabel: \"(none)\",\n\t\t\t\tdescription: active.size === 0 ? \"active\" : \"Use configured profile selection (session default)\",\n\t\t\t},\n\t\t\t...profiles.map((profile) => ({\n\t\t\t\tvalue: profile.name,\n\t\t\t\tlabel: profile.name,\n\t\t\t\tdescription: [\n\t\t\t\t\tactive.has(profile.name) ? \"active\" : undefined,\n\t\t\t\t\tprofileSourceLabel(profile),\n\t\t\t\t\tprofile.description,\n\t\t\t\t]\n\t\t\t\t\t.filter((part): part is string => Boolean(part))\n\t\t\t\t\t.join(\" · \"),\n\t\t\t})),\n\t\t];\n\n\t\tif (profiles.length === 0) {\n\t\t\titems.push({\n\t\t\t\tvalue: \"\",\n\t\t\t\tlabel: \"No profiles found\",\n\t\t\t\tdescription: \"Create profiles under ~/.pi/agent/profiles/ or settings.resourceProfiles\",\n\t\t\t});\n\t\t}\n\n\t\tthis.selectList = new SelectList(items, 10, getSelectListTheme(), PROFILE_SELECT_LIST_LAYOUT);\n\t\tconst activeIndex = items.findIndex((item) => item.value && active.has(item.value));\n\t\tconst selectedIndex = activeIndex >= 0 ? activeIndex : items.length > 0 && items[0].value === \"(none)\" ? 0 : -1;\n\t\tif (selectedIndex >= 0) {\n\t\t\tthis.selectList.setSelectedIndex(selectedIndex);\n\t\t}\n\t\tthis.selectList.onSelect = (item) => {\n\t\t\tif (!item.value) return;\n\t\t\tonSelect(item.value);\n\t\t};\n\t\tthis.selectList.onCancel = onCancel;\n\t\tthis.addChild(this.selectList);\n\t\tthis.addChild(new DynamicBorder());\n\t}\n\n\tgetSelectList(): SelectList {\n\t\treturn this.selectList;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"profile-selector.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/profile-selector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,UAAU,EAAgC,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAEhH,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,0BAA0B,GAA4B;IAC3D,qBAAqB,EAAE,EAAE;IACzB,qBAAqB,EAAE,EAAE;CACzB,CAAC;AAEF,SAAS,kBAAkB,CAAC,OAA0B,EAAU;IAC/D,QAAQ,OAAO,CAAC,MAAM,EAAE,CAAC;QACxB,KAAK,iBAAiB;YACrB,OAAO,iBAAiB,CAAC;QAC1B,KAAK,kBAAkB;YACtB,OAAO,kBAAkB,CAAC;QAC3B,KAAK,mBAAmB;YACvB,OAAO,mBAAmB,CAAC;QAC5B,KAAK,mBAAmB;YACvB,OAAO,mBAAmB,CAAC;QAC5B,KAAK,cAAc;YAClB,OAAO,cAAc,CAAC;QACvB,KAAK,QAAQ;YACZ,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AAO,IAAI,CAAC,UAAU,CAAC;IAAA,CACvB;CACD","sourcesContent":["import { Container, type SelectItem, SelectList, type SelectListLayoutOptions, Text } from \"@caupulican/pi-tui\";\nimport type { NormalizedProfile } from \"../../../core/profile-registry.ts\";\nimport { getSelectListTheme, theme } from \"../theme/theme.ts\";\nimport { DynamicBorder } from \"./dynamic-border.ts\";\n\nconst PROFILE_SELECT_LIST_LAYOUT: SelectListLayoutOptions = {\n\tminPrimaryColumnWidth: 12,\n\tmaxPrimaryColumnWidth: 32,\n};\n\nfunction profileSourceLabel(profile: NormalizedProfile): string {\n\tswitch (profile.source) {\n\t\tcase \"global-settings\":\n\t\t\treturn \"global settings\";\n\t\tcase \"project-settings\":\n\t\t\treturn \"project settings\";\n\t\tcase \"external-settings\":\n\t\t\treturn \"external settings\";\n\t\tcase \"directory-overlay\":\n\t\t\treturn \"directory overlay\";\n\t\tcase \"profile-file\":\n\t\t\treturn \"profile file\";\n\t\tcase \"inline\":\n\t\t\treturn \"runtime\";\n\t\tcase \"embedded\":\n\t\t\treturn \"embedded\";\n\t\tcase \"bundle\":\n\t\t\treturn \"bundle\";\n\t}\n}\n\nexport class ProfileSelectorComponent extends Container {\n\tprivate selectList: SelectList;\n\n\tconstructor(\n\t\tprofiles: NormalizedProfile[],\n\t\tactiveProfileNames: string[],\n\t\tonSelect: (profileName: string) => void,\n\t\tonCancel: () => void,\n\t) {\n\t\tsuper();\n\n\t\tthis.addChild(new DynamicBorder());\n\t\tthis.addChild(new Text(theme.fg(\"accent\", theme.bold(\"Profiles\")), 1, 0));\n\n\t\tconst active = new Set(activeProfileNames);\n\t\tconst items: SelectItem[] = [\n\t\t\t{\n\t\t\t\tvalue: \"(none)\",\n\t\t\t\tlabel: \"(none)\",\n\t\t\t\tdescription: active.size === 0 ? \"active\" : \"Use configured profile selection (session default)\",\n\t\t\t},\n\t\t\t...profiles.map((profile) => ({\n\t\t\t\tvalue: profile.name,\n\t\t\t\tlabel: profile.name,\n\t\t\t\tdescription: [\n\t\t\t\t\tactive.has(profile.name) ? \"active\" : undefined,\n\t\t\t\t\tprofileSourceLabel(profile),\n\t\t\t\t\tprofile.description,\n\t\t\t\t]\n\t\t\t\t\t.filter((part): part is string => Boolean(part))\n\t\t\t\t\t.join(\" · \"),\n\t\t\t})),\n\t\t];\n\n\t\tif (profiles.length === 0) {\n\t\t\titems.push({\n\t\t\t\tvalue: \"\",\n\t\t\t\tlabel: \"No profiles found\",\n\t\t\t\tdescription: \"Create profiles under ~/.pi/agent/profiles/ or settings.resourceProfiles\",\n\t\t\t});\n\t\t}\n\n\t\tthis.selectList = new SelectList(items, 10, getSelectListTheme(), PROFILE_SELECT_LIST_LAYOUT);\n\t\tconst activeIndex = items.findIndex((item) => item.value && active.has(item.value));\n\t\tconst selectedIndex = activeIndex >= 0 ? activeIndex : items.length > 0 && items[0].value === \"(none)\" ? 0 : -1;\n\t\tif (selectedIndex >= 0) {\n\t\t\tthis.selectList.setSelectedIndex(selectedIndex);\n\t\t}\n\t\tthis.selectList.onSelect = (item) => {\n\t\t\tif (!item.value) return;\n\t\t\tonSelect(item.value);\n\t\t};\n\t\tthis.selectList.onCancel = onCancel;\n\t\tthis.addChild(this.selectList);\n\t\tthis.addChild(new DynamicBorder());\n\t}\n\n\tgetSelectList(): SelectList {\n\t\treturn this.selectList;\n\t}\n}\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "0.80.
|
|
3
|
+
"version": "0.80.82",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "0.80.
|
|
9
|
+
"version": "0.80.82",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "0.80.
|
|
3
|
+
"version": "0.80.82",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "0.80.
|
|
9
|
+
"version": "0.80.82",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "0.80.
|
|
3
|
+
"version": "0.80.82",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "0.80.
|
|
9
|
+
"version": "0.80.82",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caupulican/pi-adaptative",
|
|
3
|
-
"version": "0.80.
|
|
3
|
+
"version": "0.80.85",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@caupulican/pi-adaptative",
|
|
9
|
-
"version": "0.80.
|
|
9
|
+
"version": "0.80.85",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@caupulican/pi-agent-core": "^0.80.
|
|
13
|
-
"@caupulican/pi-ai": "^0.80.
|
|
14
|
-
"@caupulican/pi-tui": "^0.80.
|
|
12
|
+
"@caupulican/pi-agent-core": "^0.80.85",
|
|
13
|
+
"@caupulican/pi-ai": "^0.80.85",
|
|
14
|
+
"@caupulican/pi-tui": "^0.80.85",
|
|
15
15
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
16
16
|
"chalk": "5.6.2",
|
|
17
17
|
"cross-spawn": "7.0.6",
|
|
@@ -474,11 +474,11 @@
|
|
|
474
474
|
}
|
|
475
475
|
},
|
|
476
476
|
"node_modules/@caupulican/pi-agent-core": {
|
|
477
|
-
"version": "0.80.
|
|
478
|
-
"resolved": "https://registry.npmjs.org/@caupulican/pi-agent-core/-/pi-agent-core-0.80.
|
|
477
|
+
"version": "0.80.85",
|
|
478
|
+
"resolved": "https://registry.npmjs.org/@caupulican/pi-agent-core/-/pi-agent-core-0.80.85.tgz",
|
|
479
479
|
"license": "MIT",
|
|
480
480
|
"dependencies": {
|
|
481
|
-
"@caupulican/pi-ai": "^0.80.
|
|
481
|
+
"@caupulican/pi-ai": "^0.80.85",
|
|
482
482
|
"ignore": "7.0.5",
|
|
483
483
|
"typebox": "1.1.38",
|
|
484
484
|
"yaml": "2.9.0"
|
|
@@ -488,8 +488,8 @@
|
|
|
488
488
|
}
|
|
489
489
|
},
|
|
490
490
|
"node_modules/@caupulican/pi-ai": {
|
|
491
|
-
"version": "0.80.
|
|
492
|
-
"resolved": "https://registry.npmjs.org/@caupulican/pi-ai/-/pi-ai-0.80.
|
|
491
|
+
"version": "0.80.85",
|
|
492
|
+
"resolved": "https://registry.npmjs.org/@caupulican/pi-ai/-/pi-ai-0.80.85.tgz",
|
|
493
493
|
"license": "MIT",
|
|
494
494
|
"dependencies": {
|
|
495
495
|
"@anthropic-ai/sdk": "0.91.1",
|
|
@@ -511,8 +511,8 @@
|
|
|
511
511
|
}
|
|
512
512
|
},
|
|
513
513
|
"node_modules/@caupulican/pi-tui": {
|
|
514
|
-
"version": "0.80.
|
|
515
|
-
"resolved": "https://registry.npmjs.org/@caupulican/pi-tui/-/pi-tui-0.80.
|
|
514
|
+
"version": "0.80.85",
|
|
515
|
+
"resolved": "https://registry.npmjs.org/@caupulican/pi-tui/-/pi-tui-0.80.85.tgz",
|
|
516
516
|
"license": "MIT",
|
|
517
517
|
"dependencies": {
|
|
518
518
|
"get-east-asian-width": "1.6.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caupulican/pi-adaptative",
|
|
3
|
-
"version": "0.80.
|
|
3
|
+
"version": "0.80.85",
|
|
4
4
|
"description": "Adaptive fork of Pi coding agent for self-evolving agent harness experiments",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piConfig": {
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"prepublishOnly": "npm run clean && npm run build && npm run shrinkwrap"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@caupulican/pi-agent-core": "^0.80.
|
|
45
|
-
"@caupulican/pi-ai": "^0.80.
|
|
46
|
-
"@caupulican/pi-tui": "^0.80.
|
|
44
|
+
"@caupulican/pi-agent-core": "^0.80.85",
|
|
45
|
+
"@caupulican/pi-ai": "^0.80.85",
|
|
46
|
+
"@caupulican/pi-tui": "^0.80.85",
|
|
47
47
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
48
48
|
"chalk": "5.6.2",
|
|
49
49
|
"cross-spawn": "7.0.6",
|