@jc_stack/ez-agents 0.1.0-beta.26 → 0.1.0-beta.28
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/.env.example +10 -1
- package/AGENTS.md +40 -9
- package/CHANGELOG.md +35 -0
- package/CONTRIBUTING.md +31 -1
- package/Dockerfile +1 -0
- package/README.md +84 -12
- package/bin/ezenciel-agents-application +2 -0
- package/bin/ezenciel-agents-application.mjs +16 -0
- package/compose.yaml +8 -0
- package/docker/entrypoint.sh +20 -2
- package/docker/healthcheck.mjs +1 -1
- package/docker/run.ts +3 -3
- package/docker/smoke.mjs +41 -2
- package/docs/application-channel.md +366 -0
- package/docs/architecture/ai-selection.md +12 -15
- package/docs/docker-runtime.md +29 -0
- package/docs/host-service.md +5 -8
- package/docs/local-qa.md +1 -1
- package/docs/managed-applications.md +68 -0
- package/docs/plugin-catalog.md +1 -0
- package/docs/plugin-connection.md +76 -0
- package/docs/plugins.md +54 -5
- package/docs/repair.md +26 -25
- package/docs/responsive-channels.md +13 -55
- package/docs/scheduling.md +40 -36
- package/docs/setup.md +11 -21
- package/docs/standalone-cli.md +2 -2
- package/docs/upgrades.md +43 -18
- package/package.json +8 -4
- package/src/agent-guidance.ts +32 -3
- package/src/ai-cli.ts +5 -1
- package/src/ai.ts +6 -28
- package/src/application-channel.ts +308 -0
- package/src/application-cli.ts +41 -0
- package/src/application-client.mjs +87 -0
- package/src/application-origin.ts +15 -0
- package/src/codex-session.ts +7 -10
- package/src/config.ts +23 -5
- package/src/control-state.ts +274 -21
- package/src/conversation-menu.ts +89 -0
- package/src/delivery-context.d.mts +5 -0
- package/src/delivery-context.mjs +25 -0
- package/src/desktop-bridge.ts +11 -43
- package/src/event-sources.ts +2 -2
- package/src/execution-authority.ts +2 -0
- package/src/executor.ts +29 -58
- package/src/host-executor.ts +11 -9
- package/src/identity.ts +11 -3
- package/src/index.ts +191 -93
- package/src/menu.ts +76 -55
- package/src/message-history.ts +52 -0
- package/src/message-send.ts +1 -1
- package/src/message.ts +49 -7
- package/src/model-policy.ts +5 -15
- package/src/owner.ts +7 -1
- package/src/plugins/connection-artifacts.mjs +31 -0
- package/src/plugins/connection.mjs +124 -0
- package/src/plugins/manager.mjs +93 -23
- package/src/plugins/native-tasks.d.mts +4 -0
- package/src/plugins/native-tasks.mjs +66 -0
- package/src/plugins/workspace-lease.d.mts +3 -0
- package/src/plugins/workspace-lease.mjs +44 -0
- package/src/repair-policy.ts +0 -8
- package/src/reply-context.ts +3 -29
- package/src/runs.ts +67 -9
- package/src/schedule-cli.ts +33 -15
- package/src/scheduled-tasks.ts +20 -21
- package/src/scheduler.ts +55 -22
- package/src/task-executor.ts +4 -5
- package/src/task-workspace.ts +2 -11
- package/src/update-attention.ts +1 -1
- package/src/updates/binding.mjs +2 -6
- package/src/updates/control.mjs +4 -0
- package/src/updates/supervisor.mjs +10 -4
- package/src/web-launcher.ts +19 -0
- package/src/workspace.ts +3 -1
- package/templates/agent/AGENTS.md +13 -55
- package/templates/agent-guidance.md +90 -37
- package/templates/deployments.md +24 -0
- package/templates/failure-review.md +6 -0
- package/templates/maintainer-purpose.md +12 -6
- package/test/agent-guidance.test.ts +29 -39
- package/test/ai-cli.test.ts +9 -0
- package/test/ai.test.ts +66 -22
- package/test/application-channel.test.ts +283 -0
- package/test/application-client.test.mjs +84 -0
- package/test/application-controls.test.ts +224 -0
- package/test/application-only.test.ts +100 -0
- package/test/busy-reply-relay.test.ts +11 -7
- package/test/channel-delivery.test.ts +63 -0
- package/test/channel-owner.test.ts +161 -0
- package/test/client-defaults.test.ts +1 -1
- package/test/codex-session.test.ts +18 -10
- package/test/config.test.ts +16 -1
- package/test/connection-artifacts.test.mjs +32 -0
- package/test/conversation-menu.test.ts +67 -0
- package/test/conversations.test.ts +84 -0
- package/test/desktop-bridge.test.ts +17 -11
- package/test/engine-handoff.test.ts +73 -0
- package/test/event-sources.test.ts +5 -8
- package/test/executor.test.ts +68 -16
- package/test/failure.test.ts +64 -0
- package/test/host-executor.test.ts +58 -17
- package/test/install-config.test.ts +1 -1
- package/test/intake-relay.test.ts +169 -25
- package/test/message-history.test.ts +127 -0
- package/test/model-policy.test.ts +23 -48
- package/test/native-tasks.test.ts +36 -0
- package/test/plugin-connection.test.mjs +124 -0
- package/test/plugin-manager.test.mjs +70 -10
- package/test/repair-policy.test.ts +8 -12
- package/test/runs.test.ts +13 -0
- package/test/runtime-identity.test.mjs +18 -0
- package/test/schedule-cli.test.ts +34 -5
- package/test/scheduled-tasks.test.ts +79 -8
- package/test/scheduler.test.ts +30 -1
- package/test/task-native.test.ts +5 -2
- package/test/update-attention.test.ts +1 -2
- package/test/updates.test.mjs +44 -5
- package/test/workspace.test.ts +2 -3
- package/scripts/smoke-busy-reply.ts +0 -58
- package/src/reply-executor.ts +0 -55
- package/src/reply-mcp.ts +0 -23
- package/templates/agent/TOOLS.md +0 -105
- package/templates/chat-guidance.md +0 -23
- package/templates/standalone-tools.md +0 -20
- package/templates/updates.md +0 -45
- package/test/reply.test.ts +0 -159
package/docs/plugins.md
CHANGED
|
@@ -28,7 +28,7 @@ Without `--catalog`, init loads an empty packaged catalog. Keep it empty for
|
|
|
28
28
|
initial main onboarding; no sibling repository, broker or provider account is
|
|
29
29
|
needed. Finish owner pairing and verify an actual Telegram agent reply first.
|
|
30
30
|
Init creates a private registry and `tools/bin/ez`, adds a
|
|
31
|
-
|
|
31
|
+
managed AGENTS.md registry locator, and binds the matching host executor to that bin
|
|
32
32
|
folder. Native binaries are linked through; an existing `ez` collision fails.
|
|
33
33
|
Run before starting the host executor. For an already running installation,
|
|
34
34
|
place a symlink to the returned launcher in that agent's existing private bin
|
|
@@ -263,10 +263,10 @@ Shared workers have a hard Docker CPU quota of half a core by default, across al
|
|
|
263
263
|
|
|
264
264
|
## Existing local folders
|
|
265
265
|
|
|
266
|
-
Use operator-owned
|
|
266
|
+
Use operator-owned folder bindings when a plugin needs files that
|
|
267
267
|
already exist on the host. Keep indexes and writable metadata in the plugin's
|
|
268
268
|
normal volume. This uses Docker bind mounts; it copies no source bytes and
|
|
269
|
-
starts no provider sync.
|
|
269
|
+
starts no provider sync. Read-only is the default.
|
|
270
270
|
|
|
271
271
|
Stop the plugin before changing a binding:
|
|
272
272
|
|
|
@@ -288,9 +288,58 @@ volume contents; inspect those before restarting to avoid using stale files.
|
|
|
288
288
|
Never enable another sync writer for an already synchronized host folder.
|
|
289
289
|
|
|
290
290
|
For Library, create/select the library name first and retain its QMD state while
|
|
291
|
-
binding the host tree at that library's `files` directory.
|
|
292
|
-
|
|
291
|
+
binding the host tree at that library's `files` directory. Enable provider bindings
|
|
292
|
+
only when that plugin supports the selected host folder and owns its sync. Enable the normal shared embedding worker through
|
|
293
293
|
`plugins shared-enable library embeddings`. Verify `library sources`, real search,
|
|
294
294
|
and original readback from the actual executor. Document any differences between
|
|
295
295
|
indexed snapshots and current originals; do not replace Library with private
|
|
296
296
|
QMD runtimes or edit installed Compose/package files to bypass missing support.
|
|
297
|
+
|
|
298
|
+
## Generated capability discovery
|
|
299
|
+
|
|
300
|
+
`ez tools list --details` generates a compact index directly from installed
|
|
301
|
+
`ez-plugin.json` manifests: each plugin supplies its `description`, command aliases
|
|
302
|
+
and `skills`. Descriptions are limited to 200 characters in this view; full
|
|
303
|
+
instructions stay in the skill. Installation, replacement and removal are reflected
|
|
304
|
+
on the next read, without hooks, LLM calls or a cached inventory file.
|
|
305
|
+
|
|
306
|
+
`ez tools list` retains its alias mapping for existing clients. Native AGENTS.md
|
|
307
|
+
contains only the agent-bound discovery shortcut. New workspaces do not seed
|
|
308
|
+
TOOLS.md; upgrades preserve legacy notes without rewriting them. Keep owner/account
|
|
309
|
+
policies in agent instructions or linked policy files, separate from plugin metadata.
|
|
310
|
+
|
|
311
|
+
Folder bindings default to read-only. For an explicitly authorized plugin that
|
|
312
|
+
updates the existing source, add `--writable` to `folder-bind` while the plugin
|
|
313
|
+
is stopped. The grant applies only to that folder and survives compatible
|
|
314
|
+
upgrades. Rebind without `--writable` to return it to read-only. Package
|
|
315
|
+
descriptors cannot request this grant. Keep one synchronization owner for each
|
|
316
|
+
source; a writable mount alone does not configure synchronization.
|
|
317
|
+
|
|
318
|
+
## Browser endpoints for connected plugins
|
|
319
|
+
|
|
320
|
+
`ez tools serve HOST_PORT:CONTAINER_PORT ALIAS ARGS...` runs a plugin's web command
|
|
321
|
+
inside its command container while core handles the existing persistent tool
|
|
322
|
+
protocol. Both ports must be 1024–65535. Publication is always on host 127.0.0.1;
|
|
323
|
+
no plugin manifest can request public ingress. Run the foreground command under
|
|
324
|
+
the host's normal service supervisor if it must survive terminal closure. SIGINT
|
|
325
|
+
or SIGTERM cancels the connection and removes its command container.
|
|
326
|
+
|
|
327
|
+
The plugin owns HTTP, browser authentication, sessions and static assets. HTTPS
|
|
328
|
+
termination, DNS and forwarding are explicit operator configuration. Plugins may
|
|
329
|
+
use the read-only `tools.owner` core request to check the current paired private
|
|
330
|
+
Telegram user and opaque pairing epoch. This is identity data, not an access grant;
|
|
331
|
+
the plugin must authenticate the requester and recheck identity on protected requests.
|
|
332
|
+
No owner returns null, and no bot token is exposed. Standard plugin CLI operations
|
|
333
|
+
still enforce their normal permissions. See the Voice plugin's README for a client.
|
|
334
|
+
|
|
335
|
+
To add an optional launcher without replacing Telegram's command menu, set the
|
|
336
|
+
relay Compose environment or `.env` (then recreate the relay container):
|
|
337
|
+
|
|
338
|
+
```dotenv
|
|
339
|
+
EZ_TELEGRAM_WEB_APP={"command":"voice","label":"Voice","url":"https://voice.example.com/"}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
The command returns a Mini App button to the authenticated owner in private chat;
|
|
343
|
+
`/menu` includes the same button. Reserved commands cannot be replaced. The HTTPS
|
|
344
|
+
URL must not contain credentials, query parameters or a fragment. This setting
|
|
345
|
+
only registers a launcher; it does not expose a port or authenticate web requests.
|
package/docs/repair.md
CHANGED
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
# Native repair ownership
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
Repair is a capability used by an explicit owner request or owner-saved maintenance
|
|
4
|
+
mandate. Discovering a defect alone does not enroll an ordinary conversation in
|
|
5
|
+
an issue/claim/PR workflow. Preserve useful evidence and continue the requested
|
|
6
|
+
task. The current execution guidance supersedes older default-repair text in
|
|
7
|
+
existing workspaces without rewriting the agent's mind.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
runtime
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
For an authorized repair, use the selected engine with native Git/GitHub tools
|
|
10
|
+
and follow the target repository's CONTRIBUTING.md. Check existing work for the
|
|
11
|
+
same cause and use an isolated contribution checkout; never edit the installed
|
|
12
|
+
runtime as the repair checkout. Resume the same branch/PR after interruption.
|
|
13
|
+
A separate issue, claim service or coordinator grant is not an ez prerequisite.
|
|
14
|
+
Use coordination only where the repository or owner explicitly requires it.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
Question the failing wrapper before adding code. Removing behavior or correcting
|
|
17
|
+
existing instructions/tool contracts can fully resolve the defect. Preserve
|
|
18
|
+
useful evidence and verified outcomes, with normal independent review and CI.
|
|
19
|
+
Missing credentials block only operations requiring them; continue useful local
|
|
20
|
+
work and report the precise remaining dependency. Public reports must exclude
|
|
21
|
+
private runtime data and use the security reporting route where appropriate.
|
|
22
|
+
Do not repeatedly check an unchanged dependency.
|
|
23
23
|
|
|
24
24
|
## Disable
|
|
25
25
|
|
|
26
26
|
Set `EZ_REPAIR_ENABLED=false` in the deployment's Docker environment and recreate
|
|
27
27
|
the relay. The resolved setting crosses the host transport and is included in
|
|
28
28
|
every new execution prompt; the default is true and invalid values fail startup.
|
|
29
|
-
|
|
29
|
+
True makes the capability available; it does not itself grant a repair mandate.
|
|
30
|
+
The setting does not change filesystem/GitHub permissions and does
|
|
30
31
|
not cancel an already running task. Explicitly stop active repair work when needed.
|
|
31
32
|
An owner can also disable repairs globally or for a repository in the agent's
|
|
32
33
|
saved USER.md preferences; carry those restrictions into background task context.
|
|
33
34
|
|
|
34
35
|
## Setup boundary
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
coordinator
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
Reuse existing authenticated access within the owner's request or saved mandate.
|
|
38
|
+
ez does not provision a coordinator, GitHub identity or publishing token, and
|
|
39
|
+
none is an implicit prerequisite for local diagnosis or an authorized local fix.
|
|
40
|
+
Repository push/PR access, protected-branch review and package publication are
|
|
41
|
+
separate capabilities and permissions. Follow existing release authority; never
|
|
42
|
+
put credentials in prompts, issues or test environments.
|
|
@@ -1,57 +1,15 @@
|
|
|
1
1
|
# Responsive channels
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
an accepted job. `xhigh` and `max` are available only for Luna; other models remain capped at high.
|
|
17
|
-
|
|
18
|
-
A handoff includes the objective, relevant context and paths, constraints,
|
|
19
|
-
authorized actions, acceptance checks and delivery destination. Background
|
|
20
|
-
sessions own verification and final delivery, and may use native subagents.
|
|
21
|
-
One writer per workspace still applies. Shared external resources require
|
|
22
|
-
coordination even when task directories differ. Status must distinguish a saved
|
|
23
|
-
schedule from actual execution and a verified result from a process exit.
|
|
24
|
-
|
|
25
|
-
The package loads `templates/chat-guidance.md` at each turn for CLI, desktop,
|
|
26
|
-
busy owner replies and approved plugin messaging tasks. Upgrades refresh this
|
|
27
|
-
behavior without rewriting the agent's personal files. Existing model choices
|
|
28
|
-
remain pinned; an upgrade adds Responsive chat as an available selection.
|
|
29
|
-
|
|
30
|
-
## Channel and authority boundaries
|
|
31
|
-
|
|
32
|
-
Telegram owner conversations can schedule work under the owner's authority.
|
|
33
|
-
The existing restricted busy-reply session keeps Codex chat available while a
|
|
34
|
-
writer is active. Other executors retain their existing concurrency behavior.
|
|
35
|
-
|
|
36
|
-
WhatsApp and other plugin contacts use the approved messaging task's isolated
|
|
37
|
-
context and tools. They receive the conversational guidance and Sol / medium
|
|
38
|
-
selection, but cannot invoke owner schedules, shell tools or native subagents.
|
|
39
|
-
They report work outside their capabilities to the owner; that report is not
|
|
40
|
-
an instruction or permission to execute. Full delegation from a plugin contact
|
|
41
|
-
needs an explicitly scoped worker capability and return route; this update does
|
|
42
|
-
not grant one. The plugin name alone never confers owner authority.
|
|
43
|
-
|
|
44
|
-
An application using `channelBackendUrl` owns its conversation, model and job
|
|
45
|
-
lifecycle. The relay does not inject prompts or override the app's model. Such
|
|
46
|
-
backends (including AI Fit) must adopt the same handoff policy in their own
|
|
47
|
-
runtime to benefit. Reuse their canonical job system; do not create a second
|
|
48
|
-
agent in the transport. Telegram polling and app-side queue waits still count
|
|
49
|
-
toward user-visible latency.
|
|
50
|
-
|
|
51
|
-
## Verification
|
|
52
|
-
|
|
53
|
-
Tests cover independent worker settings, preserved selections across upgrades,
|
|
54
|
-
idempotent handoffs, invalid settings, revocation and restricted tool boundaries.
|
|
55
|
-
Existing scheduler/host tests cover a conversational reply while work remains
|
|
56
|
-
active. Measure time to the first useful reply and verified task completion
|
|
57
|
-
separately on the deployed provider before claiming a performance improvement.
|
|
3
|
+
Owner input passes unchanged to the selected engine. The agent decides when to
|
|
4
|
+
delegate or schedule long work to remain available. ez queues foreground input
|
|
5
|
+
while a foreground run is active; it does not create a separate busy-reply agent.
|
|
6
|
+
Independent scheduled task directories retain deterministic writer isolation.
|
|
7
|
+
|
|
8
|
+
Background tasks receive literal task text. Their directories contain no generated
|
|
9
|
+
role instructions or copied identity files; native workspace instructions and
|
|
10
|
+
existing Markdown provide context. The agent chooses what to read and when to use
|
|
11
|
+
the message CLI. Native final text is not automatically delivered to Telegram.
|
|
12
|
+
|
|
13
|
+
Restricted correspondence receives a typed activation event and scoped tools.
|
|
14
|
+
Authorization, sandboxing and tool handlers enforce contact and lifecycle limits.
|
|
15
|
+
Maintenance and group notifications carry event data; CLI help owns operations.
|
package/docs/scheduling.md
CHANGED
|
@@ -32,30 +32,26 @@ the host changes zones. Nonexistent DST wall times are skipped; repeated wall
|
|
|
32
32
|
times fire once, at the earlier instant. Search is bounded to eight years.
|
|
33
33
|
Public-holiday calendars and arbitrary RRULE syntax are not implemented.
|
|
34
34
|
|
|
35
|
-
New tasks
|
|
36
|
-
`
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Use `--cli`, `--model`, and `--effort` to specify another choice. `xhigh` and
|
|
40
|
-
`max` are available only with Codex `gpt-5.6-luna`; every other model remains capped at
|
|
41
|
-
`high`. Non-Codex adapters inherit native effort when unset. Editing preserves the existing AI
|
|
42
|
-
choice unless those flags override it. Stored choices are checked again at
|
|
43
|
-
launch, including schedules saved before a policy change.
|
|
35
|
+
New tasks inherit selected engine settings. Explicit `--cli`, `--model` and
|
|
36
|
+
`--effort` override those choices; omitted values use native defaults. Edits
|
|
37
|
+
preserve existing choices. Historical deferred tasks keep their source context
|
|
38
|
+
available through `ezenciel-agents-schedule context`.
|
|
44
39
|
|
|
45
40
|
## Execution and authority
|
|
46
41
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
Due occurrences enter the durable queue with stable IDs and literal task text.
|
|
43
|
+
Background runs use fresh native sessions in `work/tasks/RUN_ID/`. No identity
|
|
44
|
+
files or role instructions are generated there. Existing workspace Markdown
|
|
45
|
+
provides context; the engine chooses what to read. Codex uses `AGENTS.md` or `.git`
|
|
46
|
+
as its native project-root marker, so a nested task sees the existing agent scope. Task folders remain for
|
|
47
|
+
inspection and artifact delivery.
|
|
52
48
|
|
|
53
49
|
One writer runs per task directory. Up to four background tasks can run alongside
|
|
54
|
-
the main conversation.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
the main conversation. Foreground inputs queue while a foreground turn runs;
|
|
51
|
+
ez does not create another reply agent. The agent can delegate or schedule long
|
|
52
|
+
work and return to chat. It decides when to send through the message CLI.
|
|
53
|
+
A recurring schedule has at most one pending or active occurrence. Shared
|
|
54
|
+
provider resources still need writer coordination.
|
|
59
55
|
|
|
60
56
|
Production relay/host execution has no wall-clock timeout. The old
|
|
61
57
|
`EZ_EXECUTOR_TIMEOUT_SECONDS` setting is ignored. Individual network/tool waits
|
|
@@ -64,13 +60,14 @@ are an executor capability, configured through instructions. Ez has no goal API,
|
|
|
64
60
|
continuation loop or rule equating a process exit with goal achievement.
|
|
65
61
|
|
|
66
62
|
Scheduled Codex CLI tasks use a dedicated native app-server session, tested with
|
|
67
|
-
CLI 0.153.4.
|
|
68
|
-
goal
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
as successful. Native RPC requests have a response deadline;
|
|
63
|
+
CLI 0.153.4. Ez forwards the full task as ordinary input without interpreting
|
|
64
|
+
`/goal` or constructing a native goal objective. The engine handles the request,
|
|
65
|
+
context and native goal creation. Codex owns continuation; the transport stays
|
|
66
|
+
connected while a native goal is active and verifies its terminal state. It sends
|
|
67
|
+
no continuation prompts and stores no Ez goal state. Ordinary tasks finish when
|
|
68
|
+
the engine completes its turn without an active goal. A blocked, paused or limited
|
|
69
|
+
goal is not reported as successful. Native RPC requests have a response deadline;
|
|
70
|
+
running tasks do not.
|
|
74
71
|
Each scheduled task has its own Codex state under `control/cli/codex/tasks/RUN_ID`,
|
|
75
72
|
with a snapshot of the agent's Codex configuration and the existing auth link.
|
|
76
73
|
Foreground chat and background tasks do not initialize or migrate one shared
|
|
@@ -109,6 +106,15 @@ artifacts are retained. The agent sends through the normal Telegram outbox;
|
|
|
109
106
|
`completed` means executor exit, while provider delivery is recorded separately.
|
|
110
107
|
A timeout or ambiguous send must not cause blind replay of the whole task.
|
|
111
108
|
|
|
109
|
+
## Failure-review stop
|
|
110
|
+
|
|
111
|
+
A schedule using `--when unreviewed-failures` stops dispatching its current
|
|
112
|
+
revision after one of its own runs fails. The failed receipt remains available
|
|
113
|
+
through `runs`/`run`; no new retry queue or automatic repair task is created.
|
|
114
|
+
The paired owner or authorized maintainer diagnoses it and explicitly edits the
|
|
115
|
+
schedule to resume. Marking the failure reviewed or pause/resume alone does not
|
|
116
|
+
clear the stop. Ordinary recurring tasks retain their existing failure behavior.
|
|
117
|
+
|
|
112
118
|
## QA
|
|
113
119
|
|
|
114
120
|
`pnpm verify` covers recurrence/DST, restart deduplication, authority revocation,
|
|
@@ -136,16 +142,6 @@ exercise cancellation, downtime catch-up and an explicitly requested native goal
|
|
|
136
142
|
that needs more than one turn. Synthetic provider evidence does not prove real
|
|
137
143
|
Telegram delivery, and a sleep test does not prove native goal persistence.
|
|
138
144
|
|
|
139
|
-
Busy-chat regression probe (real Codex, synthetic Telegram):
|
|
140
|
-
|
|
141
|
-
```sh
|
|
142
|
-
pnpm exec tsx scripts/smoke-busy-reply.ts --transport
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
The probe holds a writer on a shared workspace, asks an owner question through
|
|
146
|
-
the relay and host transport, and requires the restricted reply to complete
|
|
147
|
-
while the writer remains active. It sends no real Telegram messages.
|
|
148
|
-
|
|
149
145
|
## Optional failure review
|
|
150
146
|
|
|
151
147
|
Create a normal recurring schedule with `--every-seconds 900 --when unreviewed-failures --text-file templates/failure-review.md`. The condition advances empty occurrences without launching an executor. It considers only failures belonging to the paired owner. No separate monitor or automatic retry is introduced.
|
|
@@ -153,3 +149,11 @@ Create a normal recurring schedule with `--every-seconds 900 --when unreviewed-f
|
|
|
153
149
|
`failures [--all] [--limit N]` returns failedAt, reason, exit code, native session, captured error and runtime versions. Capture keeps at most 4 KiB of redacted stderr; historical failures are not backfilled. `run RUN_ID` reads an owned run. `review RUN_ID --failed-at ISO --status resolved|attention --diagnosis TEXT --recovery TEXT --outcome TEXT` records the investigation without rewriting execution history. A stale timestamp is rejected; a later failure needs a new review. Restricted reply, external and isolated-task callers cannot review failures. An attention review is handed off, not repeatedly relaunched; another new failure wakes the next review.
|
|
154
150
|
|
|
155
151
|
The prompt controls diagnosis, authorized recovery and quiet notification behavior. Inspect prior effects and receipts before retrying anything. A failed review run itself remains visible as a new failure for the next occurrence.
|
|
152
|
+
|
|
153
|
+
The Telegram Scheduled tasks menu lists enabled schedules that still have a pending
|
|
154
|
+
occurrence or a queued/running occurrence. Finished one-time tasks, paused
|
|
155
|
+
schedules and revisions stopped for review are hidden. Each entry shows the
|
|
156
|
+
effective engine/model/effort, next occurrence in UTC (or queued/running state),
|
|
157
|
+
and the first sentence of its saved invocation
|
|
158
|
+
prompt, limited to 140 characters. This is a read-only view; history and full
|
|
159
|
+
prompts remain available through the scheduling CLI.
|
package/docs/setup.md
CHANGED
|
@@ -52,26 +52,16 @@ owner request for standalone plugin development is a separate workflow.
|
|
|
52
52
|
|
|
53
53
|
## Defaults and host prerequisites
|
|
54
54
|
|
|
55
|
-
New agents
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
inherited configuration is not capped by Ez; explicit above-high Ez selections
|
|
66
|
-
are rejected unless they are Codex Luna/xhigh or Luna/max. Conversation presets pin Sol/medium; the lower-level
|
|
67
|
-
Codex fallback is Luna/max for work without an explicit choice.
|
|
68
|
-
|
|
69
|
-
New scheduled and one-off background tasks default to Codex Luna/max independently
|
|
70
|
-
of the creating chat. Use scheduler `--cli`, `--model`, and `--effort` flags for
|
|
71
|
-
explicit overrides. Editing a schedule preserves its settings unless overridden.
|
|
72
|
-
Restricted messaging tasks use Sol/medium while retaining their approved tool
|
|
73
|
-
and context boundaries. Upgrades add Responsive chat to saved choices without
|
|
74
|
-
replacing the selected/default preset. See [responsive channels](responsive-channels.md).
|
|
55
|
+
New agents use the selected engine's native model and effort unless a choice is
|
|
56
|
+
explicitly saved. Scheduling inherits the selected engine settings; `--cli`,
|
|
57
|
+
`--model` and `--effort` provide explicit overrides. Edits preserve saved choices.
|
|
58
|
+
The installed client's catalog supplies supported choices; ez imposes no model-specific
|
|
59
|
+
reasoning cap. Optional compaction settings are passed only when explicitly configured.
|
|
60
|
+
|
|
61
|
+
Restricted correspondence and busy replies retain their audited Codex adapter and
|
|
62
|
+
isolated tool permissions. They honor explicit model/effort choices; unset values
|
|
63
|
+
use that isolated client's native defaults. Unrestricted user configuration is
|
|
64
|
+
not imported into restricted sessions. No workflow prompt is added to input.
|
|
75
65
|
|
|
76
66
|
Use the existing owner's host account. Unless a layout was supplied, use
|
|
77
67
|
`${XDG_DATA_HOME:-$HOME/.local/share}/ez/packages/<version>/` for extracted main
|
|
@@ -199,7 +189,7 @@ node /absolute/ezenciel_agents/bin/ezenciel-agents-tools.mjs init \
|
|
|
199
189
|
This binds a private `ez` and preserves native command access. The default catalog
|
|
200
190
|
is empty. Do not supply a plugin catalog during first-time main onboarding.
|
|
201
191
|
Initialization
|
|
202
|
-
adds discovery instructions to the mind's
|
|
192
|
+
adds discovery instructions to the mind's AGENTS.md. Verify `tools/bin/ez plugins
|
|
203
193
|
available` before the first agent turn. Also execute the agent-bound
|
|
204
194
|
`ezenciel-agents-message --help` through the selected CLI sandbox and verify
|
|
205
195
|
its actual tool output, so absent launchers or blocked execution are detected
|
package/docs/standalone-cli.md
CHANGED
|
@@ -23,12 +23,12 @@ node /absolute/package/bin/ezenciel-agents-tools.mjs init --standalone \
|
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Init starts nothing, uses an empty catalog by default, preserves existing
|
|
26
|
-
|
|
26
|
+
workspace notes and adds a managed registry locator to AGENTS.md. A registry
|
|
27
27
|
cannot be replaced by rerunning init. Keep the package at its original path:
|
|
28
28
|
the launcher imports it. Status reports `main: null` without a relay binding;
|
|
29
29
|
automated software upgrades currently require a relay deployment.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Use `ez tools list --details` for generated installed-plugin descriptions, help shortcuts and absolute skill paths. Read only the relevant skill.
|
|
32
32
|
Add that instruction to its existing project instructions without replacing them.
|
|
33
33
|
Use the absolute launcher, or prepend its bin directory to that session's PATH.
|
|
34
34
|
Never overwrite another global `ez`; it may belong to a different installation.
|
package/docs/upgrades.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Agent-owned software upgrades
|
|
2
2
|
|
|
3
|
+
For an application's independently deployed frontend, backend or embedded gateway,
|
|
4
|
+
see [managed applications](managed-applications.md). They use their existing
|
|
5
|
+
deployment tools and a saved maintenance mandate; this package updater inventories
|
|
6
|
+
only core and registered plugins.
|
|
7
|
+
|
|
3
8
|
Available in this beta. Earlier main upgrade/rollback VM QA passed; final-release
|
|
4
9
|
fresh-host/reboot and live plugin upgrade acceptance remain pending. npm
|
|
5
10
|
publication is not required to test this feature. The beta channel is the default
|
|
@@ -14,13 +19,18 @@ runs the normal CLI transport. It checks npm every six hours while running and
|
|
|
14
19
|
queues an owner-bound maintenance turn only when an automatic channel changes.
|
|
15
20
|
No owner means no maintenance executor. Normal user work and maintenance share
|
|
16
21
|
one serial queue. Checks use the installed scoped npm identity; failures are
|
|
17
|
-
visible in `updates check` and private `tools/updates/available.json`.
|
|
22
|
+
visible in `updates check` and private `tools/updates/available.json`. Plugins marked
|
|
23
|
+
`private: true` in their package metadata are reported as local-source updates
|
|
24
|
+
only, without querying public npm; this does not mean they are up to date.
|
|
25
|
+
Explicit local-file updates retain the existing release-contract checks; plugins
|
|
26
|
+
without that contract use their reviewed local-source installation procedure.
|
|
27
|
+
Public packages still receive discovery checks under a manual policy.
|
|
18
28
|
|
|
19
29
|
## Installation and scope
|
|
20
30
|
|
|
21
31
|
Use normal setup and initialize the registry with this deployment's
|
|
22
32
|
`host-executor.json`. This binds `ez updates`, the active package root and the
|
|
23
|
-
|
|
33
|
+
native registry discovery guidance in AGENTS.md. Start `ezenciel-agents-host` using the
|
|
24
34
|
normal OS service template. The host service must use the existing user's Node,
|
|
25
35
|
pnpm (or Corepack) and Docker access. Never put tokens in its environment. Keep the original
|
|
26
36
|
package directory: its small bootstrap remains the service entry point and loads
|
|
@@ -185,11 +195,9 @@ written by the new one. Increment it for incompatible writes; this updater will
|
|
|
185
195
|
refuse that migration. `mainProtocol` identifies the supported updater/registry
|
|
186
196
|
contract, currently 1. Plugin package and manifest versions must match.
|
|
187
197
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
`max`. The execution choice, rather than the storage encoding, is the policy
|
|
192
|
-
surface.
|
|
198
|
+
Explicit model/effort fields remain stored as selected. Unset values are no longer
|
|
199
|
+
filled by router policy; legacy records with omitted effort use native defaults.
|
|
200
|
+
Upgrading does not invent an explicit setting for an omitted field.
|
|
193
201
|
|
|
194
202
|
Verify upgrade from the previous supported artifact, retained identity/state,
|
|
195
203
|
failed-health rollback, and rejection of incompatible candidates. Main runtime
|
|
@@ -206,14 +214,31 @@ updaters need an exact-version core update to adopt this discovery behavior.
|
|
|
206
214
|
|
|
207
215
|
## Shared agent guidance
|
|
208
216
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
217
|
+
Setup and runtime startup install `templates/agent-guidance.md` into a marked
|
|
218
|
+
section of the workspace's native `AGENTS.md` (and existing `AGENTS.override.md`).
|
|
219
|
+
Upgrade refreshes only that section; personal content outside it is preserved
|
|
220
|
+
byte-for-byte. New scheduled task workspaces receive the same shared guidance.
|
|
221
|
+
Malformed markers and symlinks fail visibly rather than overwriting personal work.
|
|
222
|
+
|
|
223
|
+
Codex, agy, Grok and OpenCode discover workspace instructions natively. Claude
|
|
224
|
+
receives the native `--append-system-prompt-file` binding to `AGENTS.md`, alongside
|
|
225
|
+
its own normal instructions. Fresh and resumed owner input is literal; ez does
|
|
226
|
+
not surround it with policies, tool recipes, repair instructions or history.
|
|
227
|
+
The native engine owns instruction loading and its context/token overhead.
|
|
228
|
+
Already running sessions retain their current context until native reload.
|
|
229
|
+
|
|
230
|
+
Desktop start/resume configuration binds the current run's sanitized environment;
|
|
231
|
+
message commands no longer require a prose environment prefix. Existing
|
|
232
|
+
credentials, permissions, queues, busy replies, scheduling and monitoring are
|
|
233
|
+
preserved. Restricted contact tasks retain their separate
|
|
234
|
+
bounded instruction scopes. For delivered busy replies absent from the native
|
|
235
|
+
conversation, the owner engine can call `ezenciel-agents-schedule context`.
|
|
236
|
+
|
|
237
|
+
Keep general defaults in the shipped shared file and identity/preferences in
|
|
238
|
+
workspace personal files. Instructions cannot grant permissions; explicit owner
|
|
239
|
+
requests take precedence within existing execution authority.
|
|
240
|
+
|
|
241
|
+
Update discovery runs independently of active host work. A discovery failure is
|
|
242
|
+
logged locally and retried at the next regular six-hour check; it does not stop
|
|
243
|
+
the host or create a repair task. Inspect `ez updates check` for target diagnostics.
|
|
244
|
+
Actual update transactions retain their existing admission, drain and rollback rules.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jc_stack/ez-agents",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.28",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A lightweight foundation for persistent business AI assistants using existing AI harnesses, workspaces and plugins.",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"ezenciel-agents-host": "bin/ezenciel-agents-host",
|
|
22
22
|
"ezenciel-agents-tools": "bin/ezenciel-agents-tools.mjs",
|
|
23
23
|
"ezenciel-agents-ai": "bin/ezenciel-agents-ai.mjs",
|
|
24
|
-
"ezenciel-agents-watch": "bin/ezenciel-agents-watch.mjs"
|
|
24
|
+
"ezenciel-agents-watch": "bin/ezenciel-agents-watch.mjs",
|
|
25
|
+
"ezenciel-agents-application": "bin/ezenciel-agents-application.mjs"
|
|
25
26
|
},
|
|
26
27
|
"files": [
|
|
27
28
|
"default-plugins.json",
|
|
@@ -51,8 +52,7 @@
|
|
|
51
52
|
"scripts/assert-local-registry.mjs",
|
|
52
53
|
".dockerignore",
|
|
53
54
|
"scripts/trusted-beta.mjs",
|
|
54
|
-
"scripts/generate-publish-caller.mjs"
|
|
55
|
-
"scripts/smoke-busy-reply.ts"
|
|
55
|
+
"scripts/generate-publish-caller.mjs"
|
|
56
56
|
],
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public",
|
|
@@ -112,5 +112,9 @@
|
|
|
112
112
|
"kind": "main",
|
|
113
113
|
"stateSchema": 1,
|
|
114
114
|
"mainProtocol": 1
|
|
115
|
+
},
|
|
116
|
+
"exports": {
|
|
117
|
+
"./application-client": "./src/application-client.mjs",
|
|
118
|
+
"./*": "./*"
|
|
115
119
|
}
|
|
116
120
|
}
|
package/src/agent-guidance.ts
CHANGED
|
@@ -1,9 +1,38 @@
|
|
|
1
|
+
import { lstat, readFile, rename, rm, writeFile } from 'node:fs/promises'
|
|
2
|
+
import { randomUUID } from 'node:crypto'
|
|
3
|
+
import path from 'node:path'
|
|
1
4
|
import { readFileSync } from 'node:fs'
|
|
2
5
|
|
|
3
6
|
// Resolve against the installed package, never the agent's editable workspace.
|
|
4
7
|
export const agentGuidance = (): string =>
|
|
5
8
|
readFileSync(new URL('../templates/agent-guidance.md', import.meta.url), 'utf8').trim()
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
const start = '<!-- ez shared guidance: begin -->'
|
|
11
|
+
const end = '<!-- ez shared guidance: end -->'
|
|
12
|
+
|
|
13
|
+
// Native instruction installation, refreshed at setup/runtime upgrade, not per turn.
|
|
14
|
+
// Personal instructions outside this one managed block remain byte-for-byte intact.
|
|
15
|
+
export async function installAgentGuidance(workspace: string): Promise<void> {
|
|
16
|
+
for (const name of ['AGENTS.md', 'AGENTS.override.md']) {
|
|
17
|
+
const file = path.join(workspace, name)
|
|
18
|
+
let original: string
|
|
19
|
+
try {
|
|
20
|
+
if (!(await lstat(file)).isFile()) throw new Error(`Native instructions must be a regular file: ${file}`)
|
|
21
|
+
original = await readFile(file, 'utf8')
|
|
22
|
+
} catch (error) {
|
|
23
|
+
if ((error as NodeJS.ErrnoException).code === 'ENOENT') continue
|
|
24
|
+
throw error
|
|
25
|
+
}
|
|
26
|
+
const block = `${start}\n${agentGuidance()}\n${end}\n\n`
|
|
27
|
+
const from = original.indexOf(start), to = original.indexOf(end)
|
|
28
|
+
if ((from < 0) !== (to < 0) || (from >= 0 && (to < from || original.indexOf(start, from + start.length) >= 0 || original.indexOf(end, to + end.length) >= 0)))
|
|
29
|
+
throw new Error(`Malformed shared guidance block: ${file}`)
|
|
30
|
+
const updated = from < 0 ? block + original : original.slice(0, from) + block.trimEnd() + original.slice(to + end.length)
|
|
31
|
+
if (updated === original) continue
|
|
32
|
+
const temporary = `${file}.${randomUUID()}.tmp`
|
|
33
|
+
try {
|
|
34
|
+
await writeFile(temporary, updated, { mode: 0o600, flag: 'wx' })
|
|
35
|
+
await rename(temporary, file)
|
|
36
|
+
} finally { await rm(temporary, { force: true }) }
|
|
37
|
+
}
|
|
38
|
+
}
|
package/src/ai-cli.ts
CHANGED
|
@@ -4,7 +4,11 @@ import { join } from 'node:path'
|
|
|
4
4
|
import { readModels, validateSelection, type AiPreset } from './ai.js'
|
|
5
5
|
import { ControlStore } from './control-state.js'
|
|
6
6
|
|
|
7
|
-
const {values,positionals}=parseArgs({allowPositionals:true,options:{cli:{type:'string'},model:{type:'string'},effort:{type:'string'}}})
|
|
7
|
+
const {values,positionals}=parseArgs({allowPositionals:true,options:{help:{type:'boolean'},cli:{type:'string'},model:{type:'string'},effort:{type:'string'}}})
|
|
8
|
+
if(values.help){
|
|
9
|
+
console.log('Usage: ezenciel-agents-ai list | select --cli <installed-cli> [--model <model>] [--effort <effort>]\nChoose only values returned by list. Selection affects subsequent messages; queued work and the installation default are unchanged.')
|
|
10
|
+
process.exit(0)
|
|
11
|
+
}
|
|
8
12
|
if (!process.env.EZ_CONTROL_DIR) throw new Error('Use this agent’s bound control directory')
|
|
9
13
|
const catalog=await readModels(undefined,undefined,join(process.env.EZ_CONTROL_DIR,'cli','codex'))
|
|
10
14
|
if(positionals[0]==='list')console.log(JSON.stringify(catalog))
|