@humain/humain-code 0.8.4 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/bundle/chunks/{chunk-4BNDLR6C.js → chunk-2RXTZK2V.js} +1 -1
- package/dist/bundle/chunks/{chunk-CIAXW64K.js → chunk-3OOOEJV4.js} +5 -5
- package/dist/bundle/chunks/{chunk-J5YFXMTM.js → chunk-53DWQSBC.js} +1 -1
- package/dist/bundle/chunks/{chunk-73YX5XGR.js → chunk-7XRMMCKG.js} +267 -251
- package/dist/bundle/chunks/{chunk-HWXQCJDP.js → chunk-BDNX23GT.js} +76 -71
- package/dist/bundle/chunks/{chunk-52642TYH.js → chunk-COZTJAOY.js} +54 -51
- package/dist/bundle/chunks/{chunk-SOE25WIS.js → chunk-EWPEY4F4.js} +789 -790
- package/dist/bundle/chunks/{chunk-ARTF7ZMQ.js → chunk-FHP5BULR.js} +1 -1
- package/dist/bundle/chunks/{chunk-XGSJX23G.js → chunk-N3W4ALAM.js} +1 -1
- package/dist/bundle/chunks/{chunk-OTVHRZ67.js → chunk-SASR4VNV.js} +1 -1
- package/dist/bundle/chunks/{chunk-EVDQRT3I.js → chunk-VWUEKLRH.js} +8 -8
- package/dist/bundle/chunks/{compat-7UJJAO4E.js → compat-2RC4CJNV.js} +1 -1
- package/dist/bundle/chunks/{dist-7PCCEUQF.js → dist-3DAGUOYC.js} +1 -1
- package/dist/bundle/chunks/{dist-I53JI67E.js → dist-K4QIXV5O.js} +5 -5
- package/dist/bundle/chunks/{doctor-KJVAYG3F.js → doctor-EH7X36SK.js} +2 -2
- package/dist/bundle/chunks/{flow-implementer-GE2ARQKR.js → flow-implementer-J6QTLBTH.js} +2 -2
- package/dist/bundle/chunks/{inprocess-MGMVI6HN.js → inprocess-OHNEKTFB.js} +3 -3
- package/dist/bundle/chunks/{interactive-mode-HHWOE4FD.js → interactive-mode-ZREVRX7W.js} +2 -2
- package/dist/bundle/chunks/{virtual-modules-UXSSFNV5.js → virtual-modules-6FVRJTM3.js} +3 -3
- package/dist/bundle/cli-runtime.js +2 -2
- package/dist/bundle/index.js +6 -6
- package/dist/bundle/rpc-entry.js +2 -2
- package/dist/core/bug-report.d.ts +24 -1
- package/dist/core/bug-report.d.ts.map +1 -1
- package/dist/core/bug-report.js +216 -19
- package/dist/core/bug-report.js.map +1 -1
- package/dist/core/extensions/containment.d.ts +26 -0
- package/dist/core/extensions/containment.d.ts.map +1 -0
- package/dist/core/extensions/containment.js +66 -0
- package/dist/core/extensions/containment.js.map +1 -0
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +65 -7
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +2 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +55 -10
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +5 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js +4 -1
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/humain/checklist/vendor/commands.d.ts.map +1 -1
- package/dist/humain/checklist/vendor/commands.js +20 -8
- package/dist/humain/checklist/vendor/commands.js.map +1 -1
- package/dist/humain/flow-loader.d.ts.map +1 -1
- package/dist/humain/flow-loader.js +31 -5
- package/dist/humain/flow-loader.js.map +1 -1
- package/dist/humain/web-access/vendor/index.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/index.js +11 -1
- package/dist/humain/web-access/vendor/index.js.map +1 -1
- package/dist/modes/interactive/bug-report.d.ts.map +1 -1
- package/dist/modes/interactive/bug-report.js +48 -12
- package/dist/modes/interactive/bug-report.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +3 -3
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +28 -46
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/extensions.md +2 -0
- package/docs/flow.md +2 -0
- package/docs/humain-code.md +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/src/humain/web-access/UPSTREAM.md +8 -0
package/docs/extensions.md
CHANGED
|
@@ -259,6 +259,8 @@ Extension factories may run in invocations that never start a session. Do not st
|
|
|
259
259
|
|
|
260
260
|
Defer background resource startup until `session_start` or the command/tool/event that needs the resource. Register an idempotent `session_shutdown` handler to close any session-scoped resources you start.
|
|
261
261
|
|
|
262
|
+
After session replacement or reload, captured `ctx` and `pi` references are stale. Each registration receives an attribution view of the shared dispatch context; do not rely on `ctx` object identity between handlers. Awaited handlers retain their extension identity; a stale-context guard failure disables the originating registration. In interactive mode, attributable stale-context failures from detached work are reported without exiting or aborting the current operation. Other uncaught errors remain fatal. Editor-change and terminal-input callbacks have their own error boundary: a failing callback is unsubscribed and its originating registration disabled. These errors, and ordinary runner event errors, are shown with the extension path and saved in the crash attachment used by `/bug`. Late errors from an old runner are routed to the current interactive UI even after its listeners have been detached. This containment does not replace cleanup of extension-owned timers, processes, or other resources.
|
|
263
|
+
|
|
262
264
|
### Extension Styles
|
|
263
265
|
|
|
264
266
|
**Single file** - simplest, for small extensions:
|
package/docs/flow.md
CHANGED
|
@@ -26,6 +26,8 @@ Flow uses `/flow` with subcommands. The private bundled `@humain/orchestrate` pa
|
|
|
26
26
|
|
|
27
27
|
Help and argument completion are static: they work before either package loads and while Flow is disabled. Neither executor package loads at startup. HUMAIN Code registers the lightweight `/flow` and `/orchestrate` commands plus the `--profile` and `--flow-admission` startup flags. The first Flow-requiring invocation loads the bundled `@humain/flow` package through a memoized dynamic import. Hierarchy commands additionally load `@humain/orchestrate` through a separate memoized import and reuse the initialized Flow instance. Ordinary SMALL/MEDIUM `/flow run` does not load Orchestrate. If Flow needs hierarchy execution and none is registered, it can request this same host loader, independently of command spelling. Orchestrate registers its hierarchy implementation through Flow’s executor hook. Hierarchy personas and nested role-cost interpretation belong to Orchestrate; implementer personas, child bootstrap, sessions, recovery storage, telemetry and the usage ledger remain Flow-owned. Nested children resolve both packages’ trusted personas through a private child-lifetime directory, with unchanged user override and repository trust rules. A failed load is reported as `Failed to load Flow: <message>` and retried on the next invocation. A recognized subcommand that a build does not implement answers `/flow <command> is not available in this build. Use /flow help to see supported commands.`
|
|
28
28
|
|
|
29
|
+
If the session is replaced or reloaded while an executor import or staged startup replay is pending, the loader discards that session's pending command and registrations. It does not replay a stale startup context, report load errors through the closed session, or dispatch the old command into the replacement session. This lifecycle boundary is covered by `test/suite/regressions/398-bundled-stale-context.test.ts`, including delayed Flow/profile and Orchestrate import success/failure, interrupted factory/startup replay, and successful command dispatch from a fresh replacement registration. Pending commands are discarded, not migrated; deliberate post-replacement UI work belongs in `withSession` using its supplied context.
|
|
30
|
+
|
|
29
31
|
A plain prompt goes to the normal session and never touches Flow. The previous per-command slash names are not registered and have no aliases; see [Migration](../../flow/docs/migration.md) for the old-to-new mapping. Internal tools, `flow_*` RPC operations, and run settlement contracts are unchanged.
|
|
30
32
|
|
|
31
33
|
Flow payloads are passed through verbatim: the goal, message, or title text after the subcommand is never split or rejoined.
|
package/docs/humain-code.md
CHANGED
|
@@ -91,7 +91,7 @@ Native login uses browser/device authorization and MFA, not an API key. Persiste
|
|
|
91
91
|
|
|
92
92
|
`/usage` keeps combined Web+CLI monthly amounts separate from local session estimates and other providers. Used is actual usage (a known subtotal when incomplete); Pending is reserved, not a final charge or free usage. Remaining is the server's reported amount. Reset dates are UTC. Select Pending by mouse, or focus details, move the selection to Pending with the configured navigation actions, and confirm to read its explanation. Source filters affect details only. Fuse does not share a Forge allowance. Busy and allowance refusals do not trigger automatic inference retries; ambiguous outcomes may charge, so check `/usage` before retrying manually.
|
|
93
93
|
|
|
94
|
-
`/bug` creates a local reviewed ZIP. Narrow environment/account/generation/install IDs are included only when already available; exporting never bootstraps identity or sign-in. Each invocation asks whether to attach the secret-redacted conversation, with its UTF-8 byte size. Declining excludes conversation-derived diagnostics. Optional model summaries require separate explicit consent and may use allowance or provider tokens. Secrets are excluded before collection, summary inference and final ZIP inspection
|
|
94
|
+
`/bug` creates a local reviewed ZIP. Narrow environment/account/generation/install IDs are included only when already available; exporting never bootstraps identity or sign-in. Each invocation asks whether to attach the secret-redacted conversation, with its UTF-8 byte size. Declining excludes conversation-derived diagnostics. Optional model summaries require separate explicit consent and may use allowance or provider tokens. Secrets are excluded before collection, summary inference and final ZIP inspection. When a field exceeds projection limits, a bounded shared discovery pass must complete before that field can be dropped while retaining other safely redacted fields, including crash messages and stacks. Secrets discovered inside omitted fields still mask echoes elsewhere. Omission notes identify incomplete exports. If description, conversation or summary review cannot be preserved, `/bug` exports a reduced ZIP with safely redacted crash details when discovery remains assured; initial or collection failures ask for export confirmation first. If discovery itself fails (for example, oversized uninspectable text, malformed embedded credentials or insufficient literal coverage), no independent field retry can restore assurance: the ZIP contains only generated report identifiers, CLI version/platform/architecture, canonical crash dates and recognized crash kinds, plus an omission note. All arbitrary text is excluded in that closed fallback, preventing echoes of undiscovered secrets. The fallback makes no additional model calls. Exports with omission notes retain the original crash log locally. Review code and business content before manually emailing the archive to [akarim@humain.com](mailto:akarim@humain.com). Nothing is automatically emailed or uploaded. GitLab remains the internal tracker.
|
|
95
95
|
|
|
96
96
|
Interactive startup discloses metadata policy for the selected built-in environment. The first eligible print/JSON/RPC/agent-exec CLI run prints the notice only on stderr and atomically records global acknowledgment. SDK and metadata-only commands remain silent. Acknowledgment is not consent or a delivery gate; `HUMAIN_TERMINAL_OFFLINE=1`, `PI_OFFLINE=1` and no-network controls suppress delivery. Analytics retention is 400 days; diagnostics retention is 30 days. See [metadata disclosure](../README.md#metadata-disclosure) for identity, exclusions, readers and erasure policy. Contact: [akarim@humain.com](mailto:akarim@humain.com).
|
|
97
97
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@humain/humain-code",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@humain/humain-code",
|
|
9
|
-
"version": "0.8.
|
|
9
|
+
"version": "0.8.5",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@humain/humain-code-contracts": "0.4.23",
|
package/package.json
CHANGED
|
@@ -19,6 +19,14 @@ pruning API accepts a `maxMemoryBytes` override for deterministic small-budget
|
|
|
19
19
|
tests; it applies until changed or reset by `clearResults()`. `storage.ts`
|
|
20
20
|
remains listed in `upstream.json` under `humainPatches`.
|
|
21
21
|
|
|
22
|
+
The `index.ts` patch also invalidates `/search` selector answers when their
|
|
23
|
+
session ends or its tree is restored. Each command captures the session's
|
|
24
|
+
abort signal and checks it after both selectors, before deleting a held result
|
|
25
|
+
or touching UI. This prevents a delayed Delete from releasing a replacement
|
|
26
|
+
session's hold on the same result. Offline runner regressions are in
|
|
27
|
+
`test/suite/regressions/398-web-access-stale-context.test.ts`; retain these
|
|
28
|
+
guards when refreshing the vendor source.
|
|
29
|
+
|
|
22
30
|
Run `npm run check:web-access-upstream` to detect a newer npm release. The
|
|
23
31
|
HUMAIN Code CLI release script runs this check as a blocking preflight so a
|
|
24
32
|
new upstream release must be reviewed before publishing. Updating requires
|