@agentprojectcontext/apx 1.31.2 → 1.32.2
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/package.json +6 -1
- package/skills/apc-context/SKILL.md +5 -2
- package/skills/apx/SKILL.md +3 -3
- package/skills/apx-agency-agents/SKILL.md +5 -5
- package/skills/apx-agent/SKILL.md +7 -7
- package/skills/apx-mcp/SKILL.md +6 -4
- package/skills/apx-mcp-builder/SKILL.md +4 -7
- package/skills/apx-project/SKILL.md +4 -5
- package/skills/apx-routine/SKILL.md +14 -12
- package/skills/apx-runtime/SKILL.md +5 -3
- package/skills/apx-sessions/SKILL.md +5 -5
- package/skills/apx-skill-builder/SKILL.md +10 -6
- package/skills/apx-task/SKILL.md +8 -8
- package/skills/apx-telegram/SKILL.md +23 -7
- package/skills/apx-voice/SKILL.md +8 -6
- package/src/core/{agent-system.js → agent/build-agent-system.js} +10 -12
- package/src/core/agent/constants.js +5 -0
- package/src/core/agent/index.js +0 -2
- package/src/core/{agent-memory.js → agent/memory.js} +2 -2
- package/src/core/agent/model-router.js +21 -43
- package/src/core/agent/prompt-builder.js +17 -63
- package/src/core/agent/prompts/action-discipline.md +17 -0
- package/src/core/agent/prompts/channels/code.md +8 -12
- package/src/core/agent/prompts/channels/desktop.md +6 -4
- package/src/core/agent/prompts/channels/routine.md +10 -1
- package/src/core/agent/prompts/channels/telegram.md +5 -0
- package/src/core/agent/prompts/channels/web_code.md +20 -0
- package/src/core/agent/prompts/modes/voice.md +2 -2
- package/src/core/agent/prompts/super-agent-base.md +2 -2
- package/src/core/agent/run-agent.js +66 -36
- package/src/core/agent/runtime-bridge.js +42 -0
- package/src/core/agent/self-memory.js +19 -9
- package/src/core/agent/skills/catalog.js +65 -0
- package/src/core/agent/skills/index.js +6 -0
- package/src/{host/daemon/skills-loader.js → core/agent/skills/loader.js} +3 -3
- package/src/core/agent/skills/rag.js +91 -0
- package/src/core/agent/skills/trigger.js +71 -0
- package/src/{host/daemon → core/agent}/super-agent.js +5 -5
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/add-project.js +3 -4
- package/src/core/agent/tools/handlers/ask-questions.js +115 -0
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/call-agent.js +2 -2
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/call-mcp.js +1 -2
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/call-runtime.js +10 -11
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/create-task.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/discover-tools.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/edit-file.js +1 -2
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/import-agent.js +4 -5
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/list-agents.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/list-skills.js +7 -2
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/list-tasks.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/list-vault-agents.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/load-skill.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/read-agent-memory.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/read-self-memory.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/remember.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/run-shell.js +1 -2
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/search-messages.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/search-sessions.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/send-telegram.js +0 -2
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/set-identity.js +1 -3
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/set-permission-mode.js +1 -3
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/tail-messages.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/transcribe-audio.js +1 -1
- package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/write-file.js +1 -2
- package/src/core/agent/tools/helpers.js +74 -0
- package/src/{host/daemon/super-agent-tools → core/agent/tools}/registry-bridge.js +3 -3
- package/src/{host/daemon/super-agent-tools/index.js → core/agent/tools/registry.js} +31 -32
- package/src/core/apc/agents-vault.js +37 -0
- package/src/core/{scaffold.js → apc/scaffold.js} +4 -5
- package/src/core/{config.js → config/index.js} +21 -27
- package/src/core/config/paths.js +32 -0
- package/src/core/constants/actors.js +8 -0
- package/src/core/constants/channels.js +19 -0
- package/src/core/constants/index.js +5 -0
- package/src/core/constants/permissions.js +17 -0
- package/src/core/constants/roles.js +9 -0
- package/src/core/engines/_streaming.js +63 -0
- package/src/core/engines/anthropic.js +11 -22
- package/src/core/engines/ollama.js +7 -16
- package/src/core/identity/index.js +8 -0
- package/src/core/{identity.js → identity/self.js} +5 -5
- package/src/core/{telegram-identity.js → identity/telegram.js} +1 -1
- package/src/core/logging.js +1 -1
- package/src/core/mascot.js +1 -1
- package/src/core/memory/active-threads.js +10 -10
- package/src/core/memory/broker.js +9 -9
- package/src/core/memory/compactor.js +2 -2
- package/src/core/memory/index.js +2 -2
- package/src/core/memory/indexer.js +1 -1
- package/src/core/{code-sessions-store.js → stores/code-sessions.js} +3 -7
- package/src/core/{messages-store.js → stores/messages.js} +6 -4
- package/src/core/stores/routine-memory.js +71 -0
- package/src/core/{routines-store.js → stores/routines.js} +1 -3
- package/src/core/stores/runtime-sessions.js +99 -0
- package/src/core/{tasks-store.js → stores/tasks.js} +3 -8
- package/src/core/update-check.js +1 -1
- package/src/core/util/ids.js +14 -0
- package/src/core/util/index.js +2 -0
- package/src/core/util/text-similarity.js +52 -0
- package/src/core/util/time.js +9 -0
- package/src/core/voice/tts.js +1 -1
- package/src/host/daemon/api/admin-config.js +4 -3
- package/src/host/daemon/api/admin.js +1 -1
- package/src/host/daemon/api/agents.js +4 -25
- package/src/host/daemon/api/artifacts.js +118 -1
- package/src/host/daemon/api/code.js +60 -16
- package/src/host/daemon/api/confirm.js +1 -1
- package/src/host/daemon/api/connections.js +2 -2
- package/src/host/daemon/api/conversations.js +2 -2
- package/src/host/daemon/api/deck.js +1 -1
- package/src/host/daemon/api/desktop.js +1 -1
- package/src/host/daemon/api/embeddings.js +4 -4
- package/src/host/daemon/api/engines.js +2 -2
- package/src/host/daemon/api/exec.js +3 -3
- package/src/host/daemon/api/identity.js +1 -1
- package/src/host/daemon/api/mcps.js +1 -1
- package/src/host/daemon/api/messages.js +1 -1
- package/src/host/daemon/api/runtimes.js +9 -8
- package/src/host/daemon/api/sessions-search.js +1 -1
- package/src/host/daemon/api/sessions.js +2 -2
- package/src/host/daemon/api/shared.js +5 -4
- package/src/host/daemon/api/skills.js +30 -0
- package/src/host/daemon/api/super-agent.js +29 -9
- package/src/host/daemon/api/tasks.js +2 -2
- package/src/host/daemon/api/telegram.js +1 -1
- package/src/host/daemon/api/tools.js +6 -6
- package/src/host/daemon/api/tts.js +2 -2
- package/src/host/daemon/api/voice.js +14 -12
- package/src/host/daemon/api.js +2 -0
- package/src/host/daemon/compact.js +1 -1
- package/src/host/daemon/db.js +4 -4
- package/src/host/daemon/desktop-ws.js +1 -1
- package/src/host/daemon/index.js +4 -4
- package/src/host/daemon/plugins/{desktop.js → desktop/index.js} +45 -6
- package/src/host/daemon/plugins/index.js +2 -2
- package/src/host/daemon/plugins/telegram/ask.js +309 -0
- package/src/host/daemon/plugins/{telegram.js → telegram/index.js} +390 -191
- package/src/host/daemon/plugins/telegram/media.js +162 -0
- package/src/host/daemon/projects-helpers.js +54 -0
- package/src/host/daemon/routines.js +28 -12
- package/src/host/daemon/smoke.js +2 -2
- package/src/host/daemon/token-store.js +1 -1
- package/src/host/daemon/transcription.js +2 -2
- package/src/host/daemon/wakeup.js +2 -2
- package/src/interfaces/cli/commands/agent.js +3 -3
- package/src/interfaces/cli/commands/artifact.js +99 -0
- package/src/interfaces/cli/commands/command.js +1 -1
- package/src/interfaces/cli/commands/config.js +3 -2
- package/src/interfaces/cli/commands/desktop.js +1 -1
- package/src/interfaces/cli/commands/exec.js +2 -1
- package/src/interfaces/cli/commands/identity.js +2 -2
- package/src/interfaces/cli/commands/init.js +1 -1
- package/src/interfaces/cli/commands/mcp.js +1 -1
- package/src/interfaces/cli/commands/memory.js +2 -2
- package/src/interfaces/cli/commands/model.js +16 -6
- package/src/interfaces/cli/commands/project.js +1 -1
- package/src/interfaces/cli/commands/routine.js +58 -0
- package/src/interfaces/cli/commands/search.js +1 -1
- package/src/interfaces/cli/commands/session.js +4 -4
- package/src/interfaces/cli/commands/setup.js +4 -3
- package/src/interfaces/cli/commands/skills.js +25 -4
- package/src/interfaces/cli/commands/status.js +1 -1
- package/src/interfaces/cli/commands/sys.js +11 -4
- package/src/interfaces/cli/commands/update.js +1 -1
- package/src/interfaces/cli/index.js +8 -4
- package/src/interfaces/cli/postinstall.js +2 -2
- package/src/interfaces/cli/terminal-chat/renderer.js +22 -2
- package/src/interfaces/mcp-server/index.js +1 -1
- package/src/interfaces/tui/component/prompt/index.tsx +3 -1
- package/src/interfaces/tui/context/sdk-apx.tsx +47 -7
- package/src/interfaces/tui/context/sync-apx.tsx +20 -2
- package/src/interfaces/tui/context/sync.tsx +2 -1
- package/src/interfaces/tui/routes/session/index.tsx +151 -136
- package/src/interfaces/tui/routes/session/sidebar-apx.tsx +37 -15
- package/src/interfaces/tui/run.ts +2 -0
- package/src/interfaces/web/dist/assets/index-34U_Mp1M.css +1 -0
- package/src/interfaces/web/dist/assets/index-BkybwwRn.js +570 -0
- package/src/interfaces/web/dist/assets/index-BkybwwRn.js.map +1 -0
- package/src/interfaces/web/dist/index.html +2 -2
- package/src/interfaces/web/package-lock.json +9 -9
- package/src/interfaces/web/src/App.tsx +51 -32
- package/src/interfaces/web/src/components/RobyBubble.tsx +12 -6
- package/src/interfaces/web/src/components/UiSelect.tsx +1 -1
- package/src/interfaces/web/src/components/chat/AskQuestionsCard.tsx +72 -0
- package/src/interfaces/web/src/components/chat/InlineAskPanel.tsx +399 -0
- package/src/interfaces/web/src/components/chat/MessageBubble.tsx +16 -3
- package/src/interfaces/web/src/components/chat/MessageList.tsx +2 -1
- package/src/interfaces/web/src/components/chat/SkillPicker.tsx +77 -0
- package/src/interfaces/web/src/components/code/CodeArtifactsTab.tsx +230 -0
- package/src/interfaces/web/src/components/code/CodeProjectPicker.tsx +1 -1
- package/src/interfaces/web/src/components/code/CodeSidePanel.tsx +40 -17
- package/src/interfaces/web/src/components/common/TabLayout.tsx +9 -5
- package/src/interfaces/web/src/components/common/TabNav.tsx +3 -3
- package/src/interfaces/web/src/components/layout/ProjectSidebar.tsx +4 -2
- package/src/interfaces/web/src/hooks/useChat.ts +47 -2
- package/src/interfaces/web/src/hooks/useNavCollapseCtx.tsx +59 -0
- package/src/interfaces/web/src/hooks/usePersonaName.ts +11 -0
- package/src/interfaces/web/src/i18n/en.ts +27 -7
- package/src/interfaces/web/src/i18n/es.ts +27 -7
- package/src/interfaces/web/src/lib/api/artifacts.ts +47 -0
- package/src/interfaces/web/src/lib/api/skills.ts +25 -0
- package/src/interfaces/web/src/lib/api.ts +2 -0
- package/src/interfaces/web/src/screens/modules/CodeScreen.tsx +41 -20
- package/src/interfaces/web/src/screens/modules/DeckScreen.tsx +5 -18
- package/src/interfaces/web/src/screens/modules/DesktopScreen.tsx +1 -8
- package/src/interfaces/web/src/screens/modules/VoiceScreen.tsx +39 -40
- package/src/interfaces/web/src/screens/project/ChatTab.tsx +27 -9
- package/src/skills/apc-context/SKILL.md +159 -0
- package/src/core/agent/ghost-guard.js +0 -24
- package/src/core/agent/prompts/channels/terminal.md +0 -16
- package/src/host/daemon/apc-runtime-context.js +0 -124
- package/src/host/daemon/super-agent-tools/helpers.js +0 -124
- package/src/host/daemon/super-agent-tools/tools/ask-questions.js +0 -32
- package/src/host/daemon/tool-call-parser.js +0 -2
- package/src/interfaces/web/dist/assets/index-BDUsA6L6.css +0 -1
- package/src/interfaces/web/dist/assets/index-BV615I9p.js +0 -548
- package/src/interfaces/web/dist/assets/index-BV615I9p.js.map +0 -1
- /package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/list-files.js +0 -0
- /package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/list-mcps.js +0 -0
- /package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/list-projects.js +0 -0
- /package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/read-file.js +0 -0
- /package/src/{host/daemon/super-agent-tools/tools → core/agent/tools/handlers}/search-files.js +0 -0
- /package/src/core/agent/{pseudo-tools.js → tools/pseudo-tools.js} +0 -0
- /package/src/core/agent/{tool-call-parser.js → tools/tool-call-parser.js} +0 -0
- /package/src/core/{parser.js → apc/parser.js} +0 -0
- /package/src/core/{apc-skill-sync.js → apc/skill-sync.js} +0 -0
- /package/src/core/{artifacts-store.js → stores/artifacts.js} +0 -0
- /package/src/{host/daemon → core/stores}/engine-sessions.js +0 -0
- /package/src/core/{session-store.js → stores/sessions.js} +0 -0
package/package.json
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentprojectcontext/apx",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.2",
|
|
4
4
|
"description": "APX — unified CLI + daemon for the Agent Project Context (APC) standard.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"type": "module",
|
|
10
|
+
"imports": {
|
|
11
|
+
"#core/*": "./src/core/*",
|
|
12
|
+
"#host/*": "./src/host/*",
|
|
13
|
+
"#interfaces/*": "./src/interfaces/*"
|
|
14
|
+
},
|
|
10
15
|
"bin": {
|
|
11
16
|
"apx": "./src/interfaces/cli/index.js",
|
|
12
17
|
"apx-daemon": "./src/host/daemon/index.js",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apc-context
|
|
3
|
-
description: "
|
|
3
|
+
description: "Activate whenever the project has a .apc/ directory or AGENTS.md — read .apc/ before assuming anything about agents, memory, or structure. If .apc/migrate.md exists, open with a migration offer first; if the user declines, delete it. Triggers: .apc/, AGENTS.md, 'which agents', 'list agents', 'agent context', 'who are the agents'."
|
|
4
4
|
homepage: https://github.com/agentprojectcontext/agentprojectcontext
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -66,11 +66,13 @@ After migration:
|
|
|
66
66
|
```text
|
|
67
67
|
AGENTS.md ← root project contract
|
|
68
68
|
.apc/
|
|
69
|
-
project.json ← project metadata
|
|
69
|
+
project.json ← project metadata (may carry an `apx` field)
|
|
70
|
+
config.json ← project-only config overrides (e.g. super_agent.model)
|
|
70
71
|
.gitignore ← safety guard
|
|
71
72
|
agents/<name>.md ← agent definition
|
|
72
73
|
agents/<name>/memory.md ← optional curated project memory
|
|
73
74
|
skills/<name>.md ← reusable project instructions
|
|
75
|
+
commands/ ← custom slash-commands (optional)
|
|
74
76
|
mcps.json ← MCP hints without secrets
|
|
75
77
|
```
|
|
76
78
|
|
|
@@ -81,6 +83,7 @@ Do not store:
|
|
|
81
83
|
.apc/sessions/
|
|
82
84
|
.apc/conversations/
|
|
83
85
|
.apc/messages/
|
|
86
|
+
.apc/project.db
|
|
84
87
|
.apc/cache/
|
|
85
88
|
.apc/tmp/
|
|
86
89
|
.apc/private/
|
package/skills/apx/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apx
|
|
3
|
-
description: "APX CLI umbrella
|
|
3
|
+
description: "APX CLI umbrella — which sub-skill handles each operation (sessions, MCPs, routines, tasks, telegram, projects, agents, runtimes). Activate when the user mentions `apx`, the APX daemon, or wants to coordinate/run/delegate agents. Not for `.apc/` alone (use apc-context). Triggers: 'apx', 'apx run', 'apx daemon', 'coordinate agents', 'apx help'."
|
|
4
4
|
homepage: https://github.com/agentprojectcontext/apx
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -28,11 +28,11 @@ Use APX when:
|
|
|
28
28
|
| Topic | Sub-skill | When |
|
|
29
29
|
|-------|-----------|------|
|
|
30
30
|
| Delegate to an external coding CLI | **apx-runtime** | `apx run <agent> --runtime claude-code\|codex\|...` |
|
|
31
|
-
| List / read / resume / summarise / continue sessions across engines | **apx-sessions** | `apx session resume`, `apx sessions list`, "
|
|
31
|
+
| List / read / resume / summarise / continue sessions across engines | **apx-sessions** | `apx session resume`, `apx sessions list`, "import a codex session" |
|
|
32
32
|
| Use a registered MCP tool | **apx-mcp** | `apx mcp run`, "call MCP filesystem", "the MCP is failing" |
|
|
33
33
|
| Add / configure / use a project agent | **apx-agent** | "add an agent", "import from vault", per-agent model, agent memory |
|
|
34
34
|
| Register / list / configure a project | **apx-project** | "register this project", `apx project list`, per-project config |
|
|
35
|
-
| Per-project TODO list | **apx-task** | "
|
|
35
|
+
| Per-project TODO list | **apx-task** | "add a task", "remind me to…", "what's pending" |
|
|
36
36
|
| Scheduled / recurring agents | **apx-routine** | `apx routine add`, every-5m, cron-like jobs |
|
|
37
37
|
| Telegram I/O | **apx-telegram** | configure bot, channels, send a message |
|
|
38
38
|
| Voice channel (TTS, speech) — *optional* | **apx-voice** | only if voice is being set up |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apx-agency-agents
|
|
3
|
-
description: "Manage the APX agent vault —
|
|
3
|
+
description: "Manage the APX agent vault — reusable agent templates (Roby, Cody, Rocky, Tessa, Max, Arch, Sid, Vera, Finn + generic dev/marketing/ops/qa/support). Load to spawn a specialist, list templates, import one into a project, create a template, or hide/restore a bundled default. Triggers: 'spawn agent', 'use Cody/Rocky/Tessa', 'list agents', 'agent vault', 'import agent', 'new agent'."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# apx-agency-agents — the APX agent vault
|
|
@@ -45,7 +45,7 @@ Plain functional roles — useful when you want capabilities without a persona:
|
|
|
45
45
|
| `qa` | Quality assurance & testing |
|
|
46
46
|
| `support` | Customer support & escalations |
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Bundled templates ship with `language: es` and **no `model:` set** — they inherit the project/global default model. Set a model on import or by editing the vault file directly.
|
|
49
49
|
|
|
50
50
|
## Concrete commands
|
|
51
51
|
|
|
@@ -84,14 +84,14 @@ import_agent({ slug: "cody-developer", project: "<name-or-path>" })
|
|
|
84
84
|
|
|
85
85
|
## The web equivalents
|
|
86
86
|
|
|
87
|
-
The Agent defaults tab (`/p/0/agent-defaults`) has the same CRUD: a "
|
|
87
|
+
The Agent defaults tab (`/p/0/agent-defaults`) has the same CRUD: a "New" button (POST `/agents/vault`), "Edit" per card (PATCH `/agents/vault/:slug`, copy-on-write for bundled), "Delete"/"Hide" (DELETE), and a "Show removed" toggle that surfaces tombstoned bundled defaults with a "Restore" button.
|
|
88
88
|
|
|
89
89
|
## When to use which agent
|
|
90
90
|
|
|
91
|
-
- **User says "
|
|
91
|
+
- **User says "spawn/use Cody/Rocky/Tessa/Max/Arch/Sid/Vera/Roby/Finn"** → that exact slug exists in the named team. Import it.
|
|
92
92
|
- **User wants a "developer" / "QA" / "marketing" agent without a persona** → use the generic specialists (`development`, `qa`, `marketing`, …).
|
|
93
93
|
- **User wants something not in the vault** → either `apx agent vault add <slug>` to create a blank one, or `apx agent add <slug>` directly inside a project for a one-off.
|
|
94
|
-
- **
|
|
94
|
+
- **Fresh install** → bundled defaults are always present (no sync step); they appear in `apx agent vault list` immediately.
|
|
95
95
|
|
|
96
96
|
## Where the files live
|
|
97
97
|
|
|
@@ -10,8 +10,8 @@ A project agent is a named persona inside an APC project. Canonical definition:
|
|
|
10
10
|
## Concrete CLI calls
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
# List agents in
|
|
14
|
-
apx agent list
|
|
13
|
+
# List agents in the current project (agent commands are cwd-scoped — run from the project root)
|
|
14
|
+
apx agent list
|
|
15
15
|
|
|
16
16
|
# Create a new agent (writes .apc/agents/<slug>.md, creates runtime dir, regenerates AGENTS.md)
|
|
17
17
|
apx agent add reviewer \
|
|
@@ -31,10 +31,10 @@ apx agent import <slug> --force # overwrite existing local definition
|
|
|
31
31
|
# Show details (config + memory)
|
|
32
32
|
apx agent get <slug> # alias: apx agent show <slug>
|
|
33
33
|
|
|
34
|
-
# Per-agent memory (drives system prompt for that agent)
|
|
35
|
-
apx memory <slug>
|
|
36
|
-
apx memory <slug> --
|
|
37
|
-
apx memory <slug> --
|
|
34
|
+
# Per-agent memory (drives system prompt for that agent; cwd-scoped — run from the project root)
|
|
35
|
+
apx memory <slug> # read
|
|
36
|
+
apx memory <slug> --append "fact" # append a line under "## Recent context"
|
|
37
|
+
apx memory <slug> --replace < file.md # full replace from stdin
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## What the agent's system prompt looks like
|
|
@@ -54,7 +54,7 @@ That's the prompt the engine sees on every `apx exec <agent>` or `apx chat <agen
|
|
|
54
54
|
|
|
55
55
|
## Models per agent
|
|
56
56
|
|
|
57
|
-
Each agent can set `Model:` in its
|
|
57
|
+
Each agent can set `Model:` in its `.apc/agents/<slug>.md` definition to override the global super-agent model. Leave it empty when the agent should follow the project/global default.
|
|
58
58
|
|
|
59
59
|
```markdown
|
|
60
60
|
# .apc/agents/reviewer.md
|
package/skills/apx-mcp/SKILL.md
CHANGED
|
@@ -41,16 +41,16 @@ apx mcp add brave --scope global \
|
|
|
41
41
|
--command npx --env BRAVE_API_KEY=BSAxxx \
|
|
42
42
|
-- -y @modelcontextprotocol/server-brave-search
|
|
43
43
|
|
|
44
|
-
# Remove (--scope
|
|
44
|
+
# Remove (pass --scope when the MCP isn't in the default scope:
|
|
45
|
+
# shared inside an APC project, else global)
|
|
45
46
|
apx mcp remove filesystem --project iacrmar
|
|
46
47
|
apx mcp remove github --scope runtime --project iacrmar
|
|
47
48
|
|
|
48
|
-
# Toggle (
|
|
49
|
+
# Toggle (defaults to the scope that owns the MCP)
|
|
49
50
|
apx mcp enable filesystem --project iacrmar
|
|
50
51
|
apx mcp disable filesystem --project iacrmar
|
|
51
52
|
|
|
52
53
|
# Call a tool through the daemon (useful for debugging)
|
|
53
|
-
apx mcp tools <name> # list tools the server exposes
|
|
54
54
|
apx mcp run filesystem read_file '{"path":"README.md"}'
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -100,12 +100,14 @@ apx mcp remove github # if github lives in runtime, this errors with a
|
|
|
100
100
|
|
|
101
101
|
```bash
|
|
102
102
|
apx mcp check --project iacrmar # what scopes APX sees + which files exist
|
|
103
|
-
apx mcp
|
|
103
|
+
apx mcp run <name> <tool> '{...}' # spawn the server and call a tool for real
|
|
104
104
|
apx log -f # tail unified log for spawn errors
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
A server that "doesn't show tools" usually means: the command failed to start (env vars missing, package not found), or the server crashed during initialize. The unified log has the stderr buffer.
|
|
108
108
|
|
|
109
|
+
> `apx mcp tools <name>` is a placeholder stub (prints a "coming in v0.2" notice, lists nothing). To verify a server actually spawns, call a tool with `apx mcp run`.
|
|
110
|
+
|
|
109
111
|
## Don't
|
|
110
112
|
|
|
111
113
|
- Don't mix scopes for the same MCP name unless you actually want shadowing. The result is "the one with highest priority wins, others stay invisible."
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apx-mcp-builder
|
|
3
3
|
scope: internal
|
|
4
|
-
description: How to build a Model Context Protocol (MCP) server from scratch and
|
|
4
|
+
description: How to build a Model Context Protocol (MCP) server from scratch and register it in APX. Load when authoring a new MCP / exposing a new tool surface to agents. Covers the JSON-RPC stdio protocol, FastMCP (Python) / TypeScript SDK shapes, and APX registration.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# apx-mcp-builder
|
|
@@ -165,16 +165,13 @@ apx mcp add github \
|
|
|
165
165
|
## Common debugging path
|
|
166
166
|
|
|
167
167
|
```bash
|
|
168
|
-
# 1. Does the server start?
|
|
169
|
-
apx mcp
|
|
168
|
+
# 1. Does the server start + does a tool work? (apx mcp tools is a v0.2 stub — don't rely on it)
|
|
169
|
+
apx mcp run my-server search_inventory '{"query":"shoes"}'
|
|
170
170
|
|
|
171
171
|
# 2. Are there spawn errors?
|
|
172
172
|
apx log -f # tail the daemon log — stderr lands here
|
|
173
173
|
|
|
174
|
-
# 3.
|
|
175
|
-
apx mcp run my-server search_inventory '{"query":"shoes"}'
|
|
176
|
-
|
|
177
|
-
# 4. Are env vars set?
|
|
174
|
+
# 3. What scopes/files + env does APX see?
|
|
178
175
|
apx mcp check --project iacrmar
|
|
179
176
|
```
|
|
180
177
|
|
|
@@ -20,12 +20,11 @@ apx project add /path/to/repo # registers; reads AGENTS.md + .apc/proje
|
|
|
20
20
|
apx project add . # current dir
|
|
21
21
|
|
|
22
22
|
# Inspect
|
|
23
|
-
apx project list #
|
|
24
|
-
apx project list -l # long form, includes storagePath
|
|
23
|
+
apx project list # id, name, agents count, path
|
|
25
24
|
|
|
26
|
-
# Remove / rebuild
|
|
27
|
-
apx project remove <id|
|
|
28
|
-
apx project rebuild <id|
|
|
25
|
+
# Remove / rebuild (id or exact path only — these do NOT resolve by name)
|
|
26
|
+
apx project remove <id|path>
|
|
27
|
+
apx project rebuild <id|path> # force re-scan of .apc/ on disk
|
|
29
28
|
|
|
30
29
|
# Per-project config — dotted keys, lives in <repo>/.apc/config.json
|
|
31
30
|
apx project config show <project> # effective + project_only
|
|
@@ -36,7 +36,7 @@ A routine is a scheduled APX task. APX runs the scheduler tick every 5s and fire
|
|
|
36
36
|
"name": "weather-bariloche",
|
|
37
37
|
"kind": "exec_agent",
|
|
38
38
|
"schedule": "every:24h",
|
|
39
|
-
"spec": { "agent": "default", "prompt": "
|
|
39
|
+
"spec": { "agent": "default", "prompt": "Write a short greeting..." },
|
|
40
40
|
"pre_commands": ["curl -s 'https://wttr.in/Bariloche?format=...'"],
|
|
41
41
|
"post_commands": ["apx telegram send \"$APX_LLM_OUTPUT\""],
|
|
42
42
|
"enabled": true,
|
|
@@ -54,7 +54,7 @@ A routine is a scheduled APX task. APX runs the scheduler tick every 5s and fire
|
|
|
54
54
|
```json
|
|
55
55
|
{
|
|
56
56
|
"kind": "super_agent", ← DON'T
|
|
57
|
-
"spec": { "prompt": "
|
|
57
|
+
"spec": { "prompt": "The weather is {{pre_output}}. Send it via Telegram." },
|
|
58
58
|
"post_commands": ["apx telegram send \"$APX_LLM_OUTPUT\""]
|
|
59
59
|
}
|
|
60
60
|
```
|
|
@@ -64,7 +64,7 @@ This sends **two** Telegram messages: one from the super-agent's `send_telegram`
|
|
|
64
64
|
```json
|
|
65
65
|
{
|
|
66
66
|
"kind": "exec_agent",
|
|
67
|
-
"spec": { "agent": "default", "prompt": "
|
|
67
|
+
"spec": { "agent": "default", "prompt": "The weather is {{pre_output}}. One friendly sentence, no greeting." },
|
|
68
68
|
"post_commands": ["apx telegram send \"$APX_LLM_OUTPUT\""]
|
|
69
69
|
}
|
|
70
70
|
```
|
|
@@ -85,7 +85,7 @@ apx routine add weather-bariloche \
|
|
|
85
85
|
--project iacrmar \
|
|
86
86
|
--kind exec_agent \
|
|
87
87
|
--schedule "every:24h" \
|
|
88
|
-
--spec '{"agent":"default","prompt":"
|
|
88
|
+
--spec '{"agent":"default","prompt":"The weather is {{pre_output}}. One friendly sentence."}' \
|
|
89
89
|
--pre-commands "curl -s 'https://wttr.in/Bariloche?format=%t+%C+viento+%w'" \
|
|
90
90
|
--post-commands 'apx telegram send "$APX_LLM_OUTPUT"'
|
|
91
91
|
|
|
@@ -94,7 +94,7 @@ apx routine add daily-status \
|
|
|
94
94
|
--project iacrmar \
|
|
95
95
|
--kind super_agent \
|
|
96
96
|
--schedule "0 9 * * *" \
|
|
97
|
-
--spec '{"prompt":"
|
|
97
|
+
--spec '{"prompt":"List projects with pending tasks and send me a short summary via Telegram."}' \
|
|
98
98
|
--permission-mode automatico
|
|
99
99
|
|
|
100
100
|
# Toggle, run, remove
|
|
@@ -110,15 +110,17 @@ Routines live in `~/.apx/projects/<apxId>/routines.json`. Without `--project`, t
|
|
|
110
110
|
|
|
111
111
|
## `skip_prompt_on`
|
|
112
112
|
|
|
113
|
-
Controls
|
|
113
|
+
Controls whether the LLM call is skipped based on the `pre_commands` result (`shouldSkipPrompt` in `host/daemon/routines.js`):
|
|
114
114
|
|
|
115
|
-
| Value |
|
|
115
|
+
| Value | Skips the LLM when… |
|
|
116
116
|
|---|---|
|
|
117
|
-
| `signal` (default) |
|
|
118
|
-
| `pre_failure` |
|
|
119
|
-
| `pre_success` |
|
|
120
|
-
| `always` |
|
|
121
|
-
| `never` |
|
|
117
|
+
| `signal` (default) | a pre_command prints the literal marker `APX_SKIP` to stdout. A non-zero exit alone does **not** skip. |
|
|
118
|
+
| `pre_failure` | any pre_command exits non-zero. |
|
|
119
|
+
| `pre_success` | the pre_commands exit 0 (i.e. run the LLM only on pre failure). |
|
|
120
|
+
| `always` | unconditionally — pure pre→post pipeline, no LLM. |
|
|
121
|
+
| `never` | never — the LLM always runs, even if pre crashes. |
|
|
122
|
+
|
|
123
|
+
Post-commands run regardless of the skip decision. The skip only gates the `kind` handler (the LLM call).
|
|
122
124
|
|
|
123
125
|
## Debugging a routine
|
|
124
126
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apx-runtime
|
|
3
|
-
description:
|
|
3
|
+
description: Delegate a task to an external coding CLI (claude-code, codex, opencode, aider, cursor-agent, gemini-cli, qwen-code) via `apx run`. APX builds the system prompt, spawns the CLI, and captures the result. Load when delegating work to another AI tool.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# apx-runtime
|
|
@@ -25,13 +25,15 @@ A "runtime" in APX is an external AI coding CLI that APX can invoke headlessly.
|
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
27
|
# What's available on this machine
|
|
28
|
-
apx env detect
|
|
29
|
-
apx
|
|
28
|
+
apx env detect # which runtimes are installed and reachable
|
|
29
|
+
apx env list # alias of `apx env detect`
|
|
30
30
|
|
|
31
31
|
# Run an agent through an external CLI
|
|
32
32
|
apx run reviewer --runtime claude-code "Review the diff in src/host/daemon/api/ for memory leaks"
|
|
33
33
|
apx run scratch --runtime codex "Refactor parseAgentsMd to use a state machine"
|
|
34
34
|
apx run scratch --runtime opencode "<prompt>"
|
|
35
|
+
apx run scratch --runtime codex --timeout 300 "<prompt>" # cap the run (seconds)
|
|
36
|
+
apx run scratch --runtime codex - # read the prompt from stdin (large prompts)
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
Behavior:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apx-sessions
|
|
3
|
-
description: "APX
|
|
3
|
+
description: "Manage APX sessions across engines (apx, claude, codex). Find a session by title, list, resume, summarize, ask about, or pull a transcript — without knowing which engine owns it. Triggers: 'apx session find/ask/summary/resume/get', 'find a session', 'resume claude/codex session', 'summarize session', 'get session transcript', 'continue session in apx'. Not for `apx run` orchestration (that's the apx skill)."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# APX Sessions — cross-engine resume, summary, and continuation
|
|
@@ -26,13 +26,13 @@ You almost never start with a session id — you start with a vague memory of a
|
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
# 1. Turn a remembered title into an id (cross-engine, newest first)
|
|
29
|
-
apx session find "
|
|
29
|
+
apx session find "improve web UI"
|
|
30
30
|
|
|
31
31
|
# 2. Get the gist of that session
|
|
32
32
|
apx session summary <id>
|
|
33
33
|
|
|
34
34
|
# 3. Ask something specific about it
|
|
35
|
-
apx session ask <id> "
|
|
35
|
+
apx session ask <id> "what sidebar changes were left pending?"
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
`find` prints a "Next:" block with the exact `summary`/`ask`/`resume` commands pre-filled with the top hit's id, so you can copy-paste straight through. **If you're tempted to grep session lists, use `find` instead.**
|
|
@@ -72,7 +72,7 @@ This is the discoverable alias for `apx session resume <id> --summary`. It resol
|
|
|
72
72
|
## Asking questions about a session (`apx session ask`)
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
|
-
apx session ask <id> "
|
|
75
|
+
apx session ask <id> "what did we decide about the sidebar?"
|
|
76
76
|
apx session ask <id> "what files were changed?" --max-chunks 30
|
|
77
77
|
```
|
|
78
78
|
|
|
@@ -248,7 +248,7 @@ Pick one with `--engine claude` or `--engine codex` and run again.
|
|
|
248
248
|
3. **`summary` for the gist, `ask` for specifics.** Use `apx session summary <id>` to orient; use `apx session ask <id> "<q>"` when the user has a concrete question. Both need the daemon + `super_agent.enabled`.
|
|
249
249
|
4. **`ask` on a huge transcript is slow and capped.** If the output warns about truncation and the user needs full coverage, re-run with a higher `--max-chunks`.
|
|
250
250
|
5. **Prefer `--tail N` over `--full`** when feeding a raw transcript into another model — JSONL is verbose, the tail is dense.
|
|
251
|
-
6. **`--into apx:slug` is the bridge** between an external runtime's session and an APX agent. Use it when the user says "
|
|
251
|
+
6. **`--into apx:slug` is the bridge** between an external runtime's session and an APX agent. Use it when the user says "let's continue this in apx with the reviewer agent".
|
|
252
252
|
7. **Don't invent ids.** Discover them via `apx session find` or `apx sessions list`.
|
|
253
253
|
8. **`apx session get --any --full`** is the simplest way to import an arbitrary engine session into your context, with no daemon dependency.
|
|
254
254
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apx-skill-builder
|
|
3
3
|
scope: internal
|
|
4
|
-
description: How to author a new APX skill
|
|
4
|
+
description: How to author a new APX skill — file location, frontmatter (name, description, scope), body style, and how the super-agent loads it on demand. Load when creating or adding a skill to APX.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# apx-skill-builder
|
|
@@ -32,12 +32,15 @@ The file MUST open with YAML frontmatter:
|
|
|
32
32
|
```yaml
|
|
33
33
|
---
|
|
34
34
|
name: my-skill
|
|
35
|
-
description: One-sentence trigger for the super-agent. Include the user-phrases that should cause it to load. Keep
|
|
35
|
+
description: One-sentence trigger for the super-agent. Include the user-phrases that should cause it to load. Keep it short — appears in skill listings.
|
|
36
|
+
scope: public # public (pushed to IDE skill dirs by default) | internal (repo/dev-only) | optional
|
|
36
37
|
---
|
|
37
38
|
```
|
|
38
39
|
|
|
39
40
|
`description` is what the model sees when deciding whether to call `load_skill`. Write it as the *trigger condition*, not a summary of the body.
|
|
40
41
|
|
|
42
|
+
`scope` controls distribution: `public` skills are installed globally by `apx skills sync` / `--global`; `internal` ones stay in the APX repo (dev guides like this one); `optional` ones are available but not pushed by default. Omit it and the skill is treated as public.
|
|
43
|
+
|
|
41
44
|
**Good**: `"How to register an MCP server. Load BEFORE running 'apx mcp add' — three scopes, gotchas with stdio commands, secrets handling."`
|
|
42
45
|
|
|
43
46
|
**Bad**: `"This skill describes APX's MCP system."` (no trigger; the model won't know when it matters).
|
|
@@ -65,8 +68,9 @@ That returns the full body. The agent uses the content in-context for that turn;
|
|
|
65
68
|
|
|
66
69
|
The user can list installed skills with:
|
|
67
70
|
```bash
|
|
68
|
-
apx skills list
|
|
69
|
-
apx skills
|
|
71
|
+
apx skills list # lists this project's .apc/skills/ (cwd-scoped — run from the project root)
|
|
72
|
+
apx skills sync # push bundled/public skills to the global skill dir
|
|
73
|
+
apx skills status # show what's installed vs available
|
|
70
74
|
```
|
|
71
75
|
|
|
72
76
|
## Workflow: create + register
|
|
@@ -85,8 +89,8 @@ $EDITOR skills/my-thing/SKILL.md
|
|
|
85
89
|
# you've changed the scaffold sync. Confirm:
|
|
86
90
|
apx skills list | grep my-thing
|
|
87
91
|
|
|
88
|
-
# 4.
|
|
89
|
-
apx exec
|
|
92
|
+
# 4. Pre-test with the super-agent (it's the default target — no agent name needed):
|
|
93
|
+
apx exec "Load the my-thing skill and summarize it in 3 bullets"
|
|
90
94
|
```
|
|
91
95
|
|
|
92
96
|
## Anti-examples
|
package/skills/apx-task/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apx-task
|
|
3
|
-
description: Per-project TODO list. Load when the user
|
|
3
|
+
description: Per-project TODO list. Load when the user wants to note, remind, list, or complete a task. Tasks are project-scoped, event-sourced, and addressable by short id prefix. Triggers: 'add a task', 'remind me to…', 'what's pending', 'mark as done'.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# apx-task
|
|
@@ -11,9 +11,9 @@ A `task` is a per-project TODO. Append-only JSONL event log per month under `~/.
|
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
13
|
# Add — most common
|
|
14
|
-
apx task add "
|
|
15
|
-
apx task add "
|
|
16
|
-
apx task add "Demo
|
|
14
|
+
apx task add "Review the auth bug" --project iacrmar
|
|
15
|
+
apx task add "Call the client" --project iacrmar --due 2026-05-30 --tag urgent
|
|
16
|
+
apx task add "Demo for tester X" --project iacrmar --agent reviewer --tag demo --tag external --source cli
|
|
17
17
|
|
|
18
18
|
# List (defaults to open)
|
|
19
19
|
apx task list --project iacrmar
|
|
@@ -29,7 +29,7 @@ apx task show abc --project iacrmar # prefix match (≥3 chars), unique
|
|
|
29
29
|
apx task done t_abc123 --project iacrmar --by manuel
|
|
30
30
|
apx task drop t_abc123 --project iacrmar # archived (not "done")
|
|
31
31
|
apx task reopen t_abc123 --project iacrmar
|
|
32
|
-
apx task patch t_abc123 --project iacrmar --title "
|
|
32
|
+
apx task patch t_abc123 --project iacrmar --title "New title" --due 2026-06-10
|
|
33
33
|
apx task patch t_abc123 --project iacrmar --tag bug --tag blocker # replaces tags
|
|
34
34
|
```
|
|
35
35
|
|
|
@@ -51,14 +51,14 @@ apx task patch t_abc123 --project iacrmar --tag bug --tag blocker # replaces
|
|
|
51
51
|
|
|
52
52
|
## Super-agent tools
|
|
53
53
|
|
|
54
|
-
The super-agent has `create_task` and `list_tasks` tools. So a user message like "
|
|
54
|
+
The super-agent has `create_task` and `list_tasks` tools. So a user message like "note that we need to close the auth bug in iacrmar tomorrow" makes the model call:
|
|
55
55
|
|
|
56
56
|
```json
|
|
57
57
|
{ "name": "create_task",
|
|
58
|
-
"arguments": { "project": "iacrmar", "title": "
|
|
58
|
+
"arguments": { "project": "iacrmar", "title": "Close the auth bug", "due": "<tomorrow>", "tags": ["bug"] } }
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
When the user asks "
|
|
61
|
+
When the user asks "what's pending in iacrmar?", the model calls `list_tasks({ project: "iacrmar" })`.
|
|
62
62
|
|
|
63
63
|
If the user doesn't say which project, the model should `list_projects` first and ask which one — never assume. If the conversation has a project context (Telegram channel pinned to project), the model uses that.
|
|
64
64
|
|
|
@@ -23,9 +23,12 @@ APX runs a Telegram plugin that polls `getUpdates` and routes messages. Config l
|
|
|
23
23
|
"chat_id": "<your numeric chat id>",
|
|
24
24
|
"project": "iacrmar", // optional: pin this channel to that project
|
|
25
25
|
"route_to_agent": "reviewer", // optional: this agent handles messages on this channel
|
|
26
|
-
"respond_with_engine": true
|
|
26
|
+
"respond_with_engine": true, // optional: override the global default
|
|
27
|
+
"owner_user_id": "123456789" // optional: per-channel owner (set via `apx telegram owner`)
|
|
27
28
|
}
|
|
28
|
-
]
|
|
29
|
+
],
|
|
30
|
+
"contacts": [], // global roster (user_id → role); see `apx telegram contacts`
|
|
31
|
+
"roles": {} // role → allowed tools; see `apx telegram roles`
|
|
29
32
|
}
|
|
30
33
|
}
|
|
31
34
|
```
|
|
@@ -35,16 +38,28 @@ The old `telegram.bot_token` / `telegram.chat_id` at the root are **legacy**. Do
|
|
|
35
38
|
## Concrete CLI calls
|
|
36
39
|
|
|
37
40
|
```bash
|
|
41
|
+
# Print the config template to get started
|
|
42
|
+
apx telegram setup # note: still emits root bot_token/chat_id — prefer channels[] below
|
|
43
|
+
|
|
38
44
|
# Channels CRUD
|
|
39
45
|
apx telegram channel add # interactive wizard
|
|
40
46
|
apx telegram channel add clientes --bot-token <T> --chat-id <C> --project iacrmar --agent reviewer
|
|
41
|
-
apx telegram channel list
|
|
42
|
-
apx telegram channel show clientes
|
|
47
|
+
apx telegram channel list # alias: ls
|
|
48
|
+
apx telegram channel show clientes # alias: get
|
|
43
49
|
apx telegram channel set clientes --project iacrmar
|
|
44
50
|
apx telegram channel set clientes --agent reviewer
|
|
45
51
|
apx telegram channel set clientes --respond-engine false
|
|
46
52
|
apx telegram channel unset clientes --project --agent
|
|
47
|
-
apx telegram channel remove clientes
|
|
53
|
+
apx telegram channel remove clientes # alias: rm
|
|
54
|
+
apx telegram owner clientes <user_id> # set the per-channel owner
|
|
55
|
+
|
|
56
|
+
# Contacts roster + roles (global; gate which tools a sender may trigger)
|
|
57
|
+
apx telegram contacts # list the global roster
|
|
58
|
+
apx telegram contacts rm <user_id>
|
|
59
|
+
apx telegram role <user_id> <role> # assign a role to a contact
|
|
60
|
+
apx telegram roles # list role → tools mappings
|
|
61
|
+
apx telegram roles set <name> --tools a,b,c # or --tools '*' for all
|
|
62
|
+
apx telegram roles rm <name>
|
|
48
63
|
|
|
49
64
|
# Polling lifecycle (rarely needed — autostart with daemon)
|
|
50
65
|
apx telegram start
|
|
@@ -52,8 +67,9 @@ apx telegram stop
|
|
|
52
67
|
apx telegram status
|
|
53
68
|
|
|
54
69
|
# Sending (defaults to first configured channel; use --chat for explicit chat id)
|
|
55
|
-
apx telegram send "
|
|
56
|
-
apx telegram send "
|
|
70
|
+
apx telegram send "text"
|
|
71
|
+
apx telegram send "text" --chat 123456789
|
|
72
|
+
apx telegram send "text" --interrupt # bypass the pending-agent queue (also: --force)
|
|
57
73
|
|
|
58
74
|
# Media (daemon HTTP API — no dedicated CLI subcommand yet)
|
|
59
75
|
curl -X POST http://127.0.0.1:7430/telegram/send_photo \
|
|
@@ -27,13 +27,15 @@ APX has a Text-to-Speech (TTS) facade in `core/voice/` with five engines. STT (s
|
|
|
27
27
|
apx voice providers
|
|
28
28
|
|
|
29
29
|
# Synthesize and play
|
|
30
|
-
apx voice say "
|
|
31
|
-
apx voice say "
|
|
30
|
+
apx voice say "Hello from APX" --provider piper
|
|
31
|
+
apx voice say "Hello from APX" --provider gemini
|
|
32
|
+
apx voice say "Hello from APX" --provider gemini --voice Aoede # pick a specific voice
|
|
32
33
|
apx voice say "..." --no-play # generate WAV, don't play
|
|
33
34
|
|
|
34
35
|
# Listen (mic → STT)
|
|
35
36
|
apx voice listen # records until silence (sox) or Ctrl+C
|
|
36
37
|
apx voice listen --seconds 5 # fixed-duration capture
|
|
38
|
+
apx voice listen --provider <id> # override the STT/transcription provider
|
|
37
39
|
```
|
|
38
40
|
|
|
39
41
|
Playback uses system binaries (`afplay`, `paplay`, `aplay`, `play`, `ffplay`) — APX doesn't bundle an audio runtime. If none is found, you get the file path and no playback.
|
|
@@ -68,7 +70,7 @@ curl -L https://github.com/rhasspy/piper/releases/latest/download/piper_macos_aa
|
|
|
68
70
|
-o /tmp/piper.tar.gz
|
|
69
71
|
sudo tar xzf /tmp/piper.tar.gz -C /usr/local/bin --strip-components=1
|
|
70
72
|
|
|
71
|
-
# 2. Voice model (es_AR — Argentine Spanish,
|
|
73
|
+
# 2. Voice model (es_AR — Argentine Spanish, voice "daniela")
|
|
72
74
|
mkdir -p ~/.apx/voices
|
|
73
75
|
cd ~/.apx/voices
|
|
74
76
|
curl -LO https://huggingface.co/rhasspy/piper-voices/resolve/main/es/es_AR/daniela/high/es_AR-daniela-high.onnx
|
|
@@ -79,7 +81,7 @@ apx config set voice.tts.provider piper
|
|
|
79
81
|
apx config set voice.tts.piper.model "$HOME/.apx/voices/es_AR-daniela-high.onnx"
|
|
80
82
|
|
|
81
83
|
# 4. Test
|
|
82
|
-
apx voice say "hola
|
|
84
|
+
apx voice say "hola, soy APX" --provider piper # Spanish text exercises the es_AR voice
|
|
83
85
|
```
|
|
84
86
|
|
|
85
87
|
### Gemini cloud (quick if you already have a key)
|
|
@@ -88,7 +90,7 @@ apx voice say "hola Manú" --provider piper
|
|
|
88
90
|
apx config set voice.tts.provider gemini
|
|
89
91
|
apx config set voice.tts.gemini.api_key '<GEMINI_KEY>'
|
|
90
92
|
apx config set engines.gemini.api_key '<GEMINI_KEY>' # reuse for LLM router
|
|
91
|
-
apx voice say "
|
|
93
|
+
apx voice say "Hello from APX" --provider gemini
|
|
92
94
|
```
|
|
93
95
|
|
|
94
96
|
## The unified voice channel
|
|
@@ -100,7 +102,7 @@ apx voice say "hola Manú" --provider gemini
|
|
|
100
102
|
curl -X POST http://127.0.0.1:7430/voice/turn \
|
|
101
103
|
-H "Authorization: Bearer $(cat ~/.apx/daemon.token)" \
|
|
102
104
|
-H "Content-Type: application/json" \
|
|
103
|
-
-d '{"text":"
|
|
105
|
+
-d '{"text":"Hello APX","channel":"voice"}'
|
|
104
106
|
```
|
|
105
107
|
|
|
106
108
|
Telegram voice messages and the overlay mascot still have their own STT pipelines today — they don't go through `/voice/turn` (yet). The endpoint exists for callers that want one-shot bidirectional voice.
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// Anti-ghost-response rules injected into every agent system prompt.
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- If you cannot execute the action (missing permission, unclear params, tool not available), explain WHY — do not promise and disappear.
|
|
14
|
-
- If the user asks you to do multiple things, do them all in the same turn using sequential tool calls if needed.`;
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { readAgentMemory } from "./memory.js";
|
|
5
|
+
|
|
6
|
+
// Anti-ghost-response rules injected into every agent system prompt. The text
|
|
7
|
+
// lives next to the agent prompts (src/core/agent/prompts/action-discipline.md)
|
|
8
|
+
// so it can be edited without touching code. Cached at module load.
|
|
9
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
const ACTION_DISCIPLINE_RULES = fs
|
|
11
|
+
.readFileSync(path.join(__dirname, "prompts", "action-discipline.md"), "utf8")
|
|
12
|
+
.trimEnd();
|
|
15
13
|
|
|
16
14
|
function listField(value) {
|
|
17
15
|
if (Array.isArray(value)) return value.map(String).map((s) => s.trim()).filter(Boolean);
|