@jc_stack/ez-agents 0.1.0-beta.31 → 0.1.0-beta.33
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/AGENTS.md +47 -32
- package/CHANGELOG.md +34 -1
- package/CONTRIBUTING.md +29 -26
- package/README.md +36 -25
- package/docs/application-channel.md +29 -2
- package/docs/architecture/ai-selection.md +10 -1
- package/docs/architecture/authority-boundaries.md +64 -14
- package/docs/architecture/event-sources.md +12 -5
- package/docs/architecture/telegram-intake.md +1 -1
- package/docs/host-service.md +3 -0
- package/docs/plugin-contributions.md +6 -1
- package/docs/plugins.md +23 -0
- package/docs/responsive-channels.md +3 -0
- package/docs/selective-monitoring.md +55 -3
- package/docs/setup.md +2 -1
- package/docs/upgrades.md +6 -4
- package/package.json +1 -1
- package/src/application-channel.ts +40 -9
- package/src/application-origin.ts +4 -0
- package/src/approval.ts +19 -3
- package/src/codex-session.ts +2 -2
- package/src/desktop-bridge.ts +70 -5
- package/src/event-sources.ts +13 -6
- package/src/executor.ts +4 -2
- package/src/files.ts +12 -0
- package/src/host-executor-protocol.ts +2 -2
- package/src/host-executor.ts +20 -4
- package/src/index.ts +81 -34
- package/src/plugins/manager.mjs +52 -20
- package/src/runs.ts +19 -2
- package/src/task-attachments.ts +56 -0
- package/src/task-capability.ts +45 -0
- package/src/task-cli.ts +7 -4
- package/src/task-executor.ts +8 -4
- package/src/task-mcp.ts +25 -8
- package/src/tasks.ts +132 -26
- package/src/telegram-source.ts +34 -13
- package/src/updates/artifact.mjs +2 -2
- package/src/updates/control.mjs +11 -1
- package/src/updates/runtime.mjs +3 -1
- package/templates/agent-guidance.md +14 -0
- package/test/application-channel.test.ts +52 -1
- package/test/codex-session.test.ts +2 -1
- package/test/desktop-bridge.test.ts +98 -1
- package/test/event-sources.test.ts +68 -8
- package/test/executor.test.ts +2 -2
- package/test/host-executor.test.ts +32 -3
- package/test/intake-relay.test.ts +79 -2
- package/test/local-qa.test.mjs +7 -3
- package/test/plugin-manager.test.mjs +31 -0
- package/test/runs.test.ts +19 -0
- package/test/task-attachments.test.ts +77 -0
- package/test/task-capability.test.ts +48 -0
- package/test/task-native.test.ts +4 -1
- package/test/tasks.test.ts +53 -1
- package/test/telegram-source.test.ts +28 -1
- package/test/updates.test.mjs +24 -1
package/AGENTS.md
CHANGED
|
@@ -73,6 +73,35 @@ can be stated briefly and deferred. Reviewers distinguish those blockers from
|
|
|
73
73
|
optional follow-ups and do not hold a working increment for hypothetical polish.
|
|
74
74
|
Measure progress by usable outcomes and feedback, not code or test volume.
|
|
75
75
|
|
|
76
|
+
## Feasibility frame for non-trivial work
|
|
77
|
+
|
|
78
|
+
Before implementing a non-trivial coding, architecture or product change, state
|
|
79
|
+
the user-visible objective, no more than five task-relevant binding constraints,
|
|
80
|
+
the component that owns the failed boundary, the subtraction or simplification
|
|
81
|
+
option, the minimum evidence needed to prove the outcome, and the stop condition.
|
|
82
|
+
Do not restate the full prompt or add this ceremony to minor mechanical edits.
|
|
83
|
+
|
|
84
|
+
A result that violates a binding constraint is invalid even when tests pass or
|
|
85
|
+
the immediate symptom disappears. Check behavioral correctness, architecture and
|
|
86
|
+
ownership, real user-path evidence and authorized side effects separately. Before
|
|
87
|
+
completion, inspect whether the change added a runner, wrapper, state owner, queue,
|
|
88
|
+
retry loop, prompt layer, dependency or configuration format; retain it only when
|
|
89
|
+
the existing owner or contract cannot solve the demonstrated problem. Use one
|
|
90
|
+
bounded constraint review, then stop when sufficient evidence passes unless a
|
|
91
|
+
concrete material risk remains.
|
|
92
|
+
|
|
93
|
+
Frame that review as answers to these questions, not as an open-ended request to
|
|
94
|
+
find flaws:
|
|
95
|
+
|
|
96
|
+
1. Did the solution cross an architecture, ownership or authority boundary?
|
|
97
|
+
2. Did it bypass a binding constraint or preserve the symptom through a workaround?
|
|
98
|
+
3. Did it add machinery where deletion or a simpler existing contract would work?
|
|
99
|
+
4. Does the evidence prove the real user-visible outcome rather than only a proxy?
|
|
100
|
+
5. Is there one concrete unresolved risk severe enough to block completion?
|
|
101
|
+
|
|
102
|
+
If no answer identifies a material blocker, finish. Do not start another review
|
|
103
|
+
round merely to seek more criticism, tests or hypothetical edge cases.
|
|
104
|
+
|
|
76
105
|
## 3. Crash-Safe Atomic Disk State
|
|
77
106
|
- All persistent stores (`ControlStore`, `RunStore`, outbox queue) must be disk-backed JSON files.
|
|
78
107
|
- **Atomic write pattern:** Never write directly to a state file. Always write to a temporary file (`${target}.${process.pid}.tmp`) with mode `0o600`, then atomically `rename` it over the destination.
|
|
@@ -94,40 +123,26 @@ Measure progress by usable outcomes and feedback, not code or test volume.
|
|
|
94
123
|
|
|
95
124
|
## 7. Fail-Closed Authority (Channel Access ≠ Execution)
|
|
96
125
|
- Incoming messages outside the approved owner binding must **never** spawn the executor. A first DM or group message records a pending request only. Explicitly approved owner groups grant owner access to all human members in that exact chat; bots and anonymous posts are ignored.
|
|
97
|
-
- Unapproved group messages from other senders and unknown DMs fail silently
|
|
126
|
+
- Unapproved group messages from other senders and unknown DMs fail silently unless an exact-contact or any-conversation owner-approved channel grant admits them. Both grant types use the restricted task runner. Paired-owner group text is discovery routed to the owner's private chat; it grants no group reply authority.
|
|
98
127
|
- Stopping work (`/stop`) must terminate the active worker PID immediately (`SIGTERM`, escalating to `SIGKILL` if unclosed after 3s).
|
|
99
128
|
|
|
100
|
-
## 8.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
129
|
+
## 8. Risk-based negative validation
|
|
130
|
+
|
|
131
|
+
Changes to authority, execution, routing, secret isolation or durable state must
|
|
132
|
+
validate the affected failure boundary, not rerun or recreate an unrelated fixed
|
|
133
|
+
checklist. Examples include proving that an unapproved sender spawns no process,
|
|
134
|
+
executor secrets remain absent, invalid IDs cannot traverse paths, ambiguous
|
|
135
|
+
external writes are not retried, and corrupt state fails safely. Add or change a
|
|
136
|
+
test only when it protects the changed contract or a demonstrated regression.
|
|
137
|
+
Existing relevant checks plus focused real-path evidence may be sufficient.
|
|
107
138
|
|
|
108
139
|
## Public contribution workflow
|
|
109
140
|
|
|
110
|
-
Read CONTRIBUTING.md before edits and docs/releasing.md before a release.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
Never treat task completion as permission to merge or publish.
|
|
119
|
-
Own the complete engineering/release handoff in CONTRIBUTING.md. Once ready,
|
|
120
|
-
proactively request only missing merge/release authority, then ship and verify;
|
|
121
|
-
do not leave the maintainer to discover ready drafts or operate the release.
|
|
122
|
-
|
|
123
|
-
For every core or plugin PR you author, revise or review, apply CONTRIBUTING.md's
|
|
124
|
-
architecture check and the README's engine/application boundary. A symptom fix
|
|
125
|
-
and green tests do not justify a conflicting execution or context owner. Existing
|
|
126
|
-
legacy channel-backend code is a documented limitation, not a pattern for new
|
|
127
|
-
integrations; applications submit agent turns through the native Ez execution path.
|
|
128
|
-
|
|
129
|
-
A coding-task handoff must include the pushed commit and draft PR URL, checks,
|
|
130
|
-
independent-review status and remaining QA. If PR creation is blocked, state the
|
|
131
|
-
blocker and preserved commit. The merging agent owns the post-merge worktree
|
|
132
|
-
cleanup check and reports removal or the specific reason to retain it. Follow
|
|
133
|
-
CONTRIBUTING.md for squash-merge evidence, ignored files and active-use checks.
|
|
141
|
+
Read CONTRIBUTING.md before edits and docs/releasing.md before a release. It owns
|
|
142
|
+
the worktree, PR, review, merge, release and cleanup process; do not duplicate that
|
|
143
|
+
process here or in feature documentation. For every core or plugin change, apply
|
|
144
|
+
its architecture check and the README's engine/application boundary. A symptom
|
|
145
|
+
fix and green tests do not justify a conflicting execution or context owner.
|
|
146
|
+
Existing legacy channel-backend code is a documented limitation, not a pattern
|
|
147
|
+
for new integrations. Keep internal plans and private evidence outside this
|
|
148
|
+
repository.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.1.0-beta.33
|
|
4
|
+
|
|
5
|
+
- Allow compatible plugin updates to add commands to existing services, registering
|
|
6
|
+
their aliases atomically while retaining collision checks and rejecting changes
|
|
7
|
+
to existing command routes or deployment authority.
|
|
8
|
+
- Simplify contribution guidance and bound independent constraint reviews without
|
|
9
|
+
changing the native engine, transport or plugin responsibility boundaries.
|
|
10
|
+
|
|
11
|
+
## 0.1.0-beta.32
|
|
12
|
+
|
|
13
|
+
- Add shared authenticated inbound attachment staging for application and
|
|
14
|
+
Telegram channels, preserving literal comments and immutable retries.
|
|
15
|
+
- Support separately scoped host-owned writable workspaces.
|
|
16
|
+
- Reconcile reused host-lock PIDs using process birth identity while failing
|
|
17
|
+
closed on unknown or matching live-process identity.
|
|
18
|
+
- Accept bounded scheduler recovery identifiers and preserve reviewed package
|
|
19
|
+
modes when extracting under a restrictive umask.
|
|
20
|
+
- Allow concurrent plugin commands, scoped approved outgoing files, and the
|
|
21
|
+
host CLI configuration needed for restricted read-only plugin commands.
|
|
22
|
+
- Clarify domain-agent positioning while preserving native engine ownership.
|
|
23
|
+
|
|
24
|
+
- Answer native app-server requests with their current protocol shapes. Scheduled
|
|
25
|
+
`codex-gui` browser work now surfaces approval requests and grants only its
|
|
26
|
+
active turn session-scoped HTTPS browser-origin and Chrome app elicitations,
|
|
27
|
+
while audio, cross-turn, unrelated elicitations and approvals remain declined.
|
|
28
|
+
- Restore `codex-gui` tasks when newer Codex Desktop builds do not create the
|
|
29
|
+
legacy control socket at app launch: invoke the native idempotent app-server
|
|
30
|
+
daemon start command and retry the desktop connection once, while retaining
|
|
31
|
+
fail-closed behavior and never falling back to headless execution.
|
|
32
|
+
- Add owner-approved, provider-neutral public channel grants so restricted fresh
|
|
33
|
+
agent runs can answer any private chat or mentioned group on one enabled source.
|
|
34
|
+
Grants may expose only fixed, read-only query aliases such as Library search;
|
|
35
|
+
they retain no owner memory, recheck revocation around every operation, and
|
|
36
|
+
enforce persisted concurrency, traffic, receipt and evidence bounds.
|
|
4
37
|
|
|
5
38
|
## 0.1.0-beta.31
|
|
6
39
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -16,9 +16,11 @@ repository. Public docs describe shipped behavior and explicit limitations.
|
|
|
16
16
|
Packaging/runtime changes also need the Docker checks in docs/releasing.md.
|
|
17
17
|
5. Open a PR explaining the problem, resulting behavior, verification and limits.
|
|
18
18
|
Include a short sanitized reproduction. State which tests were not run.
|
|
19
|
-
6. Obtain independent review and required CI,
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
6. Obtain one bounded independent final-head review and required CI, resolve
|
|
20
|
+
material findings, then complete the authorized merge. An owner or maintainer
|
|
21
|
+
request for a product change or fix authorizes this normal PR/merge loop;
|
|
22
|
+
unsolicited external contributions still require maintainer merge authority.
|
|
23
|
+
No CLA, ticket requirement, custom commit format or additional approval committee.
|
|
22
24
|
|
|
23
25
|
You are responsible for understanding submitted code, including AI-generated
|
|
24
26
|
code, and having the right to contribute it under this repository's license.
|
|
@@ -79,10 +81,10 @@ do not disguise them as supported architecture or start a duplicate repair.
|
|
|
79
81
|
create one worktree/PR per repository and link dependencies and merge order.
|
|
80
82
|
Branch from an unmerged feature only when the dependency is intentional and
|
|
81
83
|
documented; do not quietly include it in an unrelated PR.
|
|
82
|
-
- Push the task branch and open a
|
|
83
|
-
|
|
84
|
-
work
|
|
85
|
-
|
|
84
|
+
- Push the task branch and open a PR when the coherent change is reviewable. Use
|
|
85
|
+
draft status only while implementation or a named gate remains incomplete; do
|
|
86
|
+
not leave completed mergeable work in a draft or only on a local branch.
|
|
87
|
+
Publication remains a separate authority boundary.
|
|
86
88
|
- Every handoff names the repository, worktree, branch, exact commit, PR URL,
|
|
87
89
|
checks, independent-review status and remaining QA with its next action. If
|
|
88
90
|
pushing or PR creation is blocked, report the blocker and preserved local
|
|
@@ -98,9 +100,10 @@ do not disguise them as supported architecture or start a duplicate repair.
|
|
|
98
100
|
- New substantive commits or conflict resolutions invalidate the affected review
|
|
99
101
|
and test evidence. Refresh against current main, review the resulting diff and
|
|
100
102
|
run the applicable checks. Do not bypass protected-branch requirements.
|
|
101
|
-
- Merge only after review, required CI
|
|
102
|
-
Publish only under the separate release
|
|
103
|
-
releases. Record which source commit and
|
|
103
|
+
- Merge only after review, required CI and applicable QA under the authority in
|
|
104
|
+
the contribution checklist above. Publish only under the separate release
|
|
105
|
+
process; commits and merges are not releases. Record which source commit and
|
|
106
|
+
artifact hash were tested.
|
|
104
107
|
- Keep the worktree while its PR or QA is open. After merge or explicit abandonment,
|
|
105
108
|
inspect it for uncommitted/untracked files and local-only commits. Remove only
|
|
106
109
|
the clean task worktree after valuable work is preserved; never force cleanup.
|
|
@@ -124,22 +127,22 @@ and prepare the release. Reuse valid final-commit evidence; repeat checks when
|
|
|
124
127
|
changes or failures invalidate it. Do not leave a ready feature silently in draft
|
|
125
128
|
or ask the maintainer to run commands, coordinate reviewers, or operate CI.
|
|
126
129
|
|
|
127
|
-
The maintainer
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
credential/2FA, failed gate that cannot be repaired in
|
|
141
|
-
change. Human attention belongs on product intent;
|
|
142
|
-
|
|
130
|
+
The owner or maintainer request authorizes the requested work and its normal
|
|
131
|
+
PR/merge steps; do not ask them to approve the same work again. Release remains
|
|
132
|
+
separate authority: a request to merge does not authorize publication or changing
|
|
133
|
+
a private package's visibility, while a request to release authorizes the merge
|
|
134
|
+
and publication needed for that release. Prepare and verify the reviewed commits,
|
|
135
|
+
artifacts and checksums before shipping. If release was not requested, stop after
|
|
136
|
+
the merged contribution loop and report any distinct deployment or publication
|
|
137
|
+
step without performing it.
|
|
138
|
+
|
|
139
|
+
When release is authorized, complete publication using docs/releasing.md, then
|
|
140
|
+
verify registry metadata, the downloaded artifact and any explicitly requested
|
|
141
|
+
installed-runtime QA. Deployment is separate and requires a direct rollout
|
|
142
|
+
request or the target's saved update policy. Report the outcome. Escalate only a
|
|
143
|
+
product decision, missing credential/2FA, failed gate that cannot be repaired in
|
|
144
|
+
scope, or material scope change. Human attention belongs on product intent; the
|
|
145
|
+
agent operates the technical workflow.
|
|
143
146
|
|
|
144
147
|
Example, substituting a unique task name and an absolute external directory:
|
|
145
148
|
|
package/README.md
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
# Ez — AI
|
|
1
|
+
# Ez — Build domain-expert AI agents on the harnesses you already use
|
|
2
2
|
|
|
3
|
-
**
|
|
4
|
-
|
|
5
|
-
your business, then work with it through chat.
|
|
3
|
+
**The open-source composition layer for turning Codex, Grok and other native
|
|
4
|
+
agent harnesses into persistent, tool-using specialists.**
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
Combine domain knowledge, portable plugins, messaging, scheduling and explicit
|
|
7
|
+
authority around the AI tools you already have. Start with one useful agent and
|
|
8
|
+
grow into a team whose responsibilities, accounts and access remain clear.
|
|
9
|
+
|
|
10
|
+
Ez does not replace your agent engine or hide it behind another platform. The
|
|
11
|
+
native harness keeps ownership of reasoning, sessions, tools and delegation. Ez
|
|
12
|
+
connects that intelligence to a durable workspace, real applications, trusted
|
|
13
|
+
people and the operational controls required to work reliably.
|
|
14
|
+
|
|
15
|
+
Use Ez for a personal project, a specialist research system or an operating role
|
|
16
|
+
inside a startup or small business. Each agent gets a defined domain, its own
|
|
17
|
+
working context and only the tools and authority its job requires.
|
|
12
18
|
|
|
13
19
|
## Engine and application boundaries
|
|
14
20
|
|
|
@@ -58,20 +64,20 @@ not implemented. The legacy channel-backend mode delegates execution and changes
|
|
|
58
64
|
standard controls, so it does not meet this integration boundary. New integrations
|
|
59
65
|
use the [native application channel](docs/application-channel.md).
|
|
60
66
|
|
|
61
|
-
## What makes an Ez
|
|
67
|
+
## What makes an Ez domain agent
|
|
62
68
|
|
|
63
69
|
| Part | What it contributes |
|
|
64
70
|
|---|---|
|
|
65
|
-
| **Workspace** | Markdown instructions,
|
|
71
|
+
| **Workspace** | Markdown instructions, domain knowledge and working files that persist across conversations and changes of AI. |
|
|
66
72
|
| **Native engine** | Inference, native sessions, context management and tool execution. See [AI selection](docs/architecture/ai-selection.md). |
|
|
67
73
|
| **Authority** | A verified owner and explicit limits on delegated work. Receiving a message or installing a tool does not grant permission to act. |
|
|
68
74
|
| **Plugins** | Documented CLI commands and agent instructions for application capabilities. Commands enforce authentication, authorization, validation and canonical persistence directly or through authoritative application services. |
|
|
69
75
|
| **Ez transport and runtime** | Channel delivery, scheduling and standard runtime controls around the native engine. |
|
|
70
76
|
|
|
71
|
-
The design starts with one
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
The design starts with one agent, one domain and clear responsibilities. Domain
|
|
78
|
+
instructions live in the workspace; reusable capabilities live in tools and
|
|
79
|
+
plugins. The agent decides how to do the work using those instructions and the
|
|
80
|
+
capabilities available to it.
|
|
75
81
|
|
|
76
82
|
Use the engine's native capabilities when they meet the need. Add a standalone
|
|
77
83
|
plugin when a missing integration earns the maintenance. Ez keeps the surrounding
|
|
@@ -81,9 +87,9 @@ clients improve.
|
|
|
81
87
|
## Plugin catalog
|
|
82
88
|
|
|
83
89
|
Browse the [available plugins](docs/plugin-catalog.md) for capabilities you can
|
|
84
|
-
add to
|
|
90
|
+
add to an agent. The first released plugin is
|
|
85
91
|
[WhatsApp](https://github.com/jdorado/ez-whatsapp), which connects an existing
|
|
86
|
-
WhatsApp account. Ask your working Ez
|
|
92
|
+
WhatsApp account. Ask your working Ez agent to set it up in Telegram.
|
|
87
93
|
|
|
88
94
|
## Start with one useful job
|
|
89
95
|
|
|
@@ -97,12 +103,12 @@ requested, keep each workspace's authority and registry explicit.
|
|
|
97
103
|
Ask an AI agent with computer access to install Ez for a concrete purpose:
|
|
98
104
|
|
|
99
105
|
> Install Ez from https://github.com/jdorado/ez-agents for my business.
|
|
100
|
-
> I want
|
|
106
|
+
> I want a quoting specialist that works from my own files.
|
|
101
107
|
> Set it up and verify that I can talk to it in Telegram.
|
|
102
108
|
|
|
103
109
|
The installing agent follows [the setup guide](docs/setup.md), handles technical
|
|
104
110
|
setup and asks you for the account access or approvals it needs. Once the
|
|
105
|
-
|
|
111
|
+
agent replies in Telegram, explain the domain, give it the relevant
|
|
106
112
|
materials and request any additional tools there. Integrations require their
|
|
107
113
|
own setup and authorized accounts.
|
|
108
114
|
|
|
@@ -111,21 +117,26 @@ own setup and authorized accounts.
|
|
|
111
117
|
The current source supports persistent agent workspaces, a choice of host AI
|
|
112
118
|
executors, owner-gated Telegram messaging, native scheduling, plugin lifecycle
|
|
113
119
|
management and bounded, owner-approved correspondence. A messaging task can
|
|
114
|
-
|
|
120
|
+
serve one approved conversation or, after an explicit broad approval, anyone on
|
|
121
|
+
one capable source. Restricted runs receive only their shared context and exact
|
|
122
|
+
installed read-only query capabilities; they do not inherit the owner workspace
|
|
123
|
+
or tools.
|
|
124
|
+
The built-in Telegram source supports text in private chats and groups;
|
|
115
125
|
restricted task execution currently requires the pinned Codex runtime. See
|
|
116
126
|
[authority boundaries](docs/architecture/authority-boundaries.md) for the exact
|
|
117
127
|
scope and [scheduling](docs/scheduling.md) for scheduled work.
|
|
118
128
|
|
|
119
|
-
The broader direction is
|
|
129
|
+
The broader direction is agents working across distinct domains, with deliberate
|
|
120
130
|
workspace sharing and authority over who may direct work, see information and
|
|
121
|
-
use accounts. General team delegation
|
|
122
|
-
|
|
131
|
+
use accounts. General team delegation and enterprise reviewer roles remain
|
|
132
|
+
future work. The current trusted-host beta is not an
|
|
123
133
|
enterprise isolation or multi-tenant security product. See [security scope](SECURITY.md).
|
|
124
134
|
|
|
125
135
|
## For agents discovering this repository
|
|
126
136
|
|
|
127
|
-
Ez may fit when a user needs a persistent
|
|
128
|
-
chat, using an existing AI client and separately installed tools. Start
|
|
137
|
+
Ez may fit when a user needs a persistent domain-specific AI agent reachable
|
|
138
|
+
through chat, using an existing AI client and separately installed tools. Start
|
|
139
|
+
here:
|
|
129
140
|
|
|
130
141
|
- **Install for a user:** [setup and verified onboarding](docs/setup.md), then the installer instructions below.
|
|
131
142
|
- **Understand access and delegation:** [authority boundaries](docs/architecture/authority-boundaries.md) and [security scope](SECURITY.md).
|
|
@@ -140,8 +140,12 @@ The existing `ezenciel-agents-schedule context` exposes it as
|
|
|
140
140
|
`run.application.context` only to the current native run. Domain tools and their
|
|
141
141
|
filesystem mounts are installed using ordinary Ez plugin/runtime setup. No API
|
|
142
142
|
field selects a native session, working directory, process environment or owner.
|
|
143
|
-
This
|
|
144
|
-
|
|
143
|
+
This version transports text plus core approval requests, without file delivery
|
|
144
|
+
or reactions. Run snapshots include `approvals: [{id,prompt,state}]`. Render the
|
|
145
|
+
prompt verbatim and POST `{"decision":"approved"}` or
|
|
146
|
+
`{"decision":"denied"}` to `/v1/approvals/TASK_ID` with the same bearer
|
|
147
|
+
credential. Core binds the decision to the authenticated owner generation; the
|
|
148
|
+
application must not infer or auto-submit consent.
|
|
145
149
|
|
|
146
150
|
## Conversation continuity and migration
|
|
147
151
|
|
|
@@ -364,3 +368,26 @@ secrets are present; do not put those secrets in a same-UID process environment
|
|
|
364
368
|
or readable mount. This setting is rejected for host/backend execution and
|
|
365
369
|
restricted delegated tasks, and cannot be selected by an application request.
|
|
366
370
|
It is not forwarded to the host executor.
|
|
371
|
+
|
|
372
|
+
## Generic inbound attachments
|
|
373
|
+
|
|
374
|
+
`POST /v1/runs` (and `runApplication`) accepts one optional
|
|
375
|
+
`attachment: {name, data}`, where `data` is canonical padded base64 of the file
|
|
376
|
+
bytes. `text` remains the literal user comment and may be empty with an attachment.
|
|
377
|
+
JPEG, PNG, WebP, PDF and UTF-8 TXT/Markdown (`.txt`, `.md`, `.markdown`) are supported,
|
|
378
|
+
up to 10 MiB decoded; empty files and other types are rejected. Core detects file
|
|
379
|
+
content rather than trusting a client MIME label. This same limit and staging
|
|
380
|
+
contract apply to Telegram photo/document input.
|
|
381
|
+
|
|
382
|
+
Authentication precedes staging. Core stages the file privately in the ordinary
|
|
383
|
+
workspace inbox and uses the same attachment metadata and literal comment as
|
|
384
|
+
Telegram. The existing run queue, native executor, selected AI and native session
|
|
385
|
+
remain authoritative; applications must not extract, summarize, convert or build
|
|
386
|
+
attachment prompts. Use `followOwner:true` for the shared owner conversation.
|
|
387
|
+
Retry the same request ID, filename, bytes and literal comment; conflicts return
|
|
388
|
+
409 and successful retries do not stage another file. A failed admission removes
|
|
389
|
+
its staged file; a process crash may leave an unused inbox file, never a runnable
|
|
390
|
+
partial request. Separate owner runtimes must retain separate workspace mounts.
|
|
391
|
+
|
|
392
|
+
This is inbound file support. Application replies currently deliver text only;
|
|
393
|
+
outgoing file downloads remain unsupported by this HTTP channel.
|
|
@@ -14,7 +14,16 @@ Grok/Claude accept caller-selected native UUIDs. Codex/OpenCode generate IDs, so
|
|
|
14
14
|
the adapter reads only their typed JSONL session metadata; stdout never becomes a
|
|
15
15
|
Telegram reply. `codex-gui` is a separate desktop adapter: it submits a dedicated
|
|
16
16
|
app-server thread/turn and waits for that turn to finish. It does not run
|
|
17
|
-
`codex exec`.
|
|
17
|
+
`codex exec`. If the native control socket is absent, the adapter asks the
|
|
18
|
+
installed Codex CLI to idempotently start its own app-server daemon, then retries
|
|
19
|
+
the connection once. It does not implement another daemon or fall back to the
|
|
20
|
+
headless CLI. A missing or mismatched native session fails closed, not `--last`.
|
|
21
|
+
Native server requests use their method-specific response schema. Scheduled turns
|
|
22
|
+
use on-request approval routing so browser elicitations reach the adapter, which
|
|
23
|
+
accepts only the active turn's session-scoped HTTPS browser-origin and Computer
|
|
24
|
+
Use Chrome app requests. Interactive turns remain non-interactive. Audio,
|
|
25
|
+
cross-turn, command, file and unrelated requests are declined rather than being
|
|
26
|
+
guessed or forwarded to a hidden task UI.
|
|
18
27
|
Legacy unbound sessions require the owner's explicit `/new`.
|
|
19
28
|
|
|
20
29
|
References used for the adapter contract:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Authority boundaries
|
|
2
2
|
|
|
3
|
-
The core
|
|
3
|
+
The core binds one owner identity, optionally linked to Telegram or an
|
|
4
|
+
application channel, and owns authority across providers. Plugins
|
|
4
5
|
provide transport, authentication, capture, and receipts. Their exposure metadata
|
|
5
6
|
is discovery information, never a grant. A CRM can contain external text too;
|
|
6
7
|
marking it internal does not confer owner authority.
|
|
@@ -17,7 +18,8 @@ owner does not edit JSON. The agent uses `list` and `revoke` when asked.
|
|
|
17
18
|
After approval the relay starts a restricted task, including the initial outgoing
|
|
18
19
|
message. Incoming-only tasks instead wait for new correspondence and never create
|
|
19
20
|
an opening run. Their task records use version 2 so older task readers fail closed. Matching new correspondence resumes that task in a fresh native session.
|
|
20
|
-
Other contacts remain blocked
|
|
21
|
+
Other contacts remain blocked unless an owner-approved any-conversation grant is
|
|
22
|
+
active for that source. Finite tasks have at most 30 distinct text sends;
|
|
21
23
|
there are no payments, attachments, extra recipients, plugin installation,
|
|
22
24
|
settings changes, or access to owner memory. A contact can have one active or
|
|
23
25
|
pending task at a time. Completed, revoked, expired, replaced-source, and changed-
|
|
@@ -30,6 +32,46 @@ that each sentence serves the booking or that a correspondent is truthful. A
|
|
|
30
32
|
prompt injection can still derail a task or elicit its shared context. It cannot
|
|
31
33
|
use the provided tools to read owner files or select another destination.
|
|
32
34
|
|
|
35
|
+
## Channel audiences and capabilities
|
|
36
|
+
|
|
37
|
+
Version-4 grants may bind the audience to every conversation captured by one
|
|
38
|
+
registered event source. The source must advertise `wildcardWatch` and implement
|
|
39
|
+
`task-watch`/`task-unwatch` for conversation `*`. The grant is incoming-only and
|
|
40
|
+
active until owner revocation. It does not grant other sources, owner controls,
|
|
41
|
+
the owner session, owner files or conversation history. Each run contains events
|
|
42
|
+
from exactly one provider conversation, replies only to that captured
|
|
43
|
+
conversation and exposes no cross-conversation notes. Exact-contact grants remain
|
|
44
|
+
the default.
|
|
45
|
+
|
|
46
|
+
Public admission is capped at eight outstanding conversations, 60 conversations
|
|
47
|
+
and 60 replies per hour, and 1,000 conversations or replies across the life of a
|
|
48
|
+
grant. The cumulative limit revokes the grant and requires fresh owner review.
|
|
49
|
+
Terminal public-run evidence retains the most recent 100 released runs per grant;
|
|
50
|
+
unreleased runs remain durable for retry. Released provider events and accepted
|
|
51
|
+
Telegram send receipts are also bounded.
|
|
52
|
+
|
|
53
|
+
A channel grant may include up to eight owner-approved query capabilities. Each is an
|
|
54
|
+
exact registered `ez` command plus fixed arguments ending in literal
|
|
55
|
+
`-- {input}`. The restricted broker replaces only `{input}` with the
|
|
56
|
+
correspondent's string; the model cannot select a command, prepend flags, choose
|
|
57
|
+
a recipient, access a shell or change the fixed arguments. The full command
|
|
58
|
+
vector and disclosure scope appear in the immutable owner approval. Core rechecks
|
|
59
|
+
the grant immediately before and after invocation and before every reply. The
|
|
60
|
+
installed alias must declare `channelQuery: true` and explicitly declare that it
|
|
61
|
+
accepts external input without external sends, record changes, or interactive
|
|
62
|
+
review; core revalidates this trusted installed manifest before execution. Output
|
|
63
|
+
is bounded to 128 KiB and may be disclosed to the approved audience; stderr and
|
|
64
|
+
process credentials are not exposed. Tool output and incoming messages remain
|
|
65
|
+
untrusted source material.
|
|
66
|
+
|
|
67
|
+
Capabilities are a core channel permission, not a plugin permission system.
|
|
68
|
+
Domain tools remain ordinary reviewed CLIs and enforce their own authentication,
|
|
69
|
+
resource authorization, validation, persistence and receipts. For example, an
|
|
70
|
+
installed Library can supply a dedicated fixed read-only search alias. Do not
|
|
71
|
+
grant lifecycle/admin commands or an operation with
|
|
72
|
+
unbounded or uncertain external effects through this query-shaped interface.
|
|
73
|
+
Those require a purpose-built tool contract with its own idempotency and receipts.
|
|
74
|
+
|
|
33
75
|
## Ongoing conversation permissions
|
|
34
76
|
|
|
35
77
|
Incoming-only proposals may use `--until-revoked` for an ongoing conversation.
|
|
@@ -42,14 +84,15 @@ later replies. The runner gets current-run receipts and rolling group-only notes
|
|
|
42
84
|
receive the largest supported timestamp for the watch; the core still checks
|
|
43
85
|
revocation before every operation. Older versions reject version-3 grants.
|
|
44
86
|
|
|
45
|
-
The native Telegram source implements the
|
|
46
|
-
group IDs. It records selected text messages and sender
|
|
47
|
-
|
|
87
|
+
The native Telegram source implements the provider protocol for exact private or
|
|
88
|
+
group IDs and wildcard audiences. It records selected text messages and sender
|
|
89
|
+
identity, and sends only to the concrete captured chat with durable
|
|
90
|
+
uncertain/accepted receipts. Bot messages and
|
|
48
91
|
anonymous-admin posts are excluded by intake. Unselected owner group text remains
|
|
49
92
|
private discovery; other unselected group messages cannot launch work. Source
|
|
50
93
|
registration enables discovery, never reply permission. Voice and attachments are
|
|
51
94
|
not handled by this group adapter. WhatsApp continues using its existing adapter;
|
|
52
|
-
group and
|
|
95
|
+
group, ongoing and wildcard watch support depends on the companion provider. Older
|
|
53
96
|
adapters reject ongoing grants at proposal time. Pending watch removals retry
|
|
54
97
|
after service outages; core revocation blocks sends immediately.
|
|
55
98
|
|
|
@@ -69,9 +112,11 @@ tool discovery. Model metadata can override feature flags, so flags alone are
|
|
|
69
112
|
insufficient. The native inventory test uses a real bundled model entry and must
|
|
70
113
|
prove the five bounded task tools work without additional action tools.
|
|
71
114
|
|
|
72
|
-
A core stdio MCP broker exposes `context`, `send`, `note`, `report`, and `complete
|
|
115
|
+
A core stdio MCP broker exposes `context`, `send`, `note`, `report`, and `complete`,
|
|
116
|
+
plus only the exact capabilities recorded in the grant. Any-conversation runs omit
|
|
117
|
+
cross-conversation note/report/complete tools.
|
|
73
118
|
The native client also lists resource helpers, but the broker serves no resources.
|
|
74
|
-
Only these
|
|
119
|
+
Only these tools have native approval bypass configured: the core rechecks
|
|
75
120
|
the grant on each call. Broker requests cross host/relay through private atomic
|
|
76
121
|
control files; only the relay dispatches provider writes. Model tool arguments
|
|
77
122
|
never choose a recipient, account, control path, shell command, or permission.
|
|
@@ -80,8 +125,9 @@ containment, not isolation from a malicious native executable or local host user
|
|
|
80
125
|
Native configuration reference: [Codex configuration](https://learn.chatgpt.com/docs/config-file/config-reference).
|
|
81
126
|
|
|
82
127
|
Task notes live under protected `control/tasks/`, separate from the owner mind.
|
|
83
|
-
|
|
84
|
-
|
|
128
|
+
Exact-contact task reports currently use the linked Telegram owner outbox and
|
|
129
|
+
are visibly labelled; any-conversation runs have no report tool. Reports are not
|
|
130
|
+
inserted as owner instructions or trusted memory. The owner mind
|
|
85
131
|
keeps its existing `inbox/` and `work/` organization. No database or general memory
|
|
86
132
|
index is introduced.
|
|
87
133
|
|
|
@@ -92,6 +138,8 @@ stable string `accountId` in `events-head`. The core calls `task-watch` with tha
|
|
|
92
138
|
account, exact `conversationId`, and expiry to request bounded capture attention.
|
|
93
139
|
The existing events/events-check protocol supplies incoming messages. This
|
|
94
140
|
subscription grants attention only; execution still requires the core grant.
|
|
141
|
+
Sources that support an any-conversation grant additionally advertise
|
|
142
|
+
`wildcardWatch: true` and accept `*` only for watch/unwatch, never as a send target.
|
|
95
143
|
|
|
96
144
|
For sends the core supplies `task-send` with those same bound IDs, text, and a
|
|
97
145
|
core-prefixed idempotency key. The adapter checks account consistency immediately
|
|
@@ -116,7 +164,9 @@ records, but cannot launch task work.
|
|
|
116
164
|
Unmatched events retain terminal `cancelled` plus
|
|
117
165
|
`external-execution-unavailable`. Task runs use record version 2; older readers
|
|
118
166
|
reject/skip them instead of executing them with owner access. Existing version-1
|
|
119
|
-
owner runs remain readable.
|
|
167
|
+
owner runs remain readable. Older task readers reject version-4 wildcard grants;
|
|
168
|
+
approval prompt changes also fail closed if a capability-bearing older record is
|
|
169
|
+
read after rollback. Package state schema stays 1, but rollback suspends
|
|
120
170
|
task processing until a task-aware version returns; rollback does not replay
|
|
121
171
|
messages or erase task receipts. Update host and relay together. A missing or
|
|
122
172
|
outdated host fails task launch closed.
|
|
@@ -124,9 +174,9 @@ outdated host fails task launch closed.
|
|
|
124
174
|
The installing host user remains trusted and can modify local control state.
|
|
125
175
|
Owner runs can use the plugin manager and Docker administration; content read
|
|
126
176
|
inside owner work still depends on native protections and agent judgment. This
|
|
127
|
-
is not a
|
|
128
|
-
enterprise reviewer agents, arbitrary file sharing
|
|
129
|
-
executors are deferred.
|
|
177
|
+
is an owner-configured channel service, not a general multi-tenant execution
|
|
178
|
+
platform. Payments, enterprise reviewer agents, arbitrary file sharing and
|
|
179
|
+
unrestricted delegated executors are deferred.
|
|
130
180
|
|
|
131
181
|
Verify with `pnpm verify`, Docker test/runtime targets and smoke fixtures.
|
|
132
182
|
`EZ_TEST_NATIVE_TASKS=1 pnpm exec tsx --test test/task-native.test.ts` checks the
|
|
@@ -31,9 +31,16 @@ creation; it does not promise exactly-once external actions after executor failu
|
|
|
31
31
|
|
|
32
32
|
Before starting queued work, recheck binding, owner and provider eligibility.
|
|
33
33
|
Unavailable sources keep work queued; removed subscriptions cancel empty runs.
|
|
34
|
-
|
|
35
|
-
as blocked (`external-execution-unavailable`)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
Events matching exactly one active core task launch its restricted fresh-session
|
|
35
|
+
runner; unmatched events are recorded as blocked (`external-execution-unavailable`)
|
|
36
|
+
with no executor launch. Neither borrows the owner workspace, session or tools.
|
|
37
|
+
Any-conversation tasks admit at most one outstanding run per conversation and
|
|
38
|
+
eight across the public source queue, with persisted limits of 60 conversations
|
|
39
|
+
and 60 replies per hour and 1,000 across a grant. The cumulative limit revokes
|
|
40
|
+
the grant. Owner work is preferred and preempts an active public run. Terminal
|
|
41
|
+
history retains the latest 100 released runs per public grant; providers supporting
|
|
42
|
+
`releaseEvents` are told to discard terminal source events. Release completion is
|
|
43
|
+
persisted, and a failed release is retried before that run can be pruned. The source cursor and
|
|
44
|
+
deterministic run IDs preserve replay. No provider SDK or provider-specific
|
|
45
|
+
authority is imported into core.
|
|
39
46
|
See [authority boundaries](authority-boundaries.md).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
One owner, one bot, one relay writer per control directory. No database, extra agent, or executor loop.
|
|
4
4
|
|
|
5
|
-
1. Gate the sender and
|
|
5
|
+
1. Gate the sender and chat before accepting work. Text from the paired owner in an unbound group is recorded only for discovery and routed to the owner's private chat. Other private/group senders are ignored unless the built-in source has an active exact or wildcard core grant. Group controls and anonymous administrators remain unsupported.
|
|
6
6
|
2. Atomically save the raw update and deduplicate its Telegram update ID in `EZ_CONTROL_DIR/inbox.json`.
|
|
7
7
|
3. Collect a short burst before downloading/transcribing. Seal batch membership on disk, then normalize in receive order. Captions, album IDs and quoted context travel with the media.
|
|
8
8
|
4. Create one durable run using the batch's stable ID. A restart between run creation and intake completion finds that same run; it does not create a second job.
|
package/docs/host-service.md
CHANGED
|
@@ -89,6 +89,9 @@ preserving it rather than reverting to a different or expired host login.
|
|
|
89
89
|
An agent binding may set `sharedWorkspace` to an absolute canonical application
|
|
90
90
|
repository. The host resolves its canonical path, adds that directory to Codex
|
|
91
91
|
write permissions for chat and scheduled jobs, including symlink aliases.
|
|
92
|
+
If the agent needs more than one separately scoped writable directory, keep the
|
|
93
|
+
canonical application in `sharedWorkspace` and list the others as absolute paths
|
|
94
|
+
in `additionalWorkspaces`; do not grant a broader common parent.
|
|
92
95
|
The host claims requests independently; a running job does not block another
|
|
93
96
|
request sharing its workspace. The selected engine owns execution concurrency.
|
|
94
97
|
Task sessions and artifacts remain isolated. The binding is host-owned and cannot
|
|
@@ -18,6 +18,8 @@ Before the first PR, provide:
|
|
|
18
18
|
- Per-command exposure declarations for external reads, external sends, record
|
|
19
19
|
changes and requested review; see [plugin metadata](plugins.md#exposure-declarations).
|
|
20
20
|
These are self-reported capabilities, never permission grants or safety certificates.
|
|
21
|
+
A dedicated query-only alias may opt into restricted channel use with
|
|
22
|
+
`channelQuery: true` and the required explicit non-writing exposure fields.
|
|
21
23
|
- Private state locations, start/stop/status, backup, migration/rollback limits,
|
|
22
24
|
data-preserving uninstall and separate account revocation instructions.
|
|
23
25
|
- Offline contract/negative tests and CI. Verify snapshot installation and CLI
|
|
@@ -26,7 +28,10 @@ Before the first PR, provide:
|
|
|
26
28
|
|
|
27
29
|
Copy CONTRIBUTING.md, SECURITY.md structure, PR template and docs/releasing.md
|
|
28
30
|
from a released Ez repository; adapt commands and security facts to your plugin.
|
|
29
|
-
|
|
31
|
+
Add a short AGENTS.md that states the plugin's ownership boundary and applies the
|
|
32
|
+
same compact feasibility frame and risk-based validation policy; do not copy
|
|
33
|
+
core-only Telegram, state or dependency invariants. Do not copy private QA,
|
|
34
|
+
company policy, proposed features or unsupported claims.
|
|
30
35
|
Public instructions must work without the maintainer's parent workspace. Use
|
|
31
36
|
reviewed local source and its inspected content hash; registry installation is
|
|
32
37
|
inert. Installation is complete only after account onboarding and verified use.
|