[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80298":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":13,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},80298,"pi-codex-goal","fitchmultz\u002Fpi-codex-goal","fitchmultz","Codex-style goal tracking and continuation for pi.","https:\u002F\u002Fgithub.com\u002Ffitchmultz\u002Fpi-codex-goal#readme",null,"TypeScript",123,7,1,6,0,4,49,12,59.11,"MIT License",false,"main",true,[26,27,28,29,30,31],"codex","goal","goal-tracking","pi","pi-extension","pi-package","2026-06-12 04:01:27","# pi-codex-goal\n\nCodex-style goal tracking for pi.\n\nThis package adds a `\u002Fgoal` command plus three model-callable tools:\n\n- `get_goal`\n- `create_goal`\n- `update_goal`\n\nGoal state is stored in pi session custom entries, so it follows session history, resume, fork, tree navigation, reload, and compaction behavior without an external database.\n\n## Install\n\nInstall from npm:\n\n```sh\npi install npm:pi-codex-goal\n```\n\nInstall a pinned npm version:\n\n```sh\npi install npm:pi-codex-goal@\u003Cversion>\n```\n\nInstall from GitHub:\n\n```sh\npi install https:\u002F\u002Fgithub.com\u002Ffitchmultz\u002Fpi-codex-goal\n```\n\nInstall a pinned GitHub release:\n\n```sh\npi install https:\u002F\u002Fgithub.com\u002Ffitchmultz\u002Fpi-codex-goal@v\u003Cversion>\n```\n\nFor local development from this repository:\n\n```sh\nnpm install\npi install .\n```\n\nCompatibility note: this package is tested against the current pi release during each package update, and pi-bundled runtime packages are declared as optional wildcard peers. That keeps installs forward-open for future pi releases: npm peer ranges should not block users from trying a newer pi, though runtime behavior is only verified against the tested baseline until a follow-up package release confirms it.\n\nRelease note: npm installs and pinned GitHub tags are the reproducible release artifacts. Installing from the repository default branch can include unreleased changes that will ship in a future package release, even when `package.json` still identifies the latest published version.\n\n## Development\n\nValidate types and tests before committing or opening a PR:\n\n```sh\nnpm run verify\n```\n\nProject agent notes and module map: [AGENTS.md](AGENTS.md).\nLatest structural audit: [docs\u002FCODEBASE_AUDIT.md](docs\u002FCODEBASE_AUDIT.md).\n\n## Smoke test with Cursor Composer 2.5\n\nThis smoke test exercises the interactive `\u002Fgoal` command, hidden continuation, bridged goal tools, filesystem verification, and final `update_goal` completion.\n\nPrerequisites:\n\n- Pi can authenticate to Cursor, for example through a Cursor User API Key.\n- Cursor Composer 2.5 is available:\n\n```sh\npi --list-models cursor 2>&1 | rg 'composer-2[.-]5'\n```\n\nStart pi from this repository:\n\n```sh\nrm -f \u002Ftmp\u002Fpi-codex-goal-slash-smoke.txt\nrm -rf \u002Ftmp\u002Fpi-codex-goal-slash-smoke-session\npi --model cursor\u002Fcomposer-2-5 --cursor-no-fast \\\n  --session-dir \u002Ftmp\u002Fpi-codex-goal-slash-smoke-session\n```\n\nThen paste this into the interactive TUI:\n\n```text\n\u002Fgoal Create \u002Ftmp\u002Fpi-codex-goal-slash-smoke.txt containing PI_GOAL_SLASH_OK, verify the file content from the filesystem, inspect the current goal, and mark the goal complete only after verification. Final reply must include the verified file path, verified content, and final goal status.\n```\n\nExpected final evidence:\n\n```text\nVerified file path: \u002Ftmp\u002Fpi-codex-goal-slash-smoke.txt\nVerified content: PI_GOAL_SLASH_OK\nFinal goal status: complete\n```\n\n`\u002Fgoal` is an interactive editor command. Do not use `pi -p '\u002Fgoal ...'` as a slash-command smoke path; print mode sends an initial model prompt and is not a reliable way to exercise this extension command. For headless automation, prompt the model to call the `create_goal`, `get_goal`, and `update_goal` tools instead of relying on slash-command parsing.\n\n## User Commands\n\n```text\n\u002Fgoal\n\u002Fgoal Build the requested feature and verify it end to end\n\u002Fgoal pause\n\u002Fgoal resume\n\u002Fgoal clear\n```\n\n`\u002Fgoal` with no arguments reports the current objective, status, token budget, token usage, and elapsed active time. A plain `\u002Fgoal \u003Cobjective>` starts a new goal or replaces the current one after confirmation.\n\nThis intentionally matches Codex TUI behavior: token budgets are set through the model tool rather than parsed from `\u002Fgoal --tokens`. This package keeps its objective size limit at 8000 Unicode characters.\n\n## Model Tools\n\n`create_goal` starts a goal with an objective and optional positive token budget. It fails if a non-complete goal already exists. After a goal is complete, `create_goal` replaces it with a new active goal.\n\n`get_goal` returns the current goal state and usage.\n\n`update_goal` only accepts `status: \"complete\"`, matching Codex's model-side contract. Calling it on an already-complete goal is idempotent and does not append duplicate session entries. The extension reports final token and elapsed-time usage before marking the goal complete.\n\nCompleted goals are terminal for automatic transitions: pause, resume, and hidden continuations do not reopen them. To recover from premature completion, use `\u002Fgoal \u003Cobjective>` to replace the goal or `\u002Fgoal clear` before starting again.\n\nIn bridged MCP environments such as `pi-cursor-sdk`, pi may expose these tools under namespaced MCP names like `pi__get_goal`, `pi__create_goal`, and `pi__update_goal`. Prompt guidance tells models to call whichever goal-tool name is actually exposed in the current run, not display or transcript labels.\n\n## Behavior\n\nWhile a goal is active, the extension:\n\n- tracks elapsed active time between turns and tool completions\n- adds completed assistant turn input plus output token usage when the active model reports it\n- coalesces runtime goal custom-entry writes so unchanged status and usage are not appended on every tool completion; live footer usage stays current, and meaningful usage is flushed at turn boundaries, shutdown, compaction, budget crossings, and bounded intervals during long tool-heavy runs\n- pauses when an active assistant turn is aborted, such as when you press Esc\n- recovers from provider assistant errors without immediate hidden continuation loops: context-window overflow triggers automatic compaction and then resumes the active goal, transient errors use bounded backoff retries, and repeated unrecoverable failures pause with a clear `\u002Fgoal resume` path\n- prompts on session resume before reactivating a paused goal, and resumes explicitly with `\u002Fgoal resume` (only from paused)\n- rejects `\u002Fgoal pause` unless the goal is active and `\u002Fgoal resume` unless the goal is paused\n- treats completed goals as terminal for automatic transitions while allowing `\u002Fgoal \u003Cobjective>` to replace them without extra friction\n- marks the goal `budgetLimited` when a positive token budget is reached\n- sends hidden steering messages when budget is reached or when the agent is idle but the goal is still active\n- compacts repeated hidden goal continuations before provider context so only the latest active continuation stays runnable, older ones become short bookkeeping markers, and auto-queued continuations use a compact prompt after `\u002Fgoal` start or resume\n- shows Codex-style status labels with compact token or elapsed-time usage in the pi footer when UI is available\n\nToken counts are formatted with commas and compact abbreviations, for example `123M (123,456,789) tokens`. Token totals use pi's completed assistant turn input plus output usage. Cache read and cache write channels are excluded because they are provider cache accounting fields, not extra sent and received text tokens. Pi does not currently expose a separate extension usage total for automatic compaction summary calls.\n","pi-codex-goal 是一个为 pi 平台设计的目标跟踪工具，采用 Codex 风格。它通过添加 `\u002Fgoal` 命令以及三个可由模型调用的工具 `get_goal`、`create_goal` 和 `update_goal` 来实现目标的创建、更新与查询功能。这些目标状态被保存在 pi 会话的自定义条目中，因此能够跟随会话历史记录、恢复、分支、树形导航、重新加载及压缩行为工作，而无需外部数据库支持。适用于需要在 pi 环境下进行目标管理和追踪的应用场景，特别是当开发者希望保持轻量级操作且不依赖额外存储服务时。项目使用 TypeScript 编写，并遵循 MIT 许可证发布。",2,"2026-06-11 04:00:12","CREATED_QUERY"]