@entelligentsia/forgecli 0.9.1 → 0.9.3

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.
Files changed (121) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/CHANGELOG-pi.md +14 -19
  3. package/dist/bin/update-cli.js +1 -1
  4. package/dist/bin/update-cli.js.map +1 -1
  5. package/dist/extensions/forgecli/forge-update-command.d.ts +3 -1
  6. package/dist/extensions/forgecli/forge-update-command.js +48 -18
  7. package/dist/extensions/forgecli/forge-update-command.js.map +1 -1
  8. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
  9. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +6 -1
  10. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
  11. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts.map +1 -1
  12. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +2 -0
  13. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js.map +1 -1
  14. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  15. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +15 -0
  16. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
  17. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +15 -0
  18. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
  19. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +80 -0
  20. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  21. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +20 -0
  22. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
  23. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  24. package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +14 -19
  25. package/node_modules/@earendil-works/pi-coding-agent/dist/cli.d.ts.map +1 -1
  26. package/node_modules/@earendil-works/pi-coding-agent/dist/cli.js +3 -3
  27. package/node_modules/@earendil-works/pi-coding-agent/dist/cli.js.map +1 -1
  28. package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts.map +1 -1
  29. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +35 -27
  30. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js.map +1 -1
  31. package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/template.js +17 -3
  32. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
  33. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +4 -8
  34. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js.map +1 -1
  35. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
  36. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +3 -2
  37. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
  38. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.d.ts.map +1 -1
  39. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +1 -0
  40. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js.map +1 -1
  41. package/node_modules/@earendil-works/pi-coding-agent/dist/main.d.ts.map +1 -1
  42. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +5 -1
  43. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js.map +1 -1
  44. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  45. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/extension-editor.js +14 -6
  46. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/extension-editor.js.map +1 -1
  47. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  48. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +13 -6
  49. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  50. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/dark.json +5 -4
  51. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/light.json +5 -4
  52. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +21 -2
  53. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  54. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +82 -40
  55. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
  56. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts.map +1 -1
  57. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +22 -5
  58. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js.map +1 -1
  59. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.d.ts +5 -8
  60. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.d.ts.map +1 -1
  61. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.js +8 -59
  62. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.js.map +1 -1
  63. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/shell.d.ts.map +1 -1
  64. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/shell.js +6 -1
  65. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/shell.js.map +1 -1
  66. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/windows-self-update.d.ts +3 -0
  67. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/windows-self-update.d.ts.map +1 -0
  68. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/windows-self-update.js +77 -0
  69. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/windows-self-update.js.map +1 -0
  70. package/node_modules/@earendil-works/pi-coding-agent/docs/index.md +8 -0
  71. package/node_modules/@earendil-works/pi-coding-agent/docs/packages.md +2 -0
  72. package/node_modules/@earendil-works/pi-coding-agent/docs/quickstart.md +20 -0
  73. package/node_modules/@earendil-works/pi-coding-agent/docs/usage.md +2 -0
  74. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
  75. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  76. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
  77. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/subagent/README.md +3 -0
  78. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/subagent/index.ts +41 -19
  79. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
  80. package/node_modules/@earendil-works/pi-coding-agent/package.json +6 -4
  81. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
  82. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +3 -4
  83. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
  84. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  85. package/node_modules/cross-spawn/LICENSE +21 -0
  86. package/node_modules/cross-spawn/README.md +89 -0
  87. package/node_modules/cross-spawn/index.js +39 -0
  88. package/node_modules/cross-spawn/lib/enoent.js +59 -0
  89. package/node_modules/cross-spawn/lib/parse.js +91 -0
  90. package/node_modules/cross-spawn/lib/util/escape.js +47 -0
  91. package/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
  92. package/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
  93. package/node_modules/cross-spawn/package.json +73 -0
  94. package/node_modules/isexe/.npmignore +2 -0
  95. package/node_modules/isexe/LICENSE +15 -0
  96. package/node_modules/isexe/README.md +51 -0
  97. package/node_modules/isexe/index.js +57 -0
  98. package/node_modules/isexe/mode.js +41 -0
  99. package/node_modules/isexe/package.json +31 -0
  100. package/node_modules/isexe/test/basic.js +221 -0
  101. package/node_modules/isexe/windows.js +42 -0
  102. package/node_modules/path-key/index.d.ts +40 -0
  103. package/node_modules/path-key/index.js +16 -0
  104. package/node_modules/path-key/license +9 -0
  105. package/node_modules/path-key/package.json +39 -0
  106. package/node_modules/path-key/readme.md +61 -0
  107. package/node_modules/shebang-command/index.js +19 -0
  108. package/node_modules/shebang-command/license +9 -0
  109. package/node_modules/shebang-command/package.json +34 -0
  110. package/node_modules/shebang-command/readme.md +34 -0
  111. package/node_modules/shebang-regex/index.d.ts +22 -0
  112. package/node_modules/shebang-regex/index.js +2 -0
  113. package/node_modules/shebang-regex/license +9 -0
  114. package/node_modules/shebang-regex/package.json +35 -0
  115. package/node_modules/shebang-regex/readme.md +33 -0
  116. package/node_modules/which/LICENSE +15 -0
  117. package/node_modules/which/README.md +54 -0
  118. package/node_modules/which/bin/node-which +52 -0
  119. package/node_modules/which/package.json +43 -0
  120. package/node_modules/which/which.js +125 -0
  121. package/package.json +6 -6
