@gfgghgftgffg/pi-goal-x-lean 0.1.1 → 0.1.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.
- package/MAINTENANCE.md +35 -18
- package/README.md +8 -5
- package/README.zh-CN.md +8 -5
- package/index.ts +1 -2
- package/package.json +2 -2
package/MAINTENANCE.md
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
# Maintenance boundary
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Keep this file in English.
|
|
4
|
+
|
|
5
|
+
The original facade depends on exact `pi-goal-x@0.35.1`; it does not copy the engine. The published package has no npm publication `gitHead`, so maintenance reviews exact npm tarballs with SHA-512 integrity, not an inferred Git commit. There is no external lean-author repository. Pi development verification uses 1.4.0; supported hosts must satisfy upstream peers (`>=1.4.0 <2.0.0`).
|
|
4
6
|
|
|
5
7
|
## Retained behavior
|
|
6
8
|
|
|
7
|
-
Keep all
|
|
9
|
+
Keep all seven upstream tool names, schemas except description annotations, prompt guidelines, lifecycle hooks, commands, shortcuts, renderers and the fixed task-setting-dependent tool profile. Draft-state gating belongs to execution, not changing tool visibility. Do not suppress `setActiveTools`, collapse names or truncate goal context: stopped-turn gates, progress classification, drafting, live-tail retention and provider-cache placement depend on them. Unknown new tools pass through unchanged until reviewed.
|
|
8
10
|
|
|
9
11
|
## Integration contracts
|
|
10
12
|
|
|
11
13
|
The optional `@gfgghgftgffg/pi-subagents-lean.context.v1` global service supplies the actual dist runner's AsyncLocalStorage child flag. Never copy child-context state, resolve an undeclared neighboring dependency or temporarily mutate `process.env`. A child registers only upstream goal-context filtering. Test the actual Pi loader and dist child-context identity; environment-marker tests alone are insufficient.
|
|
12
14
|
|
|
13
|
-
## Subagents
|
|
15
|
+
## Subagents and workflow integration boundaries
|
|
14
16
|
|
|
15
|
-
###
|
|
17
|
+
### Child-session goal ownership
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
This package reads the read-only v1 interface from `pi-subagents-lean`: the parent session runs goal, while child sessions only filter inherited goal-control messages and do not install goal tools, commands or a scheduler. Even a child role that normally allows goal cannot create or continue an independent goal through this combination. Role models, tool permissions and Task Router rules remain unchanged; Router is not enabled automatically.
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
If a subagents manager is present without a compatible v1 service, the goal facade reports a compatibility error. Older facades, upstream-only subagents installations and other engines are outside this automatic isolation contract. The interface is not a general cross-process or worker detection protocol; see the subagents package's `MAINTENANCE.md` for its contract.
|
|
20
22
|
|
|
21
|
-
###
|
|
23
|
+
### Background waiting guard
|
|
22
24
|
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- CLI
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
25
|
+
- Tracks only delegation launched while a goal is active through `subagent(run/workflow)` or the native `Agent` / `SubagentWorkflow` tools. Holds conservatively cover the entire parent session: any tracked work awaiting results blocks automatic goal continuation and `update_goal(status=complete)`, even for an unrelated next step or after switching to or creating another goal. This reduces autonomous progress while background work is pending.
|
|
26
|
+
- A completion notification delivered to the parent, or a successful result-tool read of the full terminal Agent result, releases the corresponding hold; merely finishing background execution does not. A workflow remains pending between stages even when no child Agent is active. Failed or stopped terminal results also release that run's hold but do not imply successful goal auditing. Delayed notifications extend the wait. Completion is checked again during tool execution so preflight alone cannot miss a launch in the same batch.
|
|
27
|
+
- Concurrent result reads and Agent `resume` calls are rejected as conflicts; read results first, then resume in the next tool batch. This restriction conservatively covers combinations involving different Agents because a handle and an ID may identify the same Agent. Concurrent reads and fresh launches are unaffected by this restriction.
|
|
28
|
+
- Resume reuses the Agent ID, so its notification must also match the current launch's `<tool-use-id>`. Notifications still marked `queued` or `running` do not release a hold. Missing or mismatched run markers leave it pending; after the resume launch returns, a terminal Agent result can be read through the result tool. An old notification never establishes that a new run has finished.
|
|
29
|
+
- Stalled or paused tasks, lost notifications, or result consumption through an untracked entry point such as external RPC that cancels the notification can leave a hold pending indefinitely. The guard adds no timeout, polling or recovery scheduler. The Agent result tool cannot read workflow IDs to compensate for lost workflow notifications. Inspect task and writer state manually; `/goal-resume` and switching goals do not clear holds.
|
|
30
|
+
- CLI-launched workflows, mentions, external RPC, other extensions' dispatch paths and work started before the goal became active are not tracked. Holds exist only in the current parent session's memory and are not reconstructed after reload, restart or session restoration. Missing holds do not establish that old delegated work has stopped.
|
|
31
|
+
- The guard does not stop running tasks, block normal user input or prevent the parent Agent from using tools in its current turn. Partial completion notifications can still wake the parent to handle results while remaining holds block automatic continuation and final completion. Notifications do not resume a paused goal on the user's behalf.
|
|
32
|
+
- This integration retains native subagents notifications rather than rewriting them as `pi-goal:wake`. Parent model turns triggered by those notifications are outside goal's `maxAutonomousRuns` allowance; that allowance is not a cap on all model calls. Upstream strict mode's [wait/wake protocol](https://github.com/tmonk/pi-goal-x/blob/main/docs/advanced-usage.md#background-producer-integration) remains available but is not this guard's default integration path.
|
|
33
|
+
- The guard runs before upstream `schedule` and also defers its strict-wait deadline checks while holds are pending. A goal wait deadline is not a punctual timeout or a guarantee that background writers will stop.
|
|
34
|
+
- Maintenance depends on upstream's private `_goalCore.scheduler.schedule/claim` methods and subagents task IDs, result-text headers and notification XML run markers. Missing scheduler methods prevent the goal facade from loading. Format changes can cause missed launches or unreleased holds without necessarily producing an automatic error. Keep dependencies pinned and rerun regressions on upgrades; this is not a maintenance-free native integration.
|
|
33
35
|
|
|
34
36
|
## Additional behavior boundaries
|
|
35
37
|
|
|
@@ -38,7 +40,22 @@ The optional `@gfgghgftgffg/pi-subagents-lean.context.v1` global service supplie
|
|
|
38
40
|
|
|
39
41
|
## Upstream snapshot limitation
|
|
40
42
|
|
|
41
|
-
Both the original and facade entrypoints
|
|
43
|
+
Both the original and facade entrypoints retain the old objective after an external in-place edit and `/goal-refresh`, observed on 0.34.1 and again in the staged 0.34.2 check. Shutdown can overwrite the edit (observed on 0.34.1). Keep the upstream-parity regression, do not fork the storage engine to hide it, and revise the limitation when upstream fixes it. Prefer `/goal-tweak`.
|
|
44
|
+
|
|
45
|
+
## Review: 0.34.2 → 0.35.1
|
|
46
|
+
|
|
47
|
+
- Exact SHA-512 npm snapshots in `sources.json`; no bundled changelog. The upstream manifests retain the Pi/typebox peers and Node floor. The facade still imports `goal.ts`, `goal-context.ts` and `goal-session-safety.ts`; `goal.ts` still exposes `_goalCore`, with `state.goal` now a `GoalSessionState` getter. `GoalRuntime` resolves `scheduler.claim` at delivery, and both `schedule` and `claim` still gate dispatch after the scheduler-rules extraction. Delegated sessions still register only the context filter. No wrapper code or sibling package needs to change.
|
|
48
|
+
- Core, task and drafting registrations retain their schemas, call defaults, argument preparation and the fixed task-setting-dependent profile. `get_goal` still separates model-facing `content[].text`, `details.goal` and the successful page's `details.page` (`content`, `nextCursor`, `totalChars`); the terminal renderer is separate. `update_goal` still dispatches to the same action classes, with blocked and paused flows extracted to `goal-update-flows.ts` and completion still audited.
|
|
49
|
+
- Upstream splits the core, settings, ledger, storage, and UI internals; do not restore `goal-settings.ts` or `widgets/dialog-scaffold.ts`. Layer precedence is still environment > project > global > defaults. `locale` and `PI_GOAL_LOCALE` affect UI lookup only; `i18n/locales.ts` ships no translation catalogs. Task confirmation now truncates the key-hint footer to fit, through the shared choice dialog; audit interruption still defaults to continuing work. The extracted snapshot still uses directory mtime and `/goal-refresh` still invalidates and rereads in the same order. Retain the parity regression.
|
|
50
|
+
- Only this publication is staged. Unpublished web and todo Git heads are excluded. Sync remains unchanged with no fork delta to port. No unrelated regression tests added; existing tests cover the facade and joint subagents ABI.
|
|
51
|
+
|
|
52
|
+
## Review: 0.34.1 → 0.34.2
|
|
53
|
+
|
|
54
|
+
- Exact npm publication snapshots with SHA-512 in `sources.json`; neither a Git HEAD substitute nor a published changelog was used. The manifests retain the same Pi/typebox peers and Node requirement. The new `extensions/goal.ts` inlines the removed `goal-tools.ts` installer in the same registration order; formatting and terminal input move to dedicated modules. The facade still imports `goal.ts`, `goal-context.ts` and `goal-session-safety.ts`, receives `_goalCore`, and interposes on the same scheduler `schedule`/`claim` methods. No removed shim is restored.
|
|
55
|
+
- `goal-events.ts` now pauses at `agent_settled` for non-transient provider errors and after a configured retry limit is exhausted. `goal-scheduler.ts` saves the pause and clears continuation state; transient retries remain separate. `session_compact_failed` flushes buffered goal changes and warns without pausing; the next request after successful compaction still gets the goal resync delta. `/goal-resume [text]` forwards text as a follow-up when idle or steer when busy, before attempting to resume the goal. `runGoalRefresh` still has the same cache/refresh sequence; do not infer a storage fix from the version bump.
|
|
56
|
+
- `get_goal` keeps separate model text (`content[].text`), goal state (`details.goal`) and successful page payload (`details.page`); renderer output is not the tool response.
|
|
57
|
+
- Owner approved the upstream contract migration. `extensions/goal-tool-names.ts` and `extensions/goal-drafting.ts` remove `goal_question`, leaving `goal_questionnaire`, and replace the phase-dependent tool profile with a fixed, task-setting-dependent list. Draft gating moves into `goal-events.ts` and tool execution. `propose_goal_draft` removes `sisyphus` from its schema, strips the legacy argument in `prepareArguments`, and uses the mode of the user-started draft. The lean metadata drops the deleted tool and parameter instruction without suppressing the remaining upstream behavior.
|
|
58
|
+
- Migrated only version-specific tests: seven registrations and fixed profiles replace the old eight-tool phase expectations. Lifecycle, execution, audit, task evidence, upstream-parity, child-session and joint ABI assertions remain. The first check failed four stale profile assertions even against upstream 0.34.2; subsequent verification must run all gates before publication.
|
|
42
59
|
|
|
43
60
|
## Verification
|
|
44
61
|
|
package/README.md
CHANGED
|
@@ -6,9 +6,8 @@ A lightweight wrapper over [pi-goal-x](https://github.com/tmonk/pi-goal-x). The
|
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
-
- Keeps upstream tools, commands, UI, settings and goal-file formats.
|
|
10
|
-
-
|
|
11
|
-
- During goal execution, blocks automatic continuation and completion while background Agent/workflow work launched through `subagent` is awaiting results.
|
|
9
|
+
- Keeps the seven upstream tools, commands, UI, settings and goal-file formats. The active profile is fixed apart from the task setting; `goal_questionnaire` handles drafting and the user-started draft supplies the goal mode.
|
|
10
|
+
- Adds a small integration layer that keeps goals in the parent session and waits for tracked Agent/workflow results before automatic continuation or completion.
|
|
12
11
|
|
|
13
12
|
## Installation
|
|
14
13
|
|
|
@@ -31,13 +30,17 @@ For a Git checkout, use `node scripts/install-extension.mjs pi-goal-x-lean`.
|
|
|
31
30
|
|
|
32
31
|
Confirm the plan to start. Use `/goal-direct` for direct creation, `/sisyphus` for ordered steps, `/goal-tweak` to revise, and `/goal-pause` / `/goal-resume` to pause or resume. See the [upstream guide](https://github.com/tmonk/pi-goal-x#readme) for all commands.
|
|
33
32
|
|
|
33
|
+
If a provider error cannot be retried, or a configured network-retry limit is exhausted, the goal pauses. Fix the provider issue, then use `/goal-resume [text]`; optional text is sent to the agent.
|
|
34
|
+
|
|
35
|
+
Use `/goal-tweak` to change an existing objective. An in-place edit to a goal file can leave the old objective in the upstream snapshot even after `/goal-refresh`.
|
|
36
|
+
|
|
34
37
|
## Context footprint (character proxy)
|
|
35
38
|
|
|
36
39
|
<!-- amox-measurement:start -->
|
|
37
40
|
| Package | Registered character proxy |
|
|
38
41
|
| --- | ---: |
|
|
39
|
-
| @gfgghgftgffg/pi-goal-x-lean |
|
|
40
|
-
| pi-goal-x |
|
|
42
|
+
| @gfgghgftgffg/pi-goal-x-lean | 1297 |
|
|
43
|
+
| pi-goal-x | 1691 |
|
|
41
44
|
|
|
42
45
|
Fixed ceil(characters / 4), not provider billing tokens.
|
|
43
46
|
<!-- amox-measurement:end -->
|
package/README.zh-CN.md
CHANGED
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
## 功能
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
- goal 执行期间,通过 `subagent` 启动的后台 Agent/workflow 未交回结果时,阻止自动续跑或完成验收。
|
|
9
|
+
- 保留上游七个工具、命令、界面、设置及目标文件格式。除任务开关外,激活工具列表固定;草稿提问使用 `goal_questionnaire`,目标模式由用户发起的草稿决定。
|
|
10
|
+
- 增加轻量联动层,让目标归父会话管理,并在已追踪的 Agent/workflow 交回结果前阻止自动续跑和完成验收。
|
|
12
11
|
|
|
13
12
|
## 安装
|
|
14
13
|
|
|
@@ -31,13 +30,17 @@ pi update --extensions
|
|
|
31
30
|
|
|
32
31
|
确认计划后开始执行。直接创建用 `/goal-direct`,有序步骤用 `/sisyphus`,修订用 `/goal-tweak`,暂停和恢复用 `/goal-pause`、`/goal-resume`。完整命令见[上游文档](https://github.com/tmonk/pi-goal-x#readme)。
|
|
33
32
|
|
|
33
|
+
遇到不可重试的服务商错误,或用尽配置的网络重试次数后,目标会暂停。修复问题后使用 `/goal-resume [文本]`;附带的文本会发送给 Agent。
|
|
34
|
+
|
|
35
|
+
修改已有目标请使用 `/goal-tweak`。直接编辑目标文件后,即使执行 `/goal-refresh`,上游快照也可能仍保留旧目标。
|
|
36
|
+
|
|
34
37
|
## 上下文占用(字符代理)
|
|
35
38
|
|
|
36
39
|
<!-- amox-measurement:start -->
|
|
37
40
|
| Package | Registered character proxy |
|
|
38
41
|
| --- | ---: |
|
|
39
|
-
| @gfgghgftgffg/pi-goal-x-lean |
|
|
40
|
-
| pi-goal-x |
|
|
42
|
+
| @gfgghgftgffg/pi-goal-x-lean | 1297 |
|
|
43
|
+
| pi-goal-x | 1691 |
|
|
41
44
|
|
|
42
45
|
Fixed ceil(characters / 4), not provider billing tokens.
|
|
43
46
|
<!-- amox-measurement:end -->
|
package/index.ts
CHANGED
|
@@ -12,9 +12,8 @@ const DESCRIPTIONS: Record<string, string> = {
|
|
|
12
12
|
update_goal: "Complete (audited), block, or pause a goal; reason required for blocked/paused. Alternatively declare continuation; wait requires strictExecutionContract and a future ISO deadline. Reuse wait_id/deadline on recheck.",
|
|
13
13
|
set_goal_tasks: "Confirm a flat parent-linked task tree; matching IDs retain progress, removed IDs are deleted. block_completion defaults false. Confirmation stops the turn, then continues.",
|
|
14
14
|
update_goal_task: "Update task_id/status or ordered atomic updates; one invalid entry rejects the batch. Evidence completes contracted tasks; reason is required to skip.",
|
|
15
|
-
goal_question: "Ask one user-started drafting question. recommended is zero-based; allow_custom defaults true.",
|
|
16
15
|
goal_questionnaire: "Ask a batch of user-started drafting questions. recommended is zero-based; allow_custom defaults true.",
|
|
17
|
-
propose_goal_draft: "Confirm a draft before execution. Preserve objective for budget-only tweaks; token_budget=null removes the cap, omit retains it. auto_continue defaults true;
|
|
16
|
+
propose_goal_draft: "Confirm a draft before execution. Preserve objective for budget-only tweaks; token_budget=null removes the cap, omit retains it. auto_continue defaults true; the user-started draft determines the mode.",
|
|
18
17
|
};
|
|
19
18
|
|
|
20
19
|
// Visit schema positions only: a field named 'description' or an object-valued
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gfgghgftgffg/pi-goal-x-lean",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Lean tool metadata over the complete pi-goal-x runtime; preserves goal tools, commands, scheduling and auditing.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"check": "npm run typecheck && npm test"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"pi-goal-x": "0.
|
|
50
|
+
"pi-goal-x": "0.35.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@earendil-works/pi-ai": ">=1.4.0 <2.0.0",
|