gsd-pi 2.10.8 → 2.10.9
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/README.md +130 -82
- package/node_modules/@gsd/native/dist/index.d.ts +1 -1
- package/node_modules/@gsd/native/dist/index.js +1 -1
- package/node_modules/@gsd/native/dist/xxhash/index.d.ts +10 -1
- package/node_modules/@gsd/native/dist/xxhash/index.js +71 -2
- package/node_modules/@gsd/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@gsd/pi-agent-core/dist/agent-loop.js +79 -3
- package/node_modules/@gsd/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@gsd/pi-agent-core/src/agent-loop.ts +78 -3
- package/node_modules/@gsd/pi-ai/dist/providers/anthropic.js +5 -1
- package/node_modules/@gsd/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/node_modules/@gsd/pi-ai/src/providers/anthropic.ts +5 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/agent-session.js +21 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/auth-storage.d.ts +6 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/auth-storage.js +21 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/auth-storage.test.js +70 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/core/sdk.js +15 -0
- package/node_modules/@gsd/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/resources/extensions/memory/index.js +6 -6
- package/node_modules/@gsd/pi-coding-agent/dist/resources/extensions/memory/index.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/resources/extensions/memory/storage.d.ts +6 -1
- package/node_modules/@gsd/pi-coding-agent/dist/resources/extensions/memory/storage.d.ts.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/dist/resources/extensions/memory/storage.js +118 -180
- package/node_modules/@gsd/pi-coding-agent/dist/resources/extensions/memory/storage.js.map +1 -1
- package/node_modules/@gsd/pi-coding-agent/package.json +2 -2
- package/node_modules/@gsd/pi-coding-agent/src/core/agent-session.ts +22 -1
- package/node_modules/@gsd/pi-coding-agent/src/core/auth-storage.test.ts +85 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/auth-storage.ts +22 -0
- package/node_modules/@gsd/pi-coding-agent/src/core/sdk.ts +19 -0
- package/node_modules/@gsd/pi-coding-agent/src/resources/extensions/memory/index.ts +6 -6
- package/node_modules/@gsd/pi-coding-agent/src/resources/extensions/memory/storage.ts +205 -230
- package/node_modules/@gsd/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/components/markdown.js +11 -2
- package/node_modules/@gsd/pi-tui/dist/components/markdown.js.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@gsd/pi-tui/dist/tui.js +5 -1
- package/node_modules/@gsd/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@gsd/pi-tui/src/components/markdown.ts +11 -2
- package/node_modules/@gsd/pi-tui/src/tui.ts +5 -1
- package/node_modules/sql.js/.devcontainer/Dockerfile +76 -0
- package/node_modules/sql.js/.devcontainer/devcontainer.json +20 -0
- package/node_modules/sql.js/.eslintrc.js +68 -0
- package/node_modules/sql.js/.jsdoc.config.json +38 -0
- package/node_modules/sql.js/AUTHORS +8 -0
- package/node_modules/sql.js/CONTRIBUTING.md +66 -0
- package/node_modules/sql.js/LICENSE +44 -0
- package/node_modules/sql.js/README.md +357 -0
- package/node_modules/sql.js/dist/sql-asm-debug.js +140890 -0
- package/node_modules/sql.js/dist/sql-asm-memory-growth.js +204 -0
- package/node_modules/sql.js/dist/sql-asm.js +202 -0
- package/node_modules/sql.js/dist/sql-wasm-browser-debug.js +7157 -0
- package/node_modules/sql.js/dist/sql-wasm-browser-debug.wasm +0 -0
- package/node_modules/sql.js/dist/sql-wasm-browser.js +183 -0
- package/node_modules/sql.js/dist/sql-wasm-browser.wasm +0 -0
- package/node_modules/sql.js/dist/sql-wasm-debug.js +7265 -0
- package/node_modules/sql.js/dist/sql-wasm-debug.wasm +0 -0
- package/node_modules/sql.js/dist/sql-wasm.js +185 -0
- package/node_modules/sql.js/dist/sql-wasm.wasm +0 -0
- package/node_modules/sql.js/dist/worker.sql-asm-debug.js +141011 -0
- package/node_modules/sql.js/dist/worker.sql-asm.js +323 -0
- package/node_modules/sql.js/dist/worker.sql-wasm-debug.js +7386 -0
- package/node_modules/sql.js/dist/worker.sql-wasm.js +306 -0
- package/node_modules/sql.js/documentation_index.md +26 -0
- package/node_modules/sql.js/eslint.config.cjs +57 -0
- package/node_modules/sql.js/logo.svg +13 -0
- package/node_modules/sql.js/package.json +58 -0
- package/package.json +1 -1
- package/packages/native/dist/index.d.ts +1 -1
- package/packages/native/dist/index.js +1 -1
- package/packages/native/dist/xxhash/index.d.ts +10 -1
- package/packages/native/dist/xxhash/index.js +71 -2
- package/packages/native/src/__tests__/xxhash.test.mjs +37 -1
- package/packages/native/src/index.ts +1 -1
- package/packages/native/src/xxhash/index.ts +82 -2
- package/packages/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/agent-loop.js +79 -3
- package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/packages/pi-agent-core/src/agent-loop.ts +78 -3
- package/packages/pi-ai/dist/providers/anthropic.js +5 -1
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/src/providers/anthropic.ts +5 -1
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +21 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +6 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js +21 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js +70 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +15 -0
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/resources/extensions/memory/index.js +6 -6
- package/packages/pi-coding-agent/dist/resources/extensions/memory/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.d.ts +6 -1
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.js +118 -180
- package/packages/pi-coding-agent/dist/resources/extensions/memory/storage.js.map +1 -1
- package/packages/pi-coding-agent/package.json +2 -2
- package/packages/pi-coding-agent/src/core/agent-session.ts +22 -1
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +85 -0
- package/packages/pi-coding-agent/src/core/auth-storage.ts +22 -0
- package/packages/pi-coding-agent/src/core/sdk.ts +19 -0
- package/packages/pi-coding-agent/src/resources/extensions/memory/index.ts +6 -6
- package/packages/pi-coding-agent/src/resources/extensions/memory/storage.ts +205 -230
- package/packages/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/markdown.js +11 -2
- package/packages/pi-tui/dist/components/markdown.js.map +1 -1
- package/packages/pi-tui/dist/tui.d.ts.map +1 -1
- package/packages/pi-tui/dist/tui.js +5 -1
- package/packages/pi-tui/dist/tui.js.map +1 -1
- package/packages/pi-tui/src/components/markdown.ts +11 -2
- package/packages/pi-tui/src/tui.ts +5 -1
- package/src/resources/extensions/get-secrets-from-user.ts +3 -3
- package/src/resources/extensions/gsd/auto.ts +285 -23
- package/src/resources/extensions/gsd/commands.ts +11 -1
- package/src/resources/extensions/gsd/dispatch-guard.ts +23 -10
- package/src/resources/extensions/gsd/docs/preferences-reference.md +2 -0
- package/src/resources/extensions/gsd/files.ts +8 -7
- package/src/resources/extensions/gsd/git-service.ts +77 -18
- package/src/resources/extensions/gsd/gitignore.ts +9 -5
- package/src/resources/extensions/gsd/guided-flow.ts +55 -11
- package/src/resources/extensions/gsd/index.ts +3 -3
- package/src/resources/extensions/gsd/migrate/index.ts +8 -8
- package/src/resources/extensions/gsd/migrate/parser.ts +3 -3
- package/src/resources/extensions/gsd/migrate/parsers.ts +2 -2
- package/src/resources/extensions/gsd/migrate/preview.ts +2 -2
- package/src/resources/extensions/gsd/migrate/transformer.ts +1 -1
- package/src/resources/extensions/gsd/migrate/validator.ts +1 -1
- package/src/resources/extensions/gsd/migrate/writer.ts +2 -2
- package/src/resources/extensions/gsd/native-parser-bridge.ts +1 -1
- package/src/resources/extensions/gsd/preferences.ts +15 -3
- package/src/resources/extensions/gsd/prompts/guided-complete-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/system.md +2 -2
- package/src/resources/extensions/gsd/roadmap-slices.ts +1 -1
- package/src/resources/extensions/gsd/state.ts +8 -7
- package/src/resources/extensions/gsd/templates/preferences.md +1 -0
- package/src/resources/extensions/gsd/tests/git-service.test.ts +97 -0
- package/src/resources/extensions/gsd/tests/idle-recovery.test.ts +182 -0
- package/src/resources/extensions/gsd/tests/integration-mixed-milestones.test.ts +607 -0
- package/src/resources/extensions/gsd/tests/orphaned-branch.test.ts +353 -0
- package/src/resources/extensions/gsd/tests/regex-hardening.test.ts +317 -0
- package/src/resources/extensions/gsd/tests/unique-milestone-ids.test.ts +258 -0
- package/src/resources/extensions/gsd/unit-runtime.ts +2 -2
- package/src/resources/extensions/gsd/workspace-index.ts +9 -8
- package/src/resources/extensions/gsd/worktree-command.ts +1 -1
- package/src/resources/extensions/gsd/worktree.ts +13 -11
- package/node_modules/better-sqlite3/LICENSE +0 -21
- package/node_modules/better-sqlite3/README.md +0 -99
- package/node_modules/better-sqlite3/binding.gyp +0 -38
- package/node_modules/better-sqlite3/deps/common.gypi +0 -68
- package/node_modules/better-sqlite3/deps/copy.js +0 -31
- package/node_modules/better-sqlite3/deps/defines.gypi +0 -41
- package/node_modules/better-sqlite3/deps/download.sh +0 -122
- package/node_modules/better-sqlite3/deps/patches/1208.patch +0 -15
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c +0 -261480
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.h +0 -13715
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3ext.h +0 -719
- package/node_modules/better-sqlite3/deps/sqlite3.gyp +0 -80
- package/node_modules/better-sqlite3/deps/test_extension.c +0 -21
- package/node_modules/better-sqlite3/lib/database.js +0 -90
- package/node_modules/better-sqlite3/lib/index.js +0 -3
- package/node_modules/better-sqlite3/lib/methods/aggregate.js +0 -43
- package/node_modules/better-sqlite3/lib/methods/backup.js +0 -67
- package/node_modules/better-sqlite3/lib/methods/function.js +0 -31
- package/node_modules/better-sqlite3/lib/methods/inspect.js +0 -7
- package/node_modules/better-sqlite3/lib/methods/pragma.js +0 -12
- package/node_modules/better-sqlite3/lib/methods/serialize.js +0 -16
- package/node_modules/better-sqlite3/lib/methods/table.js +0 -189
- package/node_modules/better-sqlite3/lib/methods/transaction.js +0 -78
- package/node_modules/better-sqlite3/lib/methods/wrappers.js +0 -54
- package/node_modules/better-sqlite3/lib/sqlite-error.js +0 -20
- package/node_modules/better-sqlite3/lib/util.js +0 -12
- package/node_modules/better-sqlite3/package.json +0 -54
- package/node_modules/better-sqlite3/src/better_sqlite3.cpp +0 -2186
- package/node_modules/better-sqlite3/src/better_sqlite3.hpp +0 -1036
- package/node_modules/bindings/LICENSE.md +0 -22
- package/node_modules/bindings/README.md +0 -98
- package/node_modules/bindings/bindings.js +0 -221
- package/node_modules/bindings/package.json +0 -28
- package/node_modules/bl/.travis.yml +0 -17
- package/node_modules/bl/BufferList.js +0 -396
- package/node_modules/bl/LICENSE.md +0 -13
- package/node_modules/bl/README.md +0 -247
- package/node_modules/bl/bl.js +0 -84
- package/node_modules/bl/package.json +0 -37
- package/node_modules/bl/test/convert.js +0 -21
- package/node_modules/bl/test/indexOf.js +0 -492
- package/node_modules/bl/test/isBufferList.js +0 -32
- package/node_modules/bl/test/test.js +0 -869
- package/node_modules/buffer/AUTHORS.md +0 -70
- package/node_modules/buffer/LICENSE +0 -21
- package/node_modules/buffer/README.md +0 -410
- package/node_modules/buffer/index.d.ts +0 -186
- package/node_modules/buffer/index.js +0 -1817
- package/node_modules/buffer/package.json +0 -96
- package/node_modules/chownr/LICENSE +0 -15
- package/node_modules/chownr/README.md +0 -3
- package/node_modules/chownr/chownr.js +0 -167
- package/node_modules/chownr/package.json +0 -29
- package/node_modules/decompress-response/index.d.ts +0 -22
- package/node_modules/decompress-response/index.js +0 -58
- package/node_modules/decompress-response/license +0 -9
- package/node_modules/decompress-response/package.json +0 -56
- package/node_modules/decompress-response/readme.md +0 -48
- package/node_modules/deep-extend/LICENSE +0 -20
- package/node_modules/deep-extend/README.md +0 -91
- package/node_modules/deep-extend/index.js +0 -1
- package/node_modules/deep-extend/lib/deep-extend.js +0 -150
- package/node_modules/deep-extend/package.json +0 -62
- package/node_modules/detect-libc/LICENSE +0 -201
- package/node_modules/detect-libc/README.md +0 -163
- package/node_modules/detect-libc/index.d.ts +0 -14
- package/node_modules/detect-libc/lib/detect-libc.js +0 -313
- package/node_modules/detect-libc/lib/elf.js +0 -39
- package/node_modules/detect-libc/lib/filesystem.js +0 -51
- package/node_modules/detect-libc/lib/process.js +0 -24
- package/node_modules/detect-libc/package.json +0 -44
- package/node_modules/expand-template/.travis.yml +0 -6
- package/node_modules/expand-template/LICENSE +0 -21
- package/node_modules/expand-template/README.md +0 -43
- package/node_modules/expand-template/index.js +0 -26
- package/node_modules/expand-template/package.json +0 -29
- package/node_modules/expand-template/test.js +0 -67
- package/node_modules/file-uri-to-path/.npmignore +0 -1
- package/node_modules/file-uri-to-path/.travis.yml +0 -30
- package/node_modules/file-uri-to-path/History.md +0 -21
- package/node_modules/file-uri-to-path/LICENSE +0 -20
- package/node_modules/file-uri-to-path/README.md +0 -74
- package/node_modules/file-uri-to-path/index.d.ts +0 -2
- package/node_modules/file-uri-to-path/index.js +0 -66
- package/node_modules/file-uri-to-path/package.json +0 -32
- package/node_modules/file-uri-to-path/test/test.js +0 -24
- package/node_modules/file-uri-to-path/test/tests.json +0 -13
- package/node_modules/fs-constants/LICENSE +0 -21
- package/node_modules/fs-constants/README.md +0 -26
- package/node_modules/fs-constants/browser.js +0 -1
- package/node_modules/fs-constants/index.js +0 -1
- package/node_modules/fs-constants/package.json +0 -19
- package/node_modules/github-from-package/.travis.yml +0 -4
- package/node_modules/github-from-package/LICENSE +0 -18
- package/node_modules/github-from-package/example/package.json +0 -8
- package/node_modules/github-from-package/example/url.js +0 -3
- package/node_modules/github-from-package/index.js +0 -17
- package/node_modules/github-from-package/package.json +0 -30
- package/node_modules/github-from-package/readme.markdown +0 -53
- package/node_modules/github-from-package/test/a.json +0 -8
- package/node_modules/github-from-package/test/b.json +0 -5
- package/node_modules/github-from-package/test/c.json +0 -5
- package/node_modules/github-from-package/test/d.json +0 -7
- package/node_modules/github-from-package/test/e.json +0 -5
- package/node_modules/github-from-package/test/url.js +0 -19
- package/node_modules/inherits/LICENSE +0 -16
- package/node_modules/inherits/README.md +0 -42
- package/node_modules/inherits/inherits.js +0 -9
- package/node_modules/inherits/inherits_browser.js +0 -27
- package/node_modules/inherits/package.json +0 -29
- package/node_modules/ini/LICENSE +0 -15
- package/node_modules/ini/README.md +0 -102
- package/node_modules/ini/ini.js +0 -206
- package/node_modules/ini/package.json +0 -33
- package/node_modules/mimic-response/index.d.ts +0 -17
- package/node_modules/mimic-response/index.js +0 -77
- package/node_modules/mimic-response/license +0 -9
- package/node_modules/mimic-response/package.json +0 -42
- package/node_modules/mimic-response/readme.md +0 -78
- package/node_modules/minimist/.eslintrc +0 -29
- package/node_modules/minimist/.github/FUNDING.yml +0 -12
- package/node_modules/minimist/.nycrc +0 -14
- package/node_modules/minimist/CHANGELOG.md +0 -298
- package/node_modules/minimist/LICENSE +0 -18
- package/node_modules/minimist/README.md +0 -121
- package/node_modules/minimist/example/parse.js +0 -4
- package/node_modules/minimist/index.js +0 -263
- package/node_modules/minimist/package.json +0 -75
- package/node_modules/minimist/test/all_bool.js +0 -34
- package/node_modules/minimist/test/bool.js +0 -177
- package/node_modules/minimist/test/dash.js +0 -43
- package/node_modules/minimist/test/default_bool.js +0 -37
- package/node_modules/minimist/test/dotted.js +0 -24
- package/node_modules/minimist/test/kv_short.js +0 -32
- package/node_modules/minimist/test/long.js +0 -33
- package/node_modules/minimist/test/num.js +0 -38
- package/node_modules/minimist/test/parse.js +0 -209
- package/node_modules/minimist/test/parse_modified.js +0 -11
- package/node_modules/minimist/test/proto.js +0 -64
- package/node_modules/minimist/test/short.js +0 -69
- package/node_modules/minimist/test/stop_early.js +0 -17
- package/node_modules/minimist/test/unknown.js +0 -104
- package/node_modules/minimist/test/whitespace.js +0 -10
- package/node_modules/mkdirp-classic/LICENSE +0 -21
- package/node_modules/mkdirp-classic/README.md +0 -18
- package/node_modules/mkdirp-classic/index.js +0 -98
- package/node_modules/mkdirp-classic/package.json +0 -18
- package/node_modules/napi-build-utils/.github/workflows/run-npm-tests.yml +0 -31
- package/node_modules/napi-build-utils/LICENSE +0 -21
- package/node_modules/napi-build-utils/README.md +0 -52
- package/node_modules/napi-build-utils/index.js +0 -214
- package/node_modules/napi-build-utils/package.json +0 -42
- package/node_modules/node-abi/LICENSE +0 -21
- package/node_modules/node-abi/README.md +0 -54
- package/node_modules/node-abi/abi_registry.json +0 -432
- package/node_modules/node-abi/index.js +0 -179
- package/node_modules/node-abi/package.json +0 -45
- package/node_modules/prebuild-install/CHANGELOG.md +0 -131
- package/node_modules/prebuild-install/CONTRIBUTING.md +0 -6
- package/node_modules/prebuild-install/LICENSE +0 -21
- package/node_modules/prebuild-install/README.md +0 -163
- package/node_modules/prebuild-install/asset.js +0 -44
- package/node_modules/prebuild-install/bin.js +0 -78
- package/node_modules/prebuild-install/download.js +0 -142
- package/node_modules/prebuild-install/error.js +0 -14
- package/node_modules/prebuild-install/help.txt +0 -16
- package/node_modules/prebuild-install/index.js +0 -1
- package/node_modules/prebuild-install/log.js +0 -33
- package/node_modules/prebuild-install/package.json +0 -67
- package/node_modules/prebuild-install/proxy.js +0 -35
- package/node_modules/prebuild-install/rc.js +0 -64
- package/node_modules/prebuild-install/util.js +0 -143
- package/node_modules/rc/LICENSE.APACHE2 +0 -15
- package/node_modules/rc/LICENSE.BSD +0 -26
- package/node_modules/rc/LICENSE.MIT +0 -24
- package/node_modules/rc/README.md +0 -227
- package/node_modules/rc/browser.js +0 -7
- package/node_modules/rc/cli.js +0 -4
- package/node_modules/rc/index.js +0 -53
- package/node_modules/rc/lib/utils.js +0 -104
- package/node_modules/rc/package.json +0 -29
- package/node_modules/rc/test/ini.js +0 -16
- package/node_modules/rc/test/nested-env-vars.js +0 -50
- package/node_modules/rc/test/test.js +0 -59
- package/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/readable-stream/LICENSE +0 -47
- package/node_modules/readable-stream/README.md +0 -106
- package/node_modules/readable-stream/errors-browser.js +0 -127
- package/node_modules/readable-stream/errors.js +0 -116
- package/node_modules/readable-stream/experimentalWarning.js +0 -17
- package/node_modules/readable-stream/lib/_stream_duplex.js +0 -126
- package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -37
- package/node_modules/readable-stream/lib/_stream_readable.js +0 -1027
- package/node_modules/readable-stream/lib/_stream_transform.js +0 -190
- package/node_modules/readable-stream/lib/_stream_writable.js +0 -641
- package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -180
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -183
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -96
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -86
- package/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
- package/node_modules/readable-stream/lib/internal/streams/from.js +0 -52
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -86
- package/node_modules/readable-stream/lib/internal/streams/state.js +0 -22
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/readable-stream/package.json +0 -68
- package/node_modules/readable-stream/readable-browser.js +0 -9
- package/node_modules/readable-stream/readable.js +0 -16
- package/node_modules/semver/LICENSE +0 -15
- package/node_modules/semver/README.md +0 -665
- package/node_modules/semver/bin/semver.js +0 -191
- package/node_modules/semver/classes/comparator.js +0 -143
- package/node_modules/semver/classes/index.js +0 -7
- package/node_modules/semver/classes/range.js +0 -557
- package/node_modules/semver/classes/semver.js +0 -333
- package/node_modules/semver/functions/clean.js +0 -8
- package/node_modules/semver/functions/cmp.js +0 -54
- package/node_modules/semver/functions/coerce.js +0 -62
- package/node_modules/semver/functions/compare-build.js +0 -9
- package/node_modules/semver/functions/compare-loose.js +0 -5
- package/node_modules/semver/functions/compare.js +0 -7
- package/node_modules/semver/functions/diff.js +0 -60
- package/node_modules/semver/functions/eq.js +0 -5
- package/node_modules/semver/functions/gt.js +0 -5
- package/node_modules/semver/functions/gte.js +0 -5
- package/node_modules/semver/functions/inc.js +0 -21
- package/node_modules/semver/functions/lt.js +0 -5
- package/node_modules/semver/functions/lte.js +0 -5
- package/node_modules/semver/functions/major.js +0 -5
- package/node_modules/semver/functions/minor.js +0 -5
- package/node_modules/semver/functions/neq.js +0 -5
- package/node_modules/semver/functions/parse.js +0 -18
- package/node_modules/semver/functions/patch.js +0 -5
- package/node_modules/semver/functions/prerelease.js +0 -8
- package/node_modules/semver/functions/rcompare.js +0 -5
- package/node_modules/semver/functions/rsort.js +0 -5
- package/node_modules/semver/functions/satisfies.js +0 -12
- package/node_modules/semver/functions/sort.js +0 -5
- package/node_modules/semver/functions/valid.js +0 -8
- package/node_modules/semver/index.js +0 -91
- package/node_modules/semver/internal/constants.js +0 -37
- package/node_modules/semver/internal/debug.js +0 -11
- package/node_modules/semver/internal/identifiers.js +0 -29
- package/node_modules/semver/internal/lrucache.js +0 -42
- package/node_modules/semver/internal/parse-options.js +0 -17
- package/node_modules/semver/internal/re.js +0 -223
- package/node_modules/semver/package.json +0 -78
- package/node_modules/semver/preload.js +0 -4
- package/node_modules/semver/range.bnf +0 -16
- package/node_modules/semver/ranges/gtr.js +0 -6
- package/node_modules/semver/ranges/intersects.js +0 -9
- package/node_modules/semver/ranges/ltr.js +0 -6
- package/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/node_modules/semver/ranges/min-version.js +0 -63
- package/node_modules/semver/ranges/outside.js +0 -82
- package/node_modules/semver/ranges/simplify.js +0 -49
- package/node_modules/semver/ranges/subset.js +0 -249
- package/node_modules/semver/ranges/to-comparators.js +0 -10
- package/node_modules/semver/ranges/valid.js +0 -13
- package/node_modules/simple-concat/.travis.yml +0 -3
- package/node_modules/simple-concat/LICENSE +0 -20
- package/node_modules/simple-concat/README.md +0 -44
- package/node_modules/simple-concat/index.js +0 -15
- package/node_modules/simple-concat/package.json +0 -47
- package/node_modules/simple-concat/test/basic.js +0 -41
- package/node_modules/simple-get/.github/dependabot.yml +0 -15
- package/node_modules/simple-get/.github/workflows/ci.yml +0 -23
- package/node_modules/simple-get/LICENSE +0 -20
- package/node_modules/simple-get/README.md +0 -333
- package/node_modules/simple-get/index.js +0 -108
- package/node_modules/simple-get/package.json +0 -67
- package/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/string_decoder/README.md +0 -47
- package/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/string_decoder/package.json +0 -34
- package/node_modules/strip-json-comments/index.js +0 -70
- package/node_modules/strip-json-comments/license +0 -21
- package/node_modules/strip-json-comments/package.json +0 -42
- package/node_modules/strip-json-comments/readme.md +0 -64
- package/node_modules/tar-fs/.travis.yml +0 -6
- package/node_modules/tar-fs/LICENSE +0 -21
- package/node_modules/tar-fs/README.md +0 -165
- package/node_modules/tar-fs/index.js +0 -363
- package/node_modules/tar-fs/package.json +0 -41
- package/node_modules/tar-fs/test/fixtures/a/hello.txt +0 -1
- package/node_modules/tar-fs/test/fixtures/b/a/test.txt +0 -1
- package/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
- package/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
- package/node_modules/tar-fs/test/fixtures/e/file +0 -0
- package/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
- package/node_modules/tar-fs/test/index.js +0 -346
- package/node_modules/tar-stream/LICENSE +0 -21
- package/node_modules/tar-stream/README.md +0 -168
- package/node_modules/tar-stream/extract.js +0 -257
- package/node_modules/tar-stream/headers.js +0 -295
- package/node_modules/tar-stream/index.js +0 -2
- package/node_modules/tar-stream/pack.js +0 -255
- package/node_modules/tar-stream/package.json +0 -58
- package/node_modules/tar-stream/sandbox.js +0 -11
- package/node_modules/tunnel-agent/LICENSE +0 -55
- package/node_modules/tunnel-agent/README.md +0 -4
- package/node_modules/tunnel-agent/index.js +0 -244
- package/node_modules/tunnel-agent/package.json +0 -22
- package/node_modules/util-deprecate/History.md +0 -16
- package/node_modules/util-deprecate/LICENSE +0 -24
- package/node_modules/util-deprecate/README.md +0 -53
- package/node_modules/util-deprecate/browser.js +0 -67
- package/node_modules/util-deprecate/node.js +0 -6
- package/node_modules/util-deprecate/package.json +0 -27
- /package/node_modules/{napi-build-utils/index.md → sql.js/.nojekyll} +0 -0
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
The original GSD went viral as a prompt framework for Claude Code. It worked, but it was fighting the tool — injecting prompts through slash commands, hoping the LLM would follow instructions, with no actual control over context windows, sessions, or execution.
|
|
13
13
|
|
|
14
|
-
This version is different. GSD is now a standalone CLI built on the [Pi SDK](https://github.com/badlogic/pi-mono), which gives it direct TypeScript access to the agent harness itself. That means GSD can actually
|
|
14
|
+
This version is different. GSD is now a standalone CLI built on the [Pi SDK](https://github.com/badlogic/pi-mono), which gives it direct TypeScript access to the agent harness itself. That means GSD can actually _do_ what v1 could only _ask_ the LLM to do: clear context between tasks, inject exactly the right files at dispatch time, manage git branches, track cost and tokens, detect stuck loops, recover from crashes, and auto-advance through an entire milestone without human intervention.
|
|
15
15
|
|
|
16
16
|
One command. Walk away. Come back to a built project with clean git history.
|
|
17
17
|
|
|
@@ -30,21 +30,21 @@ The original GSD was a collection of markdown prompts installed into `~/.claude/
|
|
|
30
30
|
- **No crash recovery.** If the session died mid-task, you started over.
|
|
31
31
|
- **No observability.** No cost tracking, no progress dashboard, no stuck detection.
|
|
32
32
|
|
|
33
|
-
GSD v2 solves all of these because it's not a prompt framework anymore — it's a TypeScript application that
|
|
34
|
-
|
|
35
|
-
|
|
|
36
|
-
|
|
37
|
-
| Runtime
|
|
38
|
-
| Context management
|
|
39
|
-
| Auto mode
|
|
40
|
-
| Crash recovery
|
|
41
|
-
| Git strategy
|
|
42
|
-
| Cost tracking
|
|
43
|
-
| Stuck detection
|
|
44
|
-
| Timeout supervision
|
|
45
|
-
| Context injection
|
|
46
|
-
| Roadmap reassessment | Manual
|
|
47
|
-
| Skill discovery
|
|
33
|
+
GSD v2 solves all of these because it's not a prompt framework anymore — it's a TypeScript application that _controls_ the agent session.
|
|
34
|
+
|
|
35
|
+
| | v1 (Prompt Framework) | v2 (Agent Application) |
|
|
36
|
+
| -------------------- | ---------------------------- | ------------------------------------------------------- |
|
|
37
|
+
| Runtime | Claude Code slash commands | Standalone CLI via Pi SDK |
|
|
38
|
+
| Context management | Hope the LLM doesn't fill up | Fresh session per task, programmatic |
|
|
39
|
+
| Auto mode | LLM self-loop | State machine reading `.gsd/` files |
|
|
40
|
+
| Crash recovery | None | Lock files + session forensics |
|
|
41
|
+
| Git strategy | LLM writes git commands | Programmatic branch-per-slice, squash merge |
|
|
42
|
+
| Cost tracking | None | Per-unit token/cost ledger with dashboard |
|
|
43
|
+
| Stuck detection | None | Retry once, then stop with diagnostics |
|
|
44
|
+
| Timeout supervision | None | Soft/idle/hard timeouts with recovery steering |
|
|
45
|
+
| Context injection | "Read this file" | Pre-inlined into dispatch prompt |
|
|
46
|
+
| Roadmap reassessment | Manual | Automatic after each slice completes |
|
|
47
|
+
| Skill discovery | None | Auto-detect and install relevant skills during research |
|
|
48
48
|
|
|
49
49
|
### Migrating from v1
|
|
50
50
|
|
|
@@ -61,6 +61,7 @@ If you have projects with `.planning` directories from the original Get Shit Don
|
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
The migration tool:
|
|
64
|
+
|
|
64
65
|
- Parses your old `PROJECT.md`, `ROADMAP.md`, `REQUIREMENTS.md`, phase directories, plans, summaries, and research
|
|
65
66
|
- Maps phases → slices, plans → tasks, milestones → milestones
|
|
66
67
|
- Preserves completion state (`[x]` phases stay done, summaries carry over)
|
|
@@ -110,7 +111,7 @@ Auto mode is a state machine driven by files on disk. It reads `.gsd/STATE.md`,
|
|
|
110
111
|
|
|
111
112
|
2. **Context pre-loading** — The dispatch prompt includes inlined task plans, slice plans, prior task summaries, dependency summaries, roadmap excerpts, and decisions register. The LLM starts with everything it needs instead of spending tool calls reading files.
|
|
112
113
|
|
|
113
|
-
3. **Git branch-per-slice** — Each slice gets its own branch (`gsd/M001/S01`). Tasks commit atomically on the branch. When the slice completes, it's squash-merged to main as one clean commit.
|
|
114
|
+
3. **Git branch-per-slice** — Each slice gets its own branch (`gsd/M001/S01`). Tasks commit atomically on the branch. When the slice completes, it's squash-merged to main (or whichever branch you started from) as one clean commit.
|
|
114
115
|
|
|
115
116
|
4. **Crash recovery** — A lock file tracks the current unit. If the session dies, the next `/gsd auto` reads the surviving session file, synthesizes a recovery briefing from every tool call that made it to disk, and resumes with full context.
|
|
116
117
|
|
|
@@ -183,12 +184,14 @@ GSD opens an interactive agent session. From there, you have two ways to work:
|
|
|
183
184
|
The real workflow: run auto mode in one terminal, steer from another.
|
|
184
185
|
|
|
185
186
|
**Terminal 1 — let it build**
|
|
187
|
+
|
|
186
188
|
```bash
|
|
187
189
|
gsd
|
|
188
190
|
/gsd auto
|
|
189
191
|
```
|
|
190
192
|
|
|
191
193
|
**Terminal 2 — steer while it works**
|
|
194
|
+
|
|
192
195
|
```bash
|
|
193
196
|
gsd
|
|
194
197
|
/gsd discuss # talk through architecture decisions
|
|
@@ -204,28 +207,28 @@ On first run, GSD launches a branded setup wizard that walks you through LLM pro
|
|
|
204
207
|
|
|
205
208
|
### Commands
|
|
206
209
|
|
|
207
|
-
| Command
|
|
208
|
-
|
|
209
|
-
| `/gsd`
|
|
210
|
-
| `/gsd next`
|
|
211
|
-
| `/gsd auto`
|
|
212
|
-
| `/gsd stop`
|
|
213
|
-
| `/gsd discuss`
|
|
214
|
-
| `/gsd status`
|
|
215
|
-
| `/gsd queue`
|
|
216
|
-
| `/gsd prefs`
|
|
217
|
-
| `/gsd migrate`
|
|
218
|
-
| `/gsd doctor`
|
|
219
|
-
| `/worktree` (`/wt`)
|
|
220
|
-
| `/voice`
|
|
221
|
-
| `/exit`
|
|
222
|
-
| `/kill`
|
|
223
|
-
| `/clear`
|
|
224
|
-
| `Ctrl+Alt+G`
|
|
225
|
-
| `Ctrl+Alt+V`
|
|
226
|
-
| `Ctrl+Alt+B`
|
|
227
|
-
| `gsd config`
|
|
228
|
-
| `gsd --continue` (`-c`) | Resume the most recent session for the current directory
|
|
210
|
+
| Command | What it does |
|
|
211
|
+
| ----------------------- | --------------------------------------------------------------- |
|
|
212
|
+
| `/gsd` | Step mode — executes one unit at a time, pauses between each |
|
|
213
|
+
| `/gsd next` | Explicit step mode (same as bare `/gsd`) |
|
|
214
|
+
| `/gsd auto` | Autonomous mode — researches, plans, executes, commits, repeats |
|
|
215
|
+
| `/gsd stop` | Stop auto mode gracefully |
|
|
216
|
+
| `/gsd discuss` | Discuss architecture and decisions (works alongside auto mode) |
|
|
217
|
+
| `/gsd status` | Progress dashboard |
|
|
218
|
+
| `/gsd queue` | Queue future milestones (safe during auto mode) |
|
|
219
|
+
| `/gsd prefs` | Model selection, timeouts, budget ceiling |
|
|
220
|
+
| `/gsd migrate` | Migrate a v1 `.planning` directory to `.gsd` format |
|
|
221
|
+
| `/gsd doctor` | Validate `.gsd/` integrity, find and fix issues |
|
|
222
|
+
| `/worktree` (`/wt`) | Git worktree lifecycle — create, switch, merge, remove |
|
|
223
|
+
| `/voice` | Toggle real-time speech-to-text (macOS only) |
|
|
224
|
+
| `/exit` | Graceful shutdown — saves session state before exiting |
|
|
225
|
+
| `/kill` | Kill GSD process immediately |
|
|
226
|
+
| `/clear` | Start a new session (alias for `/new`) |
|
|
227
|
+
| `Ctrl+Alt+G` | Toggle dashboard overlay |
|
|
228
|
+
| `Ctrl+Alt+V` | Toggle voice transcription |
|
|
229
|
+
| `Ctrl+Alt+B` | Show background shell processes |
|
|
230
|
+
| `gsd config` | Re-run the setup wizard (LLM provider + tool keys) |
|
|
231
|
+
| `gsd --continue` (`-c`) | Resume the most recent session for the current directory |
|
|
229
232
|
|
|
230
233
|
---
|
|
231
234
|
|
|
@@ -235,18 +238,18 @@ On first run, GSD launches a branded setup wizard that walks you through LLM pro
|
|
|
235
238
|
|
|
236
239
|
Every dispatch is carefully constructed. The LLM never wastes tool calls on orientation.
|
|
237
240
|
|
|
238
|
-
| Artifact
|
|
239
|
-
|
|
240
|
-
| `PROJECT.md`
|
|
241
|
-
| `DECISIONS.md`
|
|
242
|
-
| `STATE.md`
|
|
243
|
-
| `M001-ROADMAP.md`
|
|
244
|
-
| `M001-CONTEXT.md`
|
|
245
|
-
| `M001-RESEARCH.md` | Codebase and ecosystem research
|
|
246
|
-
| `S01-PLAN.md`
|
|
247
|
-
| `T01-PLAN.md`
|
|
248
|
-
| `T01-SUMMARY.md`
|
|
249
|
-
| `S01-UAT.md`
|
|
241
|
+
| Artifact | Purpose |
|
|
242
|
+
| ------------------ | --------------------------------------------------------------- |
|
|
243
|
+
| `PROJECT.md` | Living doc — what the project is right now |
|
|
244
|
+
| `DECISIONS.md` | Append-only register of architectural decisions |
|
|
245
|
+
| `STATE.md` | Quick-glance dashboard — always read first |
|
|
246
|
+
| `M001-ROADMAP.md` | Milestone plan with slice checkboxes, risk levels, dependencies |
|
|
247
|
+
| `M001-CONTEXT.md` | User decisions from the discuss phase |
|
|
248
|
+
| `M001-RESEARCH.md` | Codebase and ecosystem research |
|
|
249
|
+
| `S01-PLAN.md` | Slice task decomposition with must-haves |
|
|
250
|
+
| `T01-PLAN.md` | Individual task plan with verification criteria |
|
|
251
|
+
| `T01-SUMMARY.md` | What happened — YAML frontmatter + narrative |
|
|
252
|
+
| `S01-UAT.md` | Human test script derived from slice outcomes |
|
|
250
253
|
|
|
251
254
|
### Git Strategy
|
|
252
255
|
|
|
@@ -265,7 +268,7 @@ gsd/M001/S01 (deleted after merge):
|
|
|
265
268
|
feat(S01/T01): core types and interfaces
|
|
266
269
|
```
|
|
267
270
|
|
|
268
|
-
One commit per slice on main. Squash commits are the permanent record — branches are deleted after merge. Git bisect works. Individual slices are revertable.
|
|
271
|
+
One commit per slice on main (or whichever branch you started from). Squash commits are the permanent record — branches are deleted after merge. Git bisect works. Individual slices are revertable.
|
|
269
272
|
|
|
270
273
|
### Verification
|
|
271
274
|
|
|
@@ -313,51 +316,95 @@ auto_supervisor:
|
|
|
313
316
|
idle_timeout_minutes: 10
|
|
314
317
|
hard_timeout_minutes: 30
|
|
315
318
|
budget_ceiling: 50.00
|
|
319
|
+
unique_milestone_ids: true
|
|
316
320
|
---
|
|
317
321
|
```
|
|
318
322
|
|
|
319
323
|
**Key settings:**
|
|
320
324
|
|
|
321
|
-
| Setting
|
|
322
|
-
|
|
323
|
-
| `models.*`
|
|
324
|
-
| `skill_discovery`
|
|
325
|
-
| `auto_supervisor.*`
|
|
326
|
-
| `budget_ceiling`
|
|
327
|
-
| `uat_dispatch`
|
|
328
|
-
| `always_use_skills`
|
|
329
|
-
| `skill_rules`
|
|
325
|
+
| Setting | What it controls |
|
|
326
|
+
| ---------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
327
|
+
| `models.*` | Per-phase model selection — string for a single model, or `{model, fallbacks}` for automatic failover |
|
|
328
|
+
| `skill_discovery` | `auto` / `suggest` / `off` — how GSD finds and applies skills |
|
|
329
|
+
| `auto_supervisor.*` | Timeout thresholds for auto mode supervision |
|
|
330
|
+
| `budget_ceiling` | USD ceiling — auto mode pauses when reached |
|
|
331
|
+
| `uat_dispatch` | Enable automatic UAT runs after slice completion |
|
|
332
|
+
| `always_use_skills` | Skills to always load when relevant |
|
|
333
|
+
| `skill_rules` | Situational rules for skill routing |
|
|
334
|
+
| `unique_milestone_ids` | Uses unique milestone names to avoid clashes when working in teams of people |
|
|
330
335
|
|
|
331
336
|
### Bundled Tools
|
|
332
337
|
|
|
333
338
|
GSD ships with 14 extensions, all loaded automatically:
|
|
334
339
|
|
|
335
|
-
| Extension
|
|
336
|
-
|
|
337
|
-
| **GSD**
|
|
338
|
-
| **Browser Tools**
|
|
339
|
-
| **Search the Web**
|
|
340
|
-
| **Google Search**
|
|
341
|
-
| **Context7**
|
|
342
|
-
| **Background Shell**
|
|
343
|
-
| **Subagent**
|
|
344
|
-
| **Mac Tools**
|
|
345
|
-
| **MCPorter**
|
|
346
|
-
| **Voice**
|
|
347
|
-
| **Slash Commands**
|
|
348
|
-
| **LSP**
|
|
349
|
-
| **Ask User Questions** | Structured user input with single/multi-select
|
|
350
|
-
| **Secure Env Collect** | Masked secret collection without manual .env editing
|
|
340
|
+
| Extension | What it provides |
|
|
341
|
+
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
342
|
+
| **GSD** | Core workflow engine, auto mode, commands, dashboard |
|
|
343
|
+
| **Browser Tools** | Playwright-based browser with form intelligence, intent-ranked element finding, and semantic actions |
|
|
344
|
+
| **Search the Web** | Brave Search, Tavily, or Jina page extraction |
|
|
345
|
+
| **Google Search** | Gemini-powered web search with AI-synthesized answers |
|
|
346
|
+
| **Context7** | Up-to-date library/framework documentation |
|
|
347
|
+
| **Background Shell** | Long-running process management with readiness detection |
|
|
348
|
+
| **Subagent** | Delegated tasks with isolated context windows |
|
|
349
|
+
| **Mac Tools** | macOS native app automation via Accessibility APIs |
|
|
350
|
+
| **MCPorter** | Lazy on-demand MCP server integration |
|
|
351
|
+
| **Voice** | Real-time speech-to-text transcription (macOS) |
|
|
352
|
+
| **Slash Commands** | Custom command creation |
|
|
353
|
+
| **LSP** | Language Server Protocol integration — diagnostics, go-to-definition, references, hover, symbols, rename, code actions |
|
|
354
|
+
| **Ask User Questions** | Structured user input with single/multi-select |
|
|
355
|
+
| **Secure Env Collect** | Masked secret collection without manual .env editing |
|
|
351
356
|
|
|
352
357
|
### Bundled Agents
|
|
353
358
|
|
|
354
359
|
Three specialized subagents for delegated work:
|
|
355
360
|
|
|
356
|
-
| Agent
|
|
357
|
-
|
|
358
|
-
| **Scout**
|
|
359
|
-
| **Researcher** | Web research — finds and synthesizes current information
|
|
360
|
-
| **Worker**
|
|
361
|
+
| Agent | Role |
|
|
362
|
+
| -------------- | ------------------------------------------------------------ |
|
|
363
|
+
| **Scout** | Fast codebase recon — returns compressed context for handoff |
|
|
364
|
+
| **Researcher** | Web research — finds and synthesizes current information |
|
|
365
|
+
| **Worker** | General-purpose execution in an isolated context window |
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
## Working in teams
|
|
370
|
+
|
|
371
|
+
The best practice for working in teams is to ensure unique milestone names across all branches (by using `unique_milestone_ids`) and checking in the right `.gsd/` artifacts to share valueable context between teammates.
|
|
372
|
+
|
|
373
|
+
### Suggested .gitignore setup
|
|
374
|
+
```bash
|
|
375
|
+
# ── GSD: Runtime / Ephemeral (per-developer, per-session) ──────────────────
|
|
376
|
+
# Crash detection sentinel — PID lock, written per auto-mode session
|
|
377
|
+
.gsd/auto.lock
|
|
378
|
+
# Auto-mode dispatch tracker — prevents re-running completed units
|
|
379
|
+
.gsd/completed-units.json
|
|
380
|
+
# Derived state cache — regenerated from plan/roadmap files on disk
|
|
381
|
+
.gsd/STATE.md
|
|
382
|
+
# Per-developer token/cost accumulator
|
|
383
|
+
.gsd/metrics.json
|
|
384
|
+
# Raw JSONL session dumps — crash recovery forensics, auto-pruned
|
|
385
|
+
.gsd/activity/
|
|
386
|
+
# Unit execution records — dispatch phase, timeouts, recovery tracking
|
|
387
|
+
.gsd/runtime/
|
|
388
|
+
# Git worktree working copies
|
|
389
|
+
.gsd/worktrees/
|
|
390
|
+
# Session-specific interrupted-work markers
|
|
391
|
+
.gsd/milestones/**/continue.md
|
|
392
|
+
.gsd/milestones/**/*-CONTINUE.md
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### Unique Milestone Names
|
|
396
|
+
|
|
397
|
+
Create or amend your `.gsd/preferences.md` file within the repo to include `unique_milestone_ids: true` e.g.
|
|
398
|
+
```markdown
|
|
399
|
+
---
|
|
400
|
+
version: 1
|
|
401
|
+
unique_milestone_ids: true
|
|
402
|
+
---
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
With the above `.gitignore` set up, the `.gsd/preferences.md` file is checked into the repo ensuring all teammates use unique milestone names to avoid collisions.
|
|
406
|
+
|
|
407
|
+
Milestone names will now be generated with a 6 char random string appended e.g. instead of `M001` you'll get something like `M001-ush8s3`
|
|
361
408
|
|
|
362
409
|
---
|
|
363
410
|
|
|
@@ -397,6 +444,7 @@ gsd (CLI binary)
|
|
|
397
444
|
- **Git** — initialized automatically if missing
|
|
398
445
|
|
|
399
446
|
Optional:
|
|
447
|
+
|
|
400
448
|
- Brave Search API key (web research)
|
|
401
449
|
- Tavily API key (web research — alternative to Brave)
|
|
402
450
|
- Google Gemini API key (web research via Gemini Search grounding)
|
|
@@ -34,7 +34,7 @@ export { fuzzyFind } from "./fd/index.js";
|
|
|
34
34
|
export type { FuzzyFindMatch, FuzzyFindOptions, FuzzyFindResult, } from "./fd/index.js";
|
|
35
35
|
export { parseImage, ImageFormat, SamplingFilter } from "./image/index.js";
|
|
36
36
|
export type { NativeImageHandle } from "./image/index.js";
|
|
37
|
-
export { xxHash32 } from "./xxhash/index.js";
|
|
37
|
+
export { xxHash32, xxHash32Fallback } from "./xxhash/index.js";
|
|
38
38
|
export { ttsrCompileRules, ttsrCheckBuffer, ttsrFreeRules } from "./ttsr/index.js";
|
|
39
39
|
export type { TtsrHandle, TtsrRuleInput } from "./ttsr/index.js";
|
|
40
40
|
export { parseJson, parsePartialJson, parseStreamingJson, } from "./json-parse/index.js";
|
|
@@ -24,7 +24,7 @@ export { wrapTextWithAnsi, truncateToWidth, sliceWithWidth, extractSegments, san
|
|
|
24
24
|
export { normalizeForFuzzyMatch, fuzzyFindText, generateDiff, } from "./diff/index.js";
|
|
25
25
|
export { fuzzyFind } from "./fd/index.js";
|
|
26
26
|
export { parseImage, ImageFormat, SamplingFilter } from "./image/index.js";
|
|
27
|
-
export { xxHash32 } from "./xxhash/index.js";
|
|
27
|
+
export { xxHash32, xxHash32Fallback } from "./xxhash/index.js";
|
|
28
28
|
export { ttsrCompileRules, ttsrCheckBuffer, ttsrFreeRules } from "./ttsr/index.js";
|
|
29
29
|
export { parseJson, parsePartialJson, parseStreamingJson, } from "./json-parse/index.js";
|
|
30
30
|
export { processStreamChunk, stripAnsiNative, sanitizeBinaryOutputNative, } from "./stream-process/index.js";
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Native xxHash32 — Rust implementation via napi-rs.
|
|
2
|
+
* Native xxHash32 — Rust implementation via napi-rs, with a pure-JS fallback.
|
|
3
3
|
*
|
|
4
4
|
* Hashes the UTF-8 representation of the input string with the given seed.
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* Pure-JS xxHash32 implementation. Exposed for testing to allow CI to validate
|
|
8
|
+
* the fallback path independently of native addon availability.
|
|
9
|
+
*/
|
|
10
|
+
export declare function xxHash32Fallback(input: string, seed: number): number;
|
|
6
11
|
/**
|
|
7
12
|
* Compute xxHash32 of a UTF-8 string.
|
|
8
13
|
*
|
|
14
|
+
* Uses the native Rust implementation when available; falls back to a
|
|
15
|
+
* pure-JS implementation if the loaded native addon does not export
|
|
16
|
+
* `xxHash32` (e.g. an older build).
|
|
17
|
+
*
|
|
9
18
|
* @param input The string to hash (encoded as UTF-8 internally).
|
|
10
19
|
* @param seed 32-bit seed value.
|
|
11
20
|
* @returns 32-bit unsigned hash.
|
|
@@ -1,16 +1,85 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Native xxHash32 — Rust implementation via napi-rs.
|
|
2
|
+
* Native xxHash32 — Rust implementation via napi-rs, with a pure-JS fallback.
|
|
3
3
|
*
|
|
4
4
|
* Hashes the UTF-8 representation of the input string with the given seed.
|
|
5
5
|
*/
|
|
6
6
|
import { native } from "../native.js";
|
|
7
|
+
// ─── Pure-JS xxHash32 fallback ────────────────────────────────────────────────
|
|
8
|
+
// Used when the native addon is present but does not export xxHash32
|
|
9
|
+
// (e.g. an older build or an unsupported platform variant).
|
|
10
|
+
const PRIME32_1 = 0x9e3779b1;
|
|
11
|
+
const PRIME32_2 = 0x85ebca77;
|
|
12
|
+
const PRIME32_3 = 0xc2b2ae3d;
|
|
13
|
+
const PRIME32_4 = 0x27d4eb2f;
|
|
14
|
+
const PRIME32_5 = 0x165667b1;
|
|
15
|
+
function rotl32(v, n) {
|
|
16
|
+
return ((v << n) | (v >>> (32 - n))) >>> 0;
|
|
17
|
+
}
|
|
18
|
+
/** Single xxHash32 lane accumulation step (processes one 32-bit word). */
|
|
19
|
+
function accumulate(v, lane) {
|
|
20
|
+
return Math.imul(rotl32((v + Math.imul(lane, PRIME32_2)) >>> 0, 13), PRIME32_1) >>> 0;
|
|
21
|
+
}
|
|
22
|
+
function xxHash32JS(input, seed) {
|
|
23
|
+
const data = Buffer.from(input, "utf-8");
|
|
24
|
+
const len = data.length;
|
|
25
|
+
let h32;
|
|
26
|
+
let i = 0;
|
|
27
|
+
if (len >= 16) {
|
|
28
|
+
let v1 = (seed + PRIME32_1 + PRIME32_2) >>> 0;
|
|
29
|
+
let v2 = (seed + PRIME32_2) >>> 0;
|
|
30
|
+
let v3 = seed >>> 0;
|
|
31
|
+
let v4 = (seed - PRIME32_1) >>> 0;
|
|
32
|
+
while (i <= len - 16) {
|
|
33
|
+
v1 = accumulate(v1, data.readUInt32LE(i));
|
|
34
|
+
i += 4;
|
|
35
|
+
v2 = accumulate(v2, data.readUInt32LE(i));
|
|
36
|
+
i += 4;
|
|
37
|
+
v3 = accumulate(v3, data.readUInt32LE(i));
|
|
38
|
+
i += 4;
|
|
39
|
+
v4 = accumulate(v4, data.readUInt32LE(i));
|
|
40
|
+
i += 4;
|
|
41
|
+
}
|
|
42
|
+
h32 = (rotl32(v1, 1) + rotl32(v2, 7) + rotl32(v3, 12) + rotl32(v4, 18)) >>> 0;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
h32 = (seed + PRIME32_5) >>> 0;
|
|
46
|
+
}
|
|
47
|
+
h32 = (h32 + len) >>> 0;
|
|
48
|
+
while (i <= len - 4) {
|
|
49
|
+
h32 = Math.imul(rotl32((h32 + Math.imul(data.readUInt32LE(i), PRIME32_3)) >>> 0, 17), PRIME32_4) >>> 0;
|
|
50
|
+
i += 4;
|
|
51
|
+
}
|
|
52
|
+
while (i < len) {
|
|
53
|
+
h32 = Math.imul(rotl32((h32 + Math.imul(data[i], PRIME32_5)) >>> 0, 11), PRIME32_1) >>> 0;
|
|
54
|
+
i++;
|
|
55
|
+
}
|
|
56
|
+
h32 = Math.imul(h32 ^ (h32 >>> 15), PRIME32_2) >>> 0;
|
|
57
|
+
h32 = Math.imul(h32 ^ (h32 >>> 13), PRIME32_3) >>> 0;
|
|
58
|
+
h32 = (h32 ^ (h32 >>> 16)) >>> 0;
|
|
59
|
+
return h32;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Pure-JS xxHash32 implementation. Exposed for testing to allow CI to validate
|
|
63
|
+
* the fallback path independently of native addon availability.
|
|
64
|
+
*/
|
|
65
|
+
export function xxHash32Fallback(input, seed) {
|
|
66
|
+
return xxHash32JS(input, seed);
|
|
67
|
+
}
|
|
68
|
+
// Resolve once at module load: prefer native, fall back to JS.
|
|
69
|
+
const _xxHash32Impl = typeof native.xxHash32 === "function"
|
|
70
|
+
? (input, seed) => native.xxHash32(input, seed)
|
|
71
|
+
: xxHash32JS;
|
|
7
72
|
/**
|
|
8
73
|
* Compute xxHash32 of a UTF-8 string.
|
|
9
74
|
*
|
|
75
|
+
* Uses the native Rust implementation when available; falls back to a
|
|
76
|
+
* pure-JS implementation if the loaded native addon does not export
|
|
77
|
+
* `xxHash32` (e.g. an older build).
|
|
78
|
+
*
|
|
10
79
|
* @param input The string to hash (encoded as UTF-8 internally).
|
|
11
80
|
* @param seed 32-bit seed value.
|
|
12
81
|
* @returns 32-bit unsigned hash.
|
|
13
82
|
*/
|
|
14
83
|
export function xxHash32(input, seed) {
|
|
15
|
-
return
|
|
84
|
+
return _xxHash32Impl(input, seed);
|
|
16
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-loop.d.ts","sourceRoot":"","sources":["../src/agent-loop.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGN,WAAW,EAIX,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACX,YAAY,EACZ,UAAU,EACV,eAAe,EACf,YAAY,EAGZ,QAAQ,EACR,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-loop.d.ts","sourceRoot":"","sources":["../src/agent-loop.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGN,WAAW,EAIX,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACX,YAAY,EACZ,UAAU,EACV,eAAe,EACf,YAAY,EAGZ,QAAQ,EACR,MAAM,YAAY,CAAC;AA8BpB;;;GAGG;AACH,wBAAgB,SAAS,CACxB,OAAO,EAAE,YAAY,EAAE,EACvB,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,eAAe,EACvB,MAAM,CAAC,EAAE,WAAW,EACpB,QAAQ,CAAC,EAAE,QAAQ,GACjB,WAAW,CAAC,UAAU,EAAE,YAAY,EAAE,CAAC,CA8BzC;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,eAAe,EACvB,MAAM,CAAC,EAAE,WAAW,EACpB,QAAQ,CAAC,EAAE,QAAQ,GACjB,WAAW,CAAC,UAAU,EAAE,YAAY,EAAE,CAAC,CA+BzC"}
|
|
@@ -3,6 +3,32 @@
|
|
|
3
3
|
* Transforms to Message[] only at the LLM call boundary.
|
|
4
4
|
*/
|
|
5
5
|
import { EventStream, streamSimple, validateToolArguments, } from "@gsd/pi-ai";
|
|
6
|
+
const ZERO_USAGE = {
|
|
7
|
+
input: 0,
|
|
8
|
+
output: 0,
|
|
9
|
+
cacheRead: 0,
|
|
10
|
+
cacheWrite: 0,
|
|
11
|
+
totalTokens: 0,
|
|
12
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Build an AssistantMessage for an unhandled error caught outside runLoop.
|
|
16
|
+
* Uses the model from config so the message satisfies the full interface.
|
|
17
|
+
*/
|
|
18
|
+
function createErrorMessage(error, config) {
|
|
19
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
20
|
+
return {
|
|
21
|
+
role: "assistant",
|
|
22
|
+
content: [{ type: "text", text: msg }],
|
|
23
|
+
api: config.model.api,
|
|
24
|
+
provider: config.model.provider,
|
|
25
|
+
model: config.model.id,
|
|
26
|
+
usage: ZERO_USAGE,
|
|
27
|
+
stopReason: "error",
|
|
28
|
+
errorMessage: msg,
|
|
29
|
+
timestamp: Date.now(),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
6
32
|
/**
|
|
7
33
|
* Start an agent loop with a new prompt message.
|
|
8
34
|
* The prompt is added to the context and events are emitted for it.
|
|
@@ -21,7 +47,17 @@ export function agentLoop(prompts, context, config, signal, streamFn) {
|
|
|
21
47
|
stream.push({ type: "message_start", message: prompt });
|
|
22
48
|
stream.push({ type: "message_end", message: prompt });
|
|
23
49
|
}
|
|
24
|
-
|
|
50
|
+
try {
|
|
51
|
+
await runLoop(currentContext, newMessages, config, signal, stream, streamFn);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
const errMsg = createErrorMessage(error, config);
|
|
55
|
+
stream.push({ type: "message_start", message: errMsg });
|
|
56
|
+
stream.push({ type: "message_end", message: errMsg });
|
|
57
|
+
stream.push({ type: "turn_end", message: errMsg, toolResults: [] });
|
|
58
|
+
stream.push({ type: "agent_end", messages: [...newMessages, errMsg] });
|
|
59
|
+
stream.end([...newMessages, errMsg]);
|
|
60
|
+
}
|
|
25
61
|
})();
|
|
26
62
|
return stream;
|
|
27
63
|
}
|
|
@@ -46,7 +82,17 @@ export function agentLoopContinue(context, config, signal, streamFn) {
|
|
|
46
82
|
const currentContext = { ...context };
|
|
47
83
|
stream.push({ type: "agent_start" });
|
|
48
84
|
stream.push({ type: "turn_start" });
|
|
49
|
-
|
|
85
|
+
try {
|
|
86
|
+
await runLoop(currentContext, newMessages, config, signal, stream, streamFn);
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
const errMsg = createErrorMessage(error, config);
|
|
90
|
+
stream.push({ type: "message_start", message: errMsg });
|
|
91
|
+
stream.push({ type: "message_end", message: errMsg });
|
|
92
|
+
stream.push({ type: "turn_end", message: errMsg, toolResults: [] });
|
|
93
|
+
stream.push({ type: "agent_end", messages: [...newMessages, errMsg] });
|
|
94
|
+
stream.end([...newMessages, errMsg]);
|
|
95
|
+
}
|
|
50
96
|
})();
|
|
51
97
|
return stream;
|
|
52
98
|
}
|
|
@@ -83,7 +129,37 @@ async function runLoop(currentContext, newMessages, config, signal, stream, stre
|
|
|
83
129
|
pendingMessages = [];
|
|
84
130
|
}
|
|
85
131
|
// Stream assistant response
|
|
86
|
-
|
|
132
|
+
let message;
|
|
133
|
+
try {
|
|
134
|
+
message = await streamAssistantResponse(currentContext, config, signal, stream, streamFn);
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
// Critical failure before stream started (e.g. getApiKey threw, credentials in
|
|
138
|
+
// backoff, network unavailable). Convert to a graceful error message so the
|
|
139
|
+
// agent loop can end cleanly instead of crashing with an unhandled rejection.
|
|
140
|
+
const errorText = error instanceof Error ? error.message : String(error);
|
|
141
|
+
message = {
|
|
142
|
+
role: "assistant",
|
|
143
|
+
content: [],
|
|
144
|
+
api: config.model.api,
|
|
145
|
+
provider: config.model.provider,
|
|
146
|
+
model: config.model.id,
|
|
147
|
+
usage: {
|
|
148
|
+
input: 0,
|
|
149
|
+
output: 0,
|
|
150
|
+
cacheRead: 0,
|
|
151
|
+
cacheWrite: 0,
|
|
152
|
+
totalTokens: 0,
|
|
153
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },
|
|
154
|
+
},
|
|
155
|
+
stopReason: signal?.aborted ? "aborted" : "error",
|
|
156
|
+
errorMessage: errorText,
|
|
157
|
+
timestamp: Date.now(),
|
|
158
|
+
};
|
|
159
|
+
stream.push({ type: "message_start", message: { ...message } });
|
|
160
|
+
stream.push({ type: "message_end", message });
|
|
161
|
+
currentContext.messages.push(message);
|
|
162
|
+
}
|
|
87
163
|
newMessages.push(message);
|
|
88
164
|
if (message.stopReason === "error" || message.stopReason === "aborted") {
|
|
89
165
|
stream.push({ type: "turn_end", message, toolResults: [] });
|