@@ -0,0 +1,54 @@
1
+ # which
2
+
3
+ Like the unix `which` utility.
4
+
5
+ Finds the first instance of a specified executable in the PATH
6
+ environment variable. Does not cache the results, so `hash -r` is not
7
+ needed when the PATH changes.
8
+
9
+ ## USAGE
10
+
11
+ ```javascript
12
+ var which = require('which')
13
+
14
+ // async usage
15
+ which('node', function (er, resolvedPath) {
16
+ // er is returned if no "node" is found on the PATH
17
+ // if it is found, then the absolute path to the exec is returned
18
+ })
19
+
20
+ // or promise
21
+ which('node').then(resolvedPath => { ... }).catch(er => { ... not found ... })
22
+
23
+ // sync usage
24
+ // throws if not found
25
+ var resolved = which.sync('node')
26
+
27
+ // if nothrow option is used, returns null if not found
28
+ resolved = which.sync('node', {nothrow: true})
29
+
30
+ // Pass options to override the PATH and PATHEXT environment vars.
31
+ which('node', { path: someOtherPath }, function (er, resolved) {
32
+ if (er)
33
+ throw er
34
+ console.log('found at %j', resolved)
35
+ })
36
+ ```
37
+
38
+ ## CLI USAGE
39
+
40
+ Same as the BSD `which(1)` binary.
41
+
42
+ ```
43
+ usage: which [-as] program ...
44
+ ```
45
+
46
+ ## OPTIONS
47
+
48
+ You may pass an options object as the second argument.
49
+
50
+ - `path`: Use instead of the `PATH` environment variable.
51
+ - `pathExt`: Use instead of the `PATHEXT` environment variable.
52
+ - `all`: Return all matches, instead of just the first one. Note that
53
+ this means the function returns an array of strings instead of a
54
+ single string.
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env node
2
+ var which = require("../")
3
+ if (process.argv.length < 3)
4
+ usage()
5
+
6
+ function usage () {
7
+ console.error('usage: which [-as] program ...')
8
+ process.exit(1)
9
+ }
10
+
11
+ var all = false
12
+ var silent = false
13
+ var dashdash = false
14
+ var args = process.argv.slice(2).filter(function (arg) {
15
+ if (dashdash || !/^-/.test(arg))
16
+ return true
17
+
18
+ if (arg === '--') {
19
+ dashdash = true
20
+ return false
21
+ }
22
+
23
+ var flags = arg.substr(1).split('')
24
+ for (var f = 0; f < flags.length; f++) {
25
+ var flag = flags[f]
26
+ switch (flag) {
27
+ case 's':
28
+ silent = true
29
+ break
30
+ case 'a':
31
+ all = true
32
+ break
33
+ default:
34
+ console.error('which: illegal option -- ' + flag)
35
+ usage()
36
+ }
37
+ }
38
+ return false
39
+ })
40
+
41
+ process.exit(args.reduce(function (pv, current) {
42
+ try {
43
+ var f = which.sync(current, { all: all })
44
+ if (all)
45
+ f = f.join('\n')
46
+ if (!silent)
47
+ console.log(f)
48
+ return pv;
49
+ } catch (e) {
50
+ return 1;
51
+ }
52
+ }, 0))
@@ -0,0 +1,43 @@
1
+ {
2
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
3
+ "name": "which",
4
+ "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
5
+ "version": "2.0.2",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git://github.com/isaacs/node-which.git"
9
+ },
10
+ "main": "which.js",
11
+ "bin": {
12
+ "node-which": "./bin/node-which"
13
+ },
14
+ "license": "ISC",
15
+ "dependencies": {
16
+ "isexe": "^2.0.0"
17
+ },
18
+ "devDependencies": {
19
+ "mkdirp": "^0.5.0",
20
+ "rimraf": "^2.6.2",
21
+ "tap": "^14.6.9"
22
+ },
23
+ "scripts": {
24
+ "test": "tap",
25
+ "preversion": "npm test",
26
+ "postversion": "npm publish",
27
+ "prepublish": "npm run changelog",
28
+ "prechangelog": "bash gen-changelog.sh",
29
+ "changelog": "git add CHANGELOG.md",
30
+ "postchangelog": "git commit -m 'update changelog - '${npm_package_version}",
31
+ "postpublish": "git push origin --follow-tags"
32
+ },
33
+ "files": [
34
+ "which.js",
35
+ "bin/node-which"
36
+ ],
37
+ "tap": {
38
+ "check-coverage": true
39
+ },
40
+ "engines": {
41
+ "node": ">= 8"
42
+ }
43
+ }
@@ -0,0 +1,125 @@
1
+ const isWindows = process.platform === 'win32' ||
2
+ process.env.OSTYPE === 'cygwin' ||
3
+ process.env.OSTYPE === 'msys'
4
+
5
+ const path = require('path')
6
+ const COLON = isWindows ? ';' : ':'
7
+ const isexe = require('isexe')
8
+
9
+ const getNotFoundError = (cmd) =>
10
+ Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })
11
+
12
+ const getPathInfo = (cmd, opt) => {
13
+ const colon = opt.colon || COLON
14
+
15
+ // If it has a slash, then we don't bother searching the pathenv.
16
+ // just check the file itself, and that's it.
17
+ const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? ['']
18
+ : (
19
+ [
20
+ // windows always checks the cwd first
21
+ ...(isWindows ? [process.cwd()] : []),
22
+ ...(opt.path || process.env.PATH ||
23
+ /* istanbul ignore next: very unusual */ '').split(colon),
24
+ ]
25
+ )
26
+ const pathExtExe = isWindows
27
+ ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'
28
+ : ''
29
+ const pathExt = isWindows ? pathExtExe.split(colon) : ['']
30
+
31
+ if (isWindows) {
32
+ if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
33
+ pathExt.unshift('')
34
+ }
35
+
36
+ return {
37
+ pathEnv,
38
+ pathExt,
39
+ pathExtExe,
40
+ }
41
+ }
42
+
43
+ const which = (cmd, opt, cb) => {
44
+ if (typeof opt === 'function') {
45
+ cb = opt
46
+ opt = {}
47
+ }
48
+ if (!opt)
49
+ opt = {}
50
+
51
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)
52
+ const found = []
53
+
54
+ const step = i => new Promise((resolve, reject) => {
55
+ if (i === pathEnv.length)
56
+ return opt.all && found.length ? resolve(found)
57
+ : reject(getNotFoundError(cmd))
58
+
59
+ const ppRaw = pathEnv[i]
60
+ const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw
61
+
62
+ const pCmd = path.join(pathPart, cmd)
63
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
64
+ : pCmd
65
+
66
+ resolve(subStep(p, i, 0))
67
+ })
68
+
69
+ const subStep = (p, i, ii) => new Promise((resolve, reject) => {
70
+ if (ii === pathExt.length)
71
+ return resolve(step(i + 1))
72
+ const ext = pathExt[ii]
73
+ isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
74
+ if (!er && is) {
75
+ if (opt.all)
76
+ found.push(p + ext)
77
+ else
78
+ return resolve(p + ext)
79
+ }
80
+ return resolve(subStep(p, i, ii + 1))
81
+ })
82
+ })
83
+
84
+ return cb ? step(0).then(res => cb(null, res), cb) : step(0)
85
+ }
86
+
87
+ const whichSync = (cmd, opt) => {
88
+ opt = opt || {}
89
+
90
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)
91
+ const found = []
92
+
93
+ for (let i = 0; i < pathEnv.length; i ++) {
94
+ const ppRaw = pathEnv[i]
95
+ const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw
96
+
97
+ const pCmd = path.join(pathPart, cmd)
98
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
99
+ : pCmd
100
+
101
+ for (let j = 0; j < pathExt.length; j ++) {
102
+ const cur = p + pathExt[j]
103
+ try {
104
+ const is = isexe.sync(cur, { pathExt: pathExtExe })
105
+ if (is) {
106
+ if (opt.all)
107
+ found.push(cur)
108
+ else
109
+ return cur
110
+ }
111
+ } catch (ex) {}
112
+ }
113
+ }
114
+
115
+ if (opt.all && found.length)
116
+ return found
117
+
118
+ if (opt.nothrow)
119
+ return null
120
+
121
+ throw getNotFoundError(cmd)
122
+ }
123
+
124
+ module.exports = which
125
+ which.sync = whichSync
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entelligentsia/forgecli",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "description": "Forge SDLC ported onto @earendil-works/pi-coding-agent — production launcher with three bin aliases (forge/forgecli/4ge). Bundles a curated fork of pi-coding-agent vendored under earendil-works names.",
5
5
  "license": "MIT",
