@jetrabbits/agentic 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +11 -4
- package/CHANGELOG.md +13 -0
- package/MEMORY.md +41 -87
- package/Makefile +80 -22
- package/agentic +634 -124
- package/areas/devops/ci-cd/AGENTS.md +1 -15
- package/areas/devops/database-ops/AGENTS.md +1 -15
- package/areas/devops/devsecops/AGENTS.md +1 -15
- package/areas/devops/infrastructure/AGENTS.md +1 -15
- package/areas/devops/kubernetes/AGENTS.md +1 -15
- package/areas/devops/networking/AGENTS.md +1 -15
- package/areas/devops/observability/AGENTS.md +1 -15
- package/areas/devops/sre/AGENTS.md +1 -15
- package/areas/software/backend/AGENTS.md +1 -16
- package/areas/software/data-engineering/AGENTS.md +1 -16
- package/areas/software/frontend/AGENTS.md +1 -16
- package/areas/software/full-stack/AGENTS.md +1 -16
- package/areas/software/general/AGENTS.md +1 -7
- package/areas/software/mlops/AGENTS.md +1 -16
- package/areas/software/mobile/AGENTS.md +1 -16
- package/areas/software/platform/AGENTS.md +1 -16
- package/areas/software/qa/AGENTS.md +1 -16
- package/areas/software/security/AGENTS.md +1 -16
- package/areas/template/AGENTS.tmpl.md +1 -17
- package/docs/agentic-lifecycle.md +7 -3
- package/docs/agentic-stabilization/README.md +11 -7
- package/docs/agentic-token-minimization/README.md +7 -5
- package/docs/agentic-usage.md +12 -5
- package/docs/opencode_setup.md +7 -5
- package/extensions/opencode/plugins/agent-model-mapper.ts +13 -2
- package/extensions/opencode/plugins/telegram-notification.ts +14 -14
- package/package.json +1 -1
|
@@ -4,16 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
- Post-install doctor checks run independently for `codex`, `opencode`, `claude`, and `gemini`.
|
|
6
6
|
- `AGENTIC_DOCTOR_TIMEOUT_SECONDS` defaults to `10`; a timeout is reported as a doctor failure and install continues.
|
|
7
|
-
- Codex doctor runs non-interactively with `--ephemeral
|
|
7
|
+
- Codex doctor runs non-interactively with `--ephemeral`, `--sandbox workspace-write`, and the same lightweight smoke prompt as other supported doctor targets.
|
|
8
8
|
- OpenCode uses `agent-model-mapper` instead of the removed `model-checker` artifacts.
|
|
9
9
|
- `agent-model-mapper` writes `.opencode/opencode.json` during interactive install only after confirmation.
|
|
10
10
|
- `agent-model-mapper` uses `fzf` for install-time model dropdowns when available and OpenCode startup skips once all roles are mapped.
|
|
11
11
|
- The runtime OpenCode plugin never opens `fzf`, asks questions, or writes project files.
|
|
12
|
-
- Context7
|
|
13
|
-
- OpenCode MemPalace setup writes `mempalace-mcp` config
|
|
14
|
-
- Telegram notification credentials are read
|
|
12
|
+
- Context7 offers an interactive key mode: configure without a key or enter `CONTEXT7_API_KEY` for the selected target configs.
|
|
13
|
+
- OpenCode MemPalace setup writes `mempalace-mcp` config and initializes/mines project memory into a project-specific wing without LLM calls.
|
|
14
|
+
- Telegram notification credentials are read from project `.agentic.json` when the plugin is enabled.
|
|
15
15
|
- MemPalace-enabled installs create a managed `.mempalaceignore` unless the target project already has one.
|
|
16
|
-
-
|
|
16
|
+
- `make test` runs the fast deterministic e2e suite; longer deterministic checks, real blackbox, and coverage checks are explicit targets.
|
|
17
|
+
- `make test-all` runs the full local suite including longer deterministic checks, install/evidence blackbox, and coverage.
|
|
18
|
+
- Real Codex, OpenCode, and Telegram blackbox install/evidence scenarios run through `make test-real-blackbox`.
|
|
19
|
+
- Live Codex/OpenCode/Telegram blackbox sessions require `AGENTIC_REAL_BLACKBOX_LIVE=1`.
|
|
17
20
|
- `make test-coverage` traces `agentic` through e2e runs and fails below 90% line coverage.
|
|
18
21
|
|
|
19
22
|
## Acceptance Criteria
|
|
@@ -24,10 +27,11 @@
|
|
|
24
27
|
- `extensions/opencode/opencode.json` lists `agent-model-mapper`.
|
|
25
28
|
- Runtime model mapper execution does not prompt or modify project files.
|
|
26
29
|
- Telegram plugin tests prove environment-only credentials and no secret output.
|
|
27
|
-
- Real blackbox tests print created files,
|
|
30
|
+
- Real blackbox tests print created files, managed guidance sources, and MCP config evidence, then save instruction evidence to a temp file without printing Telegram secrets.
|
|
28
31
|
|
|
29
32
|
## Operational Constraints
|
|
30
33
|
|
|
31
|
-
- `make test`
|
|
34
|
+
- `make test` is deterministic, designed for a sub-minute local loop, and does not require real agent binaries, model auth, network access, Context7/MemPalace access, or Telegram credentials.
|
|
35
|
+
- `AGENTIC_REAL_BLACKBOX_LIVE=1 make test-real-blackbox` requires real `codex` and `opencode` binaries, working model auth, network access, Context7/MemPalace access, and Telegram credentials for the Telegram case.
|
|
32
36
|
- Telegram credentials must never be committed or written to Agentic config.
|
|
33
37
|
- Coverage is line-based Bash trace coverage for the `agentic` script, not branch coverage.
|
|
@@ -32,15 +32,17 @@ When installing for OpenCode, `agentic` writes optional plugin state to:
|
|
|
32
32
|
~/.config/agentic/opencode-plugins.json
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Interactive installs ask whether to enable Telegram notifications and model
|
|
35
|
+
Interactive installs ask whether to enable Telegram notifications and model mapping. Non-interactive installs default optional plugins to disabled when no config exists.
|
|
36
36
|
|
|
37
|
-
The OpenCode plugins read
|
|
37
|
+
The OpenCode plugins read project `.agentic.json` at startup and return no hooks when disabled. When Telegram is enabled, credentials are stored in plaintext at:
|
|
38
38
|
|
|
39
39
|
```text
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
settings.opencode_plugins.telegram.botToken
|
|
41
|
+
settings.opencode_plugins.telegram.chatId
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
Do not commit a Telegram-enabled `.agentic.json` to public repositories.
|
|
45
|
+
|
|
44
46
|
## Context7
|
|
45
47
|
|
|
46
48
|
`agentic` adds Context7 MCP configuration for known project-level formats:
|
|
@@ -54,7 +56,7 @@ OPENCODE_TELEGRAM_CHAT_ID
|
|
|
54
56
|
- `.kilocode/mcp.json` for `kilocode`
|
|
55
57
|
- `~/.gemini/antigravity/mcp_config.json` for `antigravity` (global user config)
|
|
56
58
|
|
|
57
|
-
Interactive installs ask whether to enable Context7. If enabled, Context7
|
|
59
|
+
Interactive installs ask whether to enable Context7. If enabled, Context7 can be configured without a key or with a `CONTEXT7_API_KEY` entered during setup. Non-interactive installs enable Context7 when either `AGENTIC_ENABLE_CONTEXT7=y` or `CONTEXT7_API_KEY` is set. Generated guidance requires agents to use Context7 for framework, SDK, library, and API documentation before relying on model memory when the project config is present.
|
|
58
60
|
|
|
59
61
|
Directory copies are processed in batches so large specialization installs avoid spawning a separate marker/manifest process for every copied file. Manifest protection still applies: existing unmanaged files are skipped on rerun, user-modified managed files are skipped, and new generated files can be added by newer `agentic` versions.
|
|
60
62
|
|
package/docs/agentic-usage.md
CHANGED
|
@@ -104,7 +104,7 @@ The final install line prints the exact path:
|
|
|
104
104
|
Agentic log file: /tmp/agentic-20260512-114203.ABC123
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
`agentic` also runs a final doctor smoke check for selected real agent targets (`codex`, `opencode`, `claude`, `gemini`). The doctor runs in a temporary copy of the project and prints one status row per selected agent.
|
|
107
|
+
`agentic` also runs a final doctor smoke check for selected real agent targets (`codex`, `opencode`, `claude`, `gemini`). The doctor runs in a temporary copy of the project and prints one status row per selected agent. All supported doctor targets use a lightweight pure smoke prompt, so install-time doctor checks do not start a long SDLC workflow. Each agent has an independent timeout controlled by `AGENTIC_DOCTOR_TIMEOUT_SECONDS` and defaults to `10` seconds. Doctor failures and timeouts are reported but do not roll back or fail the install. Disable doctor for cheap checks with:
|
|
108
108
|
|
|
109
109
|
```bash
|
|
110
110
|
AGENTIC_DOCTOR=0 agentic install ...
|
|
@@ -169,11 +169,11 @@ When `opencode` is selected, interactive installs ask whether to enable Telegram
|
|
|
169
169
|
~/.config/agentic/opencode-plugins.json
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
Non-interactive installs create a disabled config when no config exists. Telegram
|
|
172
|
+
Non-interactive installs create a disabled config when no config exists. Interactive installs ask for Telegram `botToken` and `chatId` when `telegram-notification` is selected. Those credentials are written to the target project `.agentic.json` under `settings.opencode_plugins.telegram`, not to `~/.config/agentic/opencode-plugins.json`. Treat `.agentic.json` as plaintext secret-bearing project config when Telegram is enabled and do not commit it to public repositories. When enabled, `agent-model-mapper` runs during interactive `agentic install`/`agentic tui`, uses `fzf` as a dropdown picker when available, and writes `.opencode/opencode.json` only after a Confirm action. OpenCode startup never prompts for model mapping; the runtime plugin only reports whether install-time mapping is already complete.
|
|
173
173
|
|
|
174
174
|
## Context7
|
|
175
175
|
|
|
176
|
-
For `opencode`, `codex`, `claude`, `cursor`, `gemini`, `kilocode`, and `antigravity`, interactive installs ask whether to add Context7 MCP configuration. If enabled,
|
|
176
|
+
For `opencode`, `codex`, `claude`, `cursor`, `gemini`, `kilocode`, and `antigravity`, interactive installs ask whether to add Context7 MCP configuration. If enabled, a follow-up menu chooses either keyless mode or entering `CONTEXT7_API_KEY`. The selected key is written to all selected target configs for the current project. Most targets use project-level files, while `antigravity` is written to the global user path `~/.gemini/antigravity/mcp_config.json`.
|
|
177
177
|
|
|
178
178
|
Non-interactive installs enable Context7 when either `AGENTIC_ENABLE_CONTEXT7=y` or `CONTEXT7_API_KEY` is set. Agents are instructed to use Context7 for framework, library, SDK, API, and setup documentation when the project config is present.
|
|
179
179
|
|
|
@@ -183,14 +183,21 @@ For `opencode`, `codex`, `claude`, `cursor`, `gemini`, `kilocode`, and `antigrav
|
|
|
183
183
|
|
|
184
184
|
Generated configs run `mempalace-mcp` without arguments for all supported agent targets. Runtime startup and MCP tool errors are checked by the post-install doctor stage.
|
|
185
185
|
|
|
186
|
-
During install, if MemPalace is enabled, `agentic` writes a managed `.mempalaceignore` when the target project does not already have one.
|
|
186
|
+
During install, if MemPalace is enabled, `agentic` writes a managed `.mempalaceignore` when the target project does not already have one. It initializes the project with `mempalace init --yes --no-llm`, then mines project knowledge into a wing named from the target project basename. If `docs/` exists, those files are also mined into the shared `shared_docs` wing for cross-project Markdown knowledge. MemPalace commands time out after `60` seconds by default; override with `AGENTIC_MEMPALACE_TIMEOUT_SECONDS`. If auto-install, initialization, mining, timeout, or runtime checks fail, install continues, manual setup instructions are printed, and agents fall back to standard context discovery. If `pip install mempalace` fails, `agentic` prints the pip exit status, a temporary pip output log path, and the first non-empty pip output line as the likely reason; the full pip output is also copied into the main Agentic run log.
|
|
187
|
+
|
|
188
|
+
For environments that already provide `mempalace-mcp` and need a fast install path, set `AGENTIC_MEMPALACE_SETUP=skip`. This writes the same MCP configuration and `.mempalaceignore` but skips Python package installation and project indexing.
|
|
187
189
|
|
|
188
190
|
## Real agent blackbox E2E
|
|
189
191
|
|
|
190
|
-
`make test`
|
|
192
|
+
`make test` runs the fast deterministic e2e suite and is intended to finish in under a minute on a normal local machine. Longer deterministic checks (`test-doctor`, `test-markers`), real-agent blackbox, and coverage checks are explicit targets so the default local loop stays short.
|
|
193
|
+
|
|
194
|
+
`make test-real-blackbox` validates real Codex/OpenCode install artifacts, generated guidance, MCP config, and manifest evidence without starting live LLM sessions by default. Set `AGENTIC_REAL_BLACKBOX_LIVE=1` to execute live `codex`/`opencode` runs. Live Telegram checks require Telegram credentials to be present in the target project `.agentic.json`; secrets are redacted from test output.
|
|
195
|
+
|
|
196
|
+
Makefile test targets print timestamped `[make-timing]` start, success/failure, exit status, and elapsed seconds for every top-level test step. `test-real-blackbox` is split into separate Codex, OpenCode, OpenCode mapper, and Telegram timed steps. Blackbox instruction evidence is saved to a `/tmp/agentic-instruction-evidence.*` file and the path is printed. `test-coverage` also prints timing for each traced coverage scenario before the final coverage parser. Use `make test-all` when you want the fast suite, longer deterministic checks, install/evidence blackbox, and coverage in one command.
|
|
191
197
|
|
|
192
198
|
```bash
|
|
193
199
|
make test-real-blackbox
|
|
200
|
+
AGENTIC_REAL_BLACKBOX_LIVE=1 make test-real-blackbox
|
|
194
201
|
```
|
|
195
202
|
|
|
196
203
|
## Deprecated wrapper
|
package/docs/opencode_setup.md
CHANGED
|
@@ -33,18 +33,20 @@ When `agentic` installs the OpenCode extension, it configures optional plugins i
|
|
|
33
33
|
~/.config/agentic/opencode-plugins.json
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
Telegram notifications and agent model mapping are opt-in. If the config is absent or a plugin is disabled, the plugin returns no hooks and OpenCode continues without that behavior.
|
|
36
|
+
Telegram notifications and agent model mapping are opt-in. Interactive `agentic install` and `agentic tui` ask for OpenCode plugin selection whenever `opencode` is selected; the answer rewrites this config. During manifest-based upgrade/re-install sync, existing plugin settings are kept so automated refreshes do not open prompts. If the config is absent or a plugin is disabled, the plugin returns no hooks and OpenCode continues without that behavior.
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
When `telegram-notification` is selected interactively, `agentic` asks for `botToken` and `chatId` and stores them in the target project's `.agentic.json`:
|
|
39
39
|
|
|
40
40
|
```text
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
settings.opencode_plugins.telegram.botToken
|
|
42
|
+
settings.opencode_plugins.telegram.chatId
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
The runtime plugin reads credentials from the project `.agentic.json`; it does not read Telegram credentials from environment variables. This file stores credentials in plaintext, so do not commit a Telegram-enabled `.agentic.json` to public repositories.
|
|
46
|
+
|
|
45
47
|
Non-interactive `agentic install` defaults optional plugins to disabled when no config exists.
|
|
46
48
|
|
|
47
|
-
`agent-model-mapper` reads roles from target `.opencode/agents/*.md` and discovers model names from `~/.config/opencode/opencode.json`,
|
|
49
|
+
`agent-model-mapper` reads roles from target `.opencode/agents/*.md` and discovers model names from `~/.config/opencode/opencode.json`, then adds models from active providers in `~/.local/share/opencode/auth.json` using non-deprecated entries in `~/.cache/opencode/models.json`. When enabled, interactive `agentic install`/`agentic tui` prompts for a main and fallback model per role, using `fzf` as a dropdown picker when available, and writes `.opencode/opencode.json` only after a Confirm action. OpenCode startup never opens `fzf` or waits for model input; the runtime plugin only reports whether install-time mapping is complete.
|
|
48
50
|
|
|
49
51
|
For OpenCode targets, `agentic` writes generated operating guidance to `.opencode/AGENTS.md`. If OpenCode is installed
|
|
50
52
|
alongside another agent target, root `AGENTS.md` is generated as well for the non-OpenCode target.
|
|
@@ -7,6 +7,7 @@ type AgenticPluginConfig = {
|
|
|
7
7
|
agentModelMapper?: {
|
|
8
8
|
enabled?: boolean
|
|
9
9
|
}
|
|
10
|
+
settings?: any
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
type Role = {
|
|
@@ -26,6 +27,14 @@ function readAgenticConfig(): AgenticPluginConfig {
|
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
function readProjectAgenticConfig(directory: string): AgenticPluginConfig {
|
|
31
|
+
try {
|
|
32
|
+
return JSON.parse(readFileSync(join(directory, ".agentic.json"), "utf-8")) as AgenticPluginConfig
|
|
33
|
+
} catch {
|
|
34
|
+
return {}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
29
38
|
function parseFrontmatter(text: string): Record<string, string> {
|
|
30
39
|
if (!text.startsWith("---\n")) return {}
|
|
31
40
|
const end = text.indexOf("\n---", 4)
|
|
@@ -87,8 +96,10 @@ function hasCompleteAgentModelMapping(directory: string, roles: Role[]): boolean
|
|
|
87
96
|
}
|
|
88
97
|
|
|
89
98
|
export const AgentModelMapperPlugin: Plugin = async ({ directory }) => {
|
|
90
|
-
const
|
|
91
|
-
|
|
99
|
+
const projectConfig = readProjectAgenticConfig(directory)
|
|
100
|
+
const globalConfig = readAgenticConfig()
|
|
101
|
+
const enabled = projectConfig.settings?.opencode_plugins?.agentModelMapper?.enabled ?? globalConfig.agentModelMapper?.enabled
|
|
102
|
+
if (!enabled) return {}
|
|
92
103
|
|
|
93
104
|
const roles = await readRoles(directory)
|
|
94
105
|
if (!roles.length) {
|
|
@@ -3,9 +3,7 @@ import { readFileSync } from "node:fs"
|
|
|
3
3
|
import { join } from "node:path"
|
|
4
4
|
|
|
5
5
|
type AgenticPluginConfig = {
|
|
6
|
-
|
|
7
|
-
enabled?: boolean
|
|
8
|
-
}
|
|
6
|
+
settings?: any
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
function telegramApiBaseUrl(): string {
|
|
@@ -18,15 +16,14 @@ function telegramUrl(botToken: string, method: string): string {
|
|
|
18
16
|
|
|
19
17
|
function redactSecret(value: unknown): string {
|
|
20
18
|
const text = String(value)
|
|
21
|
-
const
|
|
22
|
-
const
|
|
19
|
+
const telegram = currentTelegramConfig
|
|
20
|
+
const token = telegram?.botToken
|
|
21
|
+
const chatId = telegram?.chatId
|
|
23
22
|
return [token, chatId].filter(Boolean).reduce((output, secret) => output.split(secret as string).join("[redacted]"), text)
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
function readAgenticConfig(): AgenticPluginConfig {
|
|
27
|
-
const
|
|
28
|
-
const configPath = join(configHome, "agentic", "opencode-plugins.json")
|
|
29
|
-
|
|
25
|
+
function readAgenticConfig(directory: string): AgenticPluginConfig {
|
|
26
|
+
const configPath = join(directory, ".agentic.json")
|
|
30
27
|
try {
|
|
31
28
|
return JSON.parse(readFileSync(configPath, "utf-8")) as AgenticPluginConfig
|
|
32
29
|
} catch {
|
|
@@ -34,11 +31,14 @@ function readAgenticConfig(): AgenticPluginConfig {
|
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
33
|
|
|
34
|
+
let currentTelegramConfig
|
|
35
|
+
|
|
37
36
|
export const TelegramNotificationPlugin: Plugin = async ({ $, client, directory }) => {
|
|
38
|
-
const config = readAgenticConfig()
|
|
39
|
-
const telegram = config.telegram
|
|
40
|
-
|
|
41
|
-
const
|
|
37
|
+
const config = readAgenticConfig(directory)
|
|
38
|
+
const telegram = config.settings?.opencode_plugins?.telegram
|
|
39
|
+
currentTelegramConfig = telegram
|
|
40
|
+
const botToken = telegram?.botToken
|
|
41
|
+
const chatId = telegram?.chatId
|
|
42
42
|
|
|
43
43
|
if (!telegram?.enabled || !botToken || !chatId) {
|
|
44
44
|
return {}
|
|
@@ -96,7 +96,7 @@ export const TelegramNotificationPlugin: Plugin = async ({ $, client, directory
|
|
|
96
96
|
headers: { "Content-Type": "application/json" },
|
|
97
97
|
body: JSON.stringify({
|
|
98
98
|
chat_id: chatId,
|
|
99
|
-
text: `${messageText}\n\n
|
|
99
|
+
text: `${messageText}\n\nПолный ответ в attachment (${fullText.length} символов):\n\n${shortText}...`
|
|
100
100
|
})
|
|
101
101
|
}
|
|
102
102
|
)
|