apex-code 0.0.1-alpha.4 → 0.0.1-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +78 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +10 -1
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +2 -2
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +20 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +91 -1
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +17 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +28 -4
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/lsp/client.d.ts +76 -0
- package/dist/core/lsp/client.d.ts.map +1 -0
- package/dist/core/lsp/client.js +469 -0
- package/dist/core/lsp/client.js.map +1 -0
- package/dist/core/lsp/diagnostics.d.ts +47 -0
- package/dist/core/lsp/diagnostics.d.ts.map +1 -0
- package/dist/core/lsp/diagnostics.js +224 -0
- package/dist/core/lsp/diagnostics.js.map +1 -0
- package/dist/core/lsp/pool.d.ts +48 -0
- package/dist/core/lsp/pool.d.ts.map +1 -0
- package/dist/core/lsp/pool.js +150 -0
- package/dist/core/lsp/pool.js.map +1 -0
- package/dist/core/lsp/registry.d.ts +49 -0
- package/dist/core/lsp/registry.d.ts.map +1 -0
- package/dist/core/lsp/registry.js +215 -0
- package/dist/core/lsp/registry.js.map +1 -0
- package/dist/core/lsp/status.d.ts +23 -0
- package/dist/core/lsp/status.d.ts.map +1 -0
- package/dist/core/lsp/status.js +35 -0
- package/dist/core/lsp/status.js.map +1 -0
- package/dist/core/lsp/sync.d.ts +13 -0
- package/dist/core/lsp/sync.d.ts.map +1 -0
- package/dist/core/lsp/sync.js +71 -0
- package/dist/core/lsp/sync.js.map +1 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +15 -0
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/sandbox/cli-launch.d.ts +43 -0
- package/dist/core/sandbox/cli-launch.d.ts.map +1 -1
- package/dist/core/sandbox/cli-launch.js +70 -3
- package/dist/core/sandbox/cli-launch.js.map +1 -1
- package/dist/core/sandbox/cli-supervisor.d.ts +2 -0
- package/dist/core/sandbox/cli-supervisor.d.ts.map +1 -1
- package/dist/core/sandbox/cli-supervisor.js +1 -0
- package/dist/core/sandbox/cli-supervisor.js.map +1 -1
- package/dist/core/sdk.d.ts +4 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +10 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +3 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts +19 -7
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +77 -19
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +3 -3
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/contract.d.ts +29 -2
- package/dist/core/tools/contract.d.ts.map +1 -1
- package/dist/core/tools/contract.js.map +1 -1
- package/dist/core/tools/diagnostics.d.ts +39 -0
- package/dist/core/tools/diagnostics.d.ts.map +1 -0
- package/dist/core/tools/diagnostics.js +62 -0
- package/dist/core/tools/diagnostics.js.map +1 -0
- package/dist/core/tools/edit.d.ts +10 -0
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +17 -8
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/index.d.ts +20 -3
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +18 -0
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/lsp.d.ts +62 -0
- package/dist/core/tools/lsp.d.ts.map +1 -0
- package/dist/core/tools/lsp.js +216 -0
- package/dist/core/tools/lsp.js.map +1 -0
- package/dist/core/tools/skill-search.d.ts +32 -0
- package/dist/core/tools/skill-search.d.ts.map +1 -0
- package/dist/core/tools/skill-search.js +56 -0
- package/dist/core/tools/skill-search.js.map +1 -0
- package/dist/core/tools/write.d.ts +10 -0
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +16 -3
- package/dist/core/tools/write.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +49 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +235 -1
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.js +2 -1
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +1 -0
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +19 -6
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +172 -89
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/splash-header.d.ts +41 -0
- package/dist/modes/interactive/components/splash-header.d.ts.map +1 -0
- package/dist/modes/interactive/components/splash-header.js +145 -0
- package/dist/modes/interactive/components/splash-header.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +19 -15
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/apex.json +94 -0
- package/dist/modes/interactive/theme/light.json +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +6 -1
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +2 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/themes/apex-logo.d.ts +21 -0
- package/dist/themes/apex-logo.d.ts.map +1 -0
- package/dist/themes/apex-logo.js +31 -0
- package/dist/themes/apex-logo.js.map +1 -0
- package/dist/utils/changelog.d.ts +7 -2
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +82 -13
- package/dist/utils/changelog.js.map +1 -1
- package/docs/skills.md +54 -4
- package/npm-shrinkwrap.json +5 -5
- package/package.json +2 -2
package/docs/skills.md
CHANGED
|
@@ -10,6 +10,7 @@ Apex Code implements the [Agent Skills standard](https://agentskills.io/specific
|
|
|
10
10
|
|
|
11
11
|
- [Locations](#locations)
|
|
12
12
|
- [How Skills Work](#how-skills-work)
|
|
13
|
+
- [Finding a Skill: skill_search](#finding-a-skill-skill_search)
|
|
13
14
|
- [Skill Commands](#skill-commands)
|
|
14
15
|
- [Skill Structure](#skill-structure)
|
|
15
16
|
- [Frontmatter](#frontmatter)
|
|
@@ -33,6 +34,14 @@ Apex Code loads skills from:
|
|
|
33
34
|
- Settings: `skills` array with files or directories
|
|
34
35
|
- CLI: `--skill <path>` (repeatable, additive even with `--no-skills`)
|
|
35
36
|
|
|
37
|
+
> **Sandbox note:** every session runs inside Apex Code's OS sandbox (see
|
|
38
|
+
> [Security](security.md#os-sandbox-and-permissions)), which hides your home
|
|
39
|
+
> directory from the child process by default. The two global roots above are
|
|
40
|
+
> mounted back in, read-only, at their original host paths, so they work the same as
|
|
41
|
+
> everywhere else. Project skills already work without a mount, since the workspace
|
|
42
|
+
> itself is mounted read-write. Packages, settings, and `--skill` paths follow
|
|
43
|
+
> whichever of these roots they resolve under.
|
|
44
|
+
|
|
36
45
|
Discovery rules:
|
|
37
46
|
- In `~/.apex-code/agent/skills/` and `.apex-code/skills/`, direct root `.md` files are discovered as individual skills
|
|
38
47
|
- In all skill locations, directories containing `SKILL.md` are discovered recursively
|
|
@@ -64,11 +73,43 @@ For project-level Claude Code skills, add to `.apex-code/settings.json`:
|
|
|
64
73
|
## How Skills Work
|
|
65
74
|
|
|
66
75
|
1. At startup, Apex Code scans skill locations and extracts names and descriptions
|
|
67
|
-
2. The system prompt
|
|
68
|
-
|
|
69
|
-
|
|
76
|
+
2. The system prompt lists available skill **names only**, alphabetically, up to a fixed
|
|
77
|
+
token budget — not the older per-skill XML block with description and location
|
|
78
|
+
inline. A library too large to list in full states how many names were left out and
|
|
79
|
+
points at `skill_search`
|
|
80
|
+
3. When a name looks relevant, the agent calls `skill_search` to read that skill's
|
|
81
|
+
description before committing to it
|
|
82
|
+
4. The agent uses `read` to load the full SKILL.md (models don't always do this on
|
|
83
|
+
their own; use prompting or `/skill:name` to force it)
|
|
84
|
+
5. The agent follows the instructions, using relative paths to reference scripts and
|
|
85
|
+
assets
|
|
86
|
+
|
|
87
|
+
This is progressive disclosure taken one step further than the base
|
|
88
|
+
[specification](https://agentskills.io/integrate-skills): names are always in context,
|
|
89
|
+
descriptions load on demand through `skill_search`, and full instructions load on
|
|
90
|
+
demand through `read`. A large personal or team skill library costs a small, bounded
|
|
91
|
+
amount of context regardless of how many skills it holds — installing more skills
|
|
92
|
+
never grows the fixed cost every turn already pays.
|
|
93
|
+
|
|
94
|
+
## Finding a Skill: skill_search
|
|
95
|
+
|
|
96
|
+
`skill_search` answers two questions: what skills exist, and what does a specific one
|
|
97
|
+
do.
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
skill_search() # every loaded skill name, alphabetically
|
|
101
|
+
skill_search(query: "browser") # names and descriptions matching "browser"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Called with no `query`, it lists every loaded skill's name — useful when the prompt
|
|
105
|
+
said "use skill X" but X isn't in the always-visible catalog because the library
|
|
106
|
+
exceeded the budget. Called with a `query`, it matches case-insensitively against both
|
|
107
|
+
name and description and returns the matches' descriptions, so the agent can decide
|
|
108
|
+
whether a skill actually fits before spending a `read` on it. A query that matches
|
|
109
|
+
nothing returns an empty list, not an error.
|
|
70
110
|
|
|
71
|
-
|
|
111
|
+
The tool reads only the already-loaded skill registry — no filesystem or network
|
|
112
|
+
access — so it carries no permission prompt and needs no confirmation.
|
|
72
113
|
|
|
73
114
|
## Skill Commands
|
|
74
115
|
|
|
@@ -81,6 +122,15 @@ Skills register as `/skill:name` commands:
|
|
|
81
122
|
|
|
82
123
|
Arguments after the command are appended to the skill content as `User: <args>`.
|
|
83
124
|
|
|
125
|
+
The command token is derived from the skill's `name`, lowercased with runs of
|
|
126
|
+
anything other than `a-z0-9-` collapsed to a single hyphen. For a name that already
|
|
127
|
+
follows the [Name Rules](#name-rules) below, the token is identical to the name. For a
|
|
128
|
+
name the [Validation](#validation) section's leniency let through with spaces or
|
|
129
|
+
capitals — `Poteto Mode`, say — the command becomes `/skill:poteto-mode`, not
|
|
130
|
+
`/skill:Poteto Mode`, since a slash command cannot contain whitespace. The skill still
|
|
131
|
+
loads under its original name for display and for the catalog; only the typed command
|
|
132
|
+
differs.
|
|
133
|
+
|
|
84
134
|
Toggle skill commands via `/settings` in interactive mode or in `settings.json`:
|
|
85
135
|
|
|
86
136
|
```json
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apex-code",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.6",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "apex-code",
|
|
9
|
-
"version": "0.0.1-alpha.
|
|
9
|
+
"version": "0.0.1-alpha.6",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"apex-code-agent-core": "0.0.1-alpha.
|
|
12
|
+
"apex-code-agent-core": "0.0.1-alpha.6",
|
|
13
13
|
"@earendil-works/pi-ai": "^0.84.1",
|
|
14
14
|
"@earendil-works/pi-client": "^0.84.1",
|
|
15
15
|
"@earendil-works/pi-protocol": "^0.84.1",
|
|
@@ -998,8 +998,8 @@
|
|
|
998
998
|
}
|
|
999
999
|
},
|
|
1000
1000
|
"node_modules/apex-code-agent-core": {
|
|
1001
|
-
"version": "0.0.1-alpha.
|
|
1002
|
-
"resolved": "https://registry.npmjs.org/apex-code-agent-core/-/apex-code-agent-core-0.0.1-alpha.
|
|
1001
|
+
"version": "0.0.1-alpha.6",
|
|
1002
|
+
"resolved": "https://registry.npmjs.org/apex-code-agent-core/-/apex-code-agent-core-0.0.1-alpha.6.tgz",
|
|
1003
1003
|
"license": "MIT",
|
|
1004
1004
|
"dependencies": {
|
|
1005
1005
|
"@earendil-works/pi-ai": "^0.84.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apex-code",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.6",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piConfig": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"prepublishOnly": "npm run clean && npm run build && npm run shrinkwrap"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"apex-code-agent-core": "0.0.1-alpha.
|
|
46
|
+
"apex-code-agent-core": "0.0.1-alpha.6",
|
|
47
47
|
"@earendil-works/pi-ai": "^0.84.1",
|
|
48
48
|
"@earendil-works/pi-client": "^0.84.1",
|
|
49
49
|
"@earendil-works/pi-protocol": "^0.84.1",
|