6
6
  "author": "Entelligentsia",
@@ -70,16 +70,16 @@
70
70
  "js-yaml"
71
71
  ],
72
72
  "dependencies": {
73
- "@earendil-works/pi-agent-core": "file:./vendor-pi/earendil-works-pi-agent-core-0.75.1.tgz",
74
- "@earendil-works/pi-ai": "file:./vendor-pi/earendil-works-pi-ai-0.75.1.tgz",
75
- "@earendil-works/pi-coding-agent": "0.75.1-forge.4",
76
- "@earendil-works/pi-tui": "file:./vendor-pi/earendil-works-pi-tui-0.75.1.tgz",
73
+ "@earendil-works/pi-agent-core": "file:./vendor-pi/earendil-works-pi-agent-core-0.75.3.tgz",
74
+ "@earendil-works/pi-ai": "file:./vendor-pi/earendil-works-pi-ai-0.75.3.tgz",
75
+ "@earendil-works/pi-coding-agent": "file:./vendor-pi/earendil-works-pi-coding-agent-0.75.3-forge.1.tgz",
76
+ "@earendil-works/pi-tui": "file:./vendor-pi/earendil-works-pi-tui-0.75.3.tgz",
77
77
  "ajv": "^8.20.0",
78
78
  "js-yaml": "^4.1.0",
79
79
  "typebox": "^1.1.24"
80
80
  },
81
81
  "peerDependencies": {
82
- "@earendil-works/pi-coding-agent": "0.75.1-forge.4"
82
+ "@earendil-works/pi-coding-agent": "0.75.3-forge.1"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@biomejs/biome": "^2.3.5",