@open-mercato/ai-assistant 0.6.3-develop.3809.1.bde5459e65 → 0.6.3-develop.3811.1.be22750402
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 +31 -1
- package/package.json +6 -6
package/AGENTS.md
CHANGED
|
@@ -2,6 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
> **IMPORTANT**: Update this file with every major change to this module. When implementing new features, modifying architecture, or changing key interfaces, update the relevant sections to keep guidance accurate for future agents.
|
|
4
4
|
|
|
5
|
+
## Always
|
|
6
|
+
|
|
7
|
+
- Treat the public AI assistant docs linked below as the source of truth when they disagree with this file.
|
|
8
|
+
- Use `registerMcpTool`/`defineAiTool` with Zod schemas, `moduleId`, `requiredFeatures`, and serializable handler results.
|
|
9
|
+
- Run `yarn generate` after adding or changing agents, tools, API discovery metadata, or tool packs.
|
|
10
|
+
- Route model selection through `createModelFactory(container)` instead of ad hoc provider clients.
|
|
11
|
+
- Route mutation-capable AI tools through the mutation approval path before execution.
|
|
12
|
+
|
|
13
|
+
## Ask First
|
|
14
|
+
|
|
15
|
+
- Use `AskUserQuestion` before any AI operation that creates, updates, or deletes data.
|
|
16
|
+
- Ask before changing OpenCode Docker configuration, MCP authentication, provider/model resolution precedence, or session-token semantics.
|
|
17
|
+
- Ask before widening tool allowlists, relaxing mutation policies, or exposing new data surfaces to an agent.
|
|
18
|
+
|
|
19
|
+
## Never
|
|
20
|
+
|
|
21
|
+
- Never leave `requiredFeatures` empty for tools that access tenant data.
|
|
22
|
+
- Never bypass endpoint-level RBAC in Code Mode or MCP tool execution.
|
|
23
|
+
- Never call the OpenCode HTTP API directly from chat flows; use the module handlers.
|
|
24
|
+
- Never log credentials, session tokens, API keys, prompt secrets, or raw tenant data.
|
|
25
|
+
- Never cache MCP server instances across requests or skip per-tool ACL checks.
|
|
26
|
+
|
|
27
|
+
## Validation Commands
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
yarn generate
|
|
31
|
+
yarn workspace @open-mercato/ai-assistant test
|
|
32
|
+
yarn workspace @open-mercato/ai-assistant build
|
|
33
|
+
```
|
|
34
|
+
|
|
5
35
|
## Where to look first
|
|
6
36
|
|
|
7
37
|
Before editing this module — and especially before writing or reviewing a new agent — read the public framework docs. They are the source of truth and stay in sync with this AGENTS.md by review:
|
|
@@ -599,7 +629,7 @@ when the registry has no configured provider and `code: 'api_key_missing'`
|
|
|
599
629
|
when the picked provider returns an empty key — every current call site
|
|
600
630
|
already relies on the throw bubbling up, do not swallow it.
|
|
601
631
|
|
|
602
|
-
##
|
|
632
|
+
## Ask First: Use AskUserQuestion for Confirmations
|
|
603
633
|
|
|
604
634
|
> **This is the MOST IMPORTANT rule. NEVER skip this.**
|
|
605
635
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/ai-assistant",
|
|
3
|
-
"version": "0.6.3-develop.
|
|
3
|
+
"version": "0.6.3-develop.3811.1.be22750402",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0"
|
|
@@ -98,16 +98,16 @@
|
|
|
98
98
|
"zod-to-json-schema": "^3.25.2"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
|
-
"@open-mercato/shared": "0.6.3-develop.
|
|
102
|
-
"@open-mercato/ui": "0.6.3-develop.
|
|
101
|
+
"@open-mercato/shared": "0.6.3-develop.3811.1.be22750402",
|
|
102
|
+
"@open-mercato/ui": "0.6.3-develop.3811.1.be22750402",
|
|
103
103
|
"react": "^19.0.0",
|
|
104
104
|
"react-dom": "^19.0.0",
|
|
105
105
|
"zod": ">=3.23.0"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
|
-
"@open-mercato/cli": "0.6.3-develop.
|
|
109
|
-
"@open-mercato/shared": "0.6.3-develop.
|
|
110
|
-
"@open-mercato/ui": "0.6.3-develop.
|
|
108
|
+
"@open-mercato/cli": "0.6.3-develop.3811.1.be22750402",
|
|
109
|
+
"@open-mercato/shared": "0.6.3-develop.3811.1.be22750402",
|
|
110
|
+
"@open-mercato/ui": "0.6.3-develop.3811.1.be22750402",
|
|
111
111
|
"@types/react": "^19.2.15",
|
|
112
112
|
"@types/react-dom": "^19.2.3",
|
|
113
113
|
"react": "19.2.6",
|