Commit Graph
3635 Commits
Author SHA1 Message Date
creatixchu 7ff8da56df fix(connection): require trustedHosts entries in canonical authority form
A dangling colon (harness.internal:) or zero-padded port parses cleanly while
WHATWG silently rewrites it, turning an intended exact-port grant into an
any-port grant. Replace the character blacklist with a round-trip check: an
entry must read back from parsing exactly as written (case aside), refusing
the whole rewrite class at load.
2026-07-28 16:49:52 +08:00
creatixchu 0fcfc5214b Merge remote-tracking branch 'origin/doc/host-client-group-readmes' into feat/directory-picker 2026-07-28 16:42:36 +08:00
Hypatia May 032cd2f72d docs: refresh event consumer graph after master merge 2026-07-28 16:19:40 +08:00
Hypatia May 89ffbf5826 Merge origin/master into codex/status-bar-token-metrics
# Conflicts:
#	packages/client/runtime/README.i18n.yaml
2026-07-28 16:16:04 +08:00
imccyu 9ce201e490 Merge remote-tracking branch 'origin/master' into worktree-guifork 2026-07-28 16:12:12 +08:00
NI0317 b14fbf7031 Merge remote-tracking branch 'origin/master' into feature/directory-listing-tool 2026-07-28 16:12:11 +08:00
creatixchu b9cbe2f029 fix(connection): fail the load on a trustedHosts entry that is not a bare authority
WHATWG parsing would quietly read a hostname out of harness.internal/path or
user@harness.internal, authorizing the typo's hostname; other typos would sit
silently ignored until requests 403. Refuse every URL part beyond host[:port]
at plugin load.
2026-07-28 15:57:02 +08:00
_Kerman 019b0abb68 Merge remote-tracking branch 'origin/master' into xtr/identified-immutable-messages
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-24-separate-context-injection-from-turn-execution.i18n.yaml
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/core.i18n.yaml
#	docs/core-data-structures/session.i18n.yaml
#	docs/event-producer-consumer.md
#	docs/persistence-catalog.md
#	packages/core/session/README.i18n.yaml
#	packages/session-title/session-title/tests/persistence.spec.ts
2026-07-28 15:45:53 +08:00
creatixchu 7fd2abd828 feat(host): directory-picker capability seam with dialog and browse backends
The web GUI's folder picking was hardwired to one interaction: a native
OS chooser compiled into the gateway, unusable for remote deployments
and swappable only by editing apiproxy source.

Directory picking becomes a three-package capability seam in
packages/host: ctx.directoryPicker returns a discriminated capability —
dialog (the extracted native chooser; host-display only) or browse
(new: one-level listing + child creation over Node stdlib, hidden flags
host-stamped, symlinks followed, ancestry crumbs; remote-capable). The
gateway injects the seam, advertises the kind via
host.describe.directoryPicker, serves host.listDirectory /
host.createDirectory under browse, and answers
directory-picker-unavailable across kinds. cordis.yml is the swap
point; apps/cli keeps dialog mounted, so behavior is unchanged until
the in-app browser PR flips the default. The connection fixture serves
a deterministic browse tree; WorkspacesService gains the browse calls
the browser UI will drive. Decision record:
.agents/notes/implemented/architecture/2026-07-28-directory-picker-capability-seam.md
2026-07-28 15:44:53 +08:00
_Kerman 40c29495af Merge branch 'master' into xtr/trajectory-inspection-ui 2026-07-28 15:41:45 +08:00
_Kerman 14c3d2ef9c Merge remote-tracking branch 'github/master' into xtr/trajectory-inspection-ui
# Conflicts:
#	packages/client/ui-primitives/src/Menu.tsx
2026-07-28 15:41:03 +08:00
creatixchu 01eea07bab fix(connection): keep LAN serving working under the /api browser-trust fence
Markerless requests pass on any Host (a non-browser sender is the principal
and forges headers anyway); browser Host matching gains port-less entries and
WHATWG normalization; dsh derives LAN IP-literal authorities for an
all-interfaces bind and web grows --trusted-host for named ones.
2026-07-28 15:40:02 +08:00
_Kerman b1af35145b fix: enforce message snapshot invariants 2026-07-28 15:33:00 +08:00
_Kerman 833a58784f docs(session): refresh invariant metadata 2026-07-28 15:22:16 +08:00
_Kerman f074444cf0 Merge remote-tracking branch 'origin/master' into xtr/remove-append-out-of-band 2026-07-28 15:19:00 +08:00
_Kerman 0a3d38bb08 Merge remote-tracking branch 'origin/master' into xtr/identified-immutable-messages
# Conflicts:
#	docs/event-producer-consumer.md
2026-07-28 14:59:40 +08:00
creatixchu 01d68dee4e fix(connection): fence every /api request behind one browser-trust check
The only browser-trust guard covered host.pickDirectory, while the
consequential methods (session.prompt drives bash) accepted any Host —
open to DNS rebinding, where a rebound page reads and writes the API as
if same-origin and only the Host header betrays the attacker's domain.

The pickDirectory-specific loopback guard becomes a prefix-wide fence:
Host must be loopback or an exact host[:port] from the new trustedHosts
config, an attached Origin must equal that authority, and explicit
cross-site markers are refused; requests without browser markers (curl,
tests, native clients) pass, because without a browser there is no
confused deputy. The loopback-socket check is dropped — binding policy
expresses reachability, and the fence is not an auth layer. The Agent
Note records the full threat model and the alternatives.
2026-07-28 14:56:45 +08:00
Tianyi Cui fa18977ebd Merge remote-tracking branch 'origin/master' into worktree/pr742-retarget-20260728 2026-07-28 14:51:20 +08:00
_Kerman 0225d598e3 fix: preserve message occurrence contracts 2026-07-28 14:44:15 +08:00
NI0317 57cf137918 fix(fs-search): keep broad glob samples representative
Remove the duplicate model-facing list tool from this branch; directory orientation remains available through bash ls. Keep the glob sampling fix, add a real ACP composition snapshot, and narrow the decision record to the shipped bug fix.
2026-07-28 14:42:59 +08:00
_Kerman cee0666a4d refactor(session): remove synthetic log-only turns 2026-07-28 14:41:51 +08:00
_Kerman 744a821319 docs: refresh Cordis service catalog 2026-07-28 14:15:41 +08:00
_Kerman f5ec71f5b1 Merge remote-tracking branch 'origin/master' into xtr/identified-immutable-messages
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-21-cross-session-references.i18n.yaml
#	packages/context/session-reference/README.i18n.yaml
#	packages/context/session-reference/README.md
#	packages/context/session-reference/README.zh.md
#	packages/context/session-reference/src/index.ts
2026-07-28 13:58:06 +08:00
_Kerman fbf87e660c refactor: identify and freeze messages at creation 2026-07-28 13:55:59 +08:00
NI0317 4b5b22d42f Merge remote-tracking branch 'origin/master' into feature/directory-listing-tool
Master had advanced 392 commits. Every conflict was a derived artifact both
sides had regenerated — `docs/tool-catalog.md`, four recorded headless
session logs, and one TUI terminal expectation — so each was resolved by
taking master's version and re-running the generator and the keyless
snapshot refresh on the merged tree. No source file conflicted.

The new `examples/jsonrpc-agent` fixtures keep master's scrubbed
`{{system}}` / `{{tools}}` headers: that suite scrubs request headers, so a
new tool changes nothing there and the refresh output was discarded.
2026-07-28 13:48:28 +08:00
NI0317 717852423f fix(fs): harden directory listing and glob sampling 2026-07-28 13:01:26 +08:00
Hypatia May 9ca0241d5d feat(web): add durable session metrics (round 1) 2026-07-28 12:10:48 +08:00
imccyu bce9910b47 docs: regenerate cordis catalog line anchors 2026-07-28 12:09:48 +08:00
NI0317 9b9b45e65e fix(fs-search): sample an over-cap glob result across the tree
Asked what a workspace contained, an agent described one subfolder as the
whole project. `glob {"pattern": "*"}` matched 10030 paths across 22
top-level entries and the inline page was the first 100 of them, all under a
single unpacked archive.

Three properties compose into that page: a pattern with no `/` matches
basenames at any depth, so `*` means the whole tree rather than its top
level; `--sort=modified` orders oldest first, and unpacking an archive
restores timestamps that predate everything the user wrote; and the page was
the head of that order. Each is defensible alone, and together they make the
most ordinary request an agent receives produce a confident wrong answer.

A result within `globMaxResults` is unchanged — shown whole, in
modification-time order. Beyond it the page is filled round-robin across the
complete result's top-level entries, so one subtree cannot own every slot,
and the footer states that the page was sampled rather than taken in
modification-time order. Measured on a 24-entry, 716-file reproduction, the
head of 100 reaches 7 top-level names and the sampled page reaches 21. The
spill artifact still holds the complete sorted list.

The guidance and schema stop steering away from `ls`, state the any-depth
pattern rule, say results are files and never directories, and point at
`list` for a directory's contents.
2026-07-28 12:05:36 +08:00
NI0317 d4614f92d6 feat(fs): add a model-facing directory listing tool
`ctx.fs.listDir` has shipped since the filesystem seam gained it, with skill
discovery as its only consumer; the model-facing tool was deferred to a
separate decision. Nothing else could answer "what is in this directory":
`rg --files` backs glob and grep and never emits a directory entry, so an
empty directory is invisible, no output says which names are directories,
and no output gives an entry count.

`list` takes an optional `path`, defaulting to the session workspace so the
common question needs no argument, and returns the direct children of one
directory with their type. Two presentation rules carry it: directories sort
first, then files, then non-regular children, each alphabetically — so
truncation loses leaves rather than the tree — and the footer always states
the complete listing's size and composition, so a capped view can never read
as a whole directory.

It emits no `fs/observed`: seeing a filename is not reading a file, and a
listing must never satisfy the read-before-write gate.
2026-07-28 11:59:52 +08:00
imccyu 91045a467b Merge branch 'master' into worktree-guifork 2026-07-28 11:50:56 +08:00
_Kerman 5fc9a041ba Merge remote-tracking branch 'github/master' into xtr/trajectory-inspection-ui 2026-07-28 11:41:14 +08:00
_Kerman 3f7760717d cleanup(session): isolate trajectory inspection 2026-07-28 11:39:53 +08:00
Yichen Jiang 1dede11506 Merge remote-tracking branch 'origin/master' into worktree/web-model-request-retry
# Conflicts:
#	.agents/notes/implemented/architecture/2026-06-21-bounded-llm-request-recovery.i18n.yaml
#	.agents/notes/implemented/architecture/2026-06-21-bounded-llm-request-recovery.md
#	.agents/notes/implemented/architecture/2026-06-21-bounded-llm-request-recovery.zh.md
#	apps/web/tests/session-title.snapshot.ts
#	docs/config-catalog.md
#	packages/client/runtime/README.i18n.yaml
#	packages/client/runtime/README.md
#	packages/client/runtime/README.zh.md
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/src/client/chat/ChatView.tsx
#	packages/client/ui-conversation/tests/chat-view.spec.tsx
#	packages/llm/llm-retry/README.i18n.yaml
#	packages/llm/llm-retry/README.md
#	packages/llm/llm-retry/README.zh.md
2026-07-28 11:39:42 +08:00
kingwl bc3e776225 Merge remote-tracking branch 'origin/master' into feature/subagent-policy-inheritance
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-06-sandbox.i18n.yaml
#	docs/cordis-catalog/services.md
#	docs/persistence-catalog.md
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	packages/core/session/README.i18n.yaml
#	packages/subagent/subagent-inprocess/README.i18n.yaml
#	packages/ui/user-approval/src/index.ts
2026-07-28 11:19:46 +08:00
Yichen Jiang 968e4d5312 Merge remote-tracking branch 'origin/master' into worktree/tui-session-title-search
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-21-cross-session-references.i18n.yaml
#	.agents/notes/implemented/feature/2026-07-21-cross-session-references.md
#	.agents/notes/implemented/feature/2026-07-21-cross-session-references.zh.md
#	packages/context/session-reference/README.i18n.yaml
#	packages/context/session-reference/README.md
#	packages/context/session-reference/README.zh.md
#	packages/context/session-reference/src/index.ts
2026-07-28 11:11:57 +08:00
Yichen Jiang a43a2032ec fix(tui): search session references by title 2026-07-28 11:05:53 +08:00
imccyu 5cb3b5595a ci: close the post-merge gate debt — runtime closure, dead dep, regenerated artifacts, coverage deferrals
The master merge left the generated catalogs/module graph stale, the
python runtime closure missing dsh-session-projection (now reached
through session-title and tool-todo), and apiproxy holding a dead
session-title dependency (the bespoke title frame is retired). The four
files the merge pushed under the per-file coverage floor (commands
executor + invariant, projection registry drive tails, TUI) join the
existing TODO(gui) deferral block per the GUI-lane policy; the remaining
coverage-run failures reproduce identically on pure origin/master
(environment-bound suites: sdk process exit, TUI PTY timing, workflow
worker timing, title loader slow-boot) and are not this branch's debt.
2026-07-28 10:54:35 +08:00
_Kerman 71f1f36175 fix(ui): align trajectory CI contracts 2026-07-28 10:34:47 +08:00
_Kerman b483d8fef2 docs: sync compaction inspection contracts 2026-07-28 10:28:25 +08:00
imccyu a3bdec4450 Merge remote-tracking branch 'origin/master' into worktree-guifork 2026-07-28 10:23:48 +08:00
Hypatia May 05d4c19085 Merge remote-tracking branch 'origin/master' into codex/basic-session-search
# Conflicts:
#	apps/web/tests/snapshots/question-composer/answered.expected.md
#	packages/client/connection/tests/fake-api.ts
#	packages/client/runtime/README.i18n.yaml
#	packages/client/runtime/tests/fake-api.ts
#	packages/client/ui-workspace/README.i18n.yaml
#	packages/client/ui-workspace/README.md
#	packages/client/ui-workspace/README.zh.md
#	packages/client/ui-workspace/src/client/WorkspaceBrowser.tsx
#	packages/client/ui-workspace/tests/apply.spec.ts
#	packages/host/apiproxy/README.i18n.yaml
#	packages/host/apiproxy/README.md
#	packages/host/apiproxy/README.zh.md
#	packages/host/apiproxy/src/api-proxy.ts
#	packages/host/apiproxy/src/api/index.ts
#	packages/host/apiproxy/src/api/sessions.schema.ts
#	packages/host/apiproxy/src/fetch/client.ts
#	packages/host/apiproxy/src/fetch/handler.ts
#	packages/host/apiproxy/tests/fetch-carrier.spec.ts
#	packages/host/apiproxy/tests/rpc-schemas.spec.ts
#	packages/session-query/session-query/tests/search-helpers.spec.ts
2026-07-28 09:27:28 +08:00
Tianyi Cui a7cbdd83d7 Merge newer master into skill catalog hot refresh 2026-07-28 01:57:14 +08:00
Tianyi Cui b5930f4aa5 Merge latest master into skill catalog hot refresh 2026-07-28 01:23:10 +08:00
Tianyi Cui 9ebd0075e9 Merge master into fix/pty-handoff-grace 2026-07-28 01:19:58 +08:00
Chinesezjc d0be242138 Merge branch 'master' into fix/worker-timer-clamp 2026-07-28 01:12:16 +08:00
Tianyi Cui b557bfbde5 Merge newer master into skill catalog hot refresh 2026-07-28 01:12:11 +08:00
Tianyi Cui 2612a4b587 Merge latest master into skill catalog hot refresh 2026-07-28 01:10:33 +08:00
imccyu c10edbbc85 docs: regenerate catalogs and graphs for the projection seam; classify its types
gen-cordis-catalog type-link rows for the ProjectionDefinition surface and
CommandExecution; a sessionProjections service-role row for gen-doc-graphs;
regenerated module graph, persistence/config/cordis catalogs and api-catalog;
packages/README rows condensed back under the word ceiling; the RFC's sketch
fences marked ignore-check on both language sides (pairing re-recorded).
2026-07-28 01:09:55 +08:00
Chinesezjc ca676178b5 Merge branch 'master' into fix/worker-timer-clamp 2026-07-28 01:06:22 +08:00