agentic-assistant 0.5.1 → 0.6.0

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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.0
4
+
5
+ Changed
6
+
7
+ - BREAKING: design class prefix is now agd-. The panel and demo page read the `--agd-color-*` tokens from `agentic-design` 0.4.0. The old prefix matches EasyList cosmetic rules, so ad blockers hid design-styled controls. Migration: set the `--agd-color-*` tokens in place of the old names, and load `agentic-design/tokens.css` from `agentic-design` ^0.4.0.
8
+ - `agentic-design` peer dependency and dev dependency raised to `^0.4.0`.
9
+
10
+ ## 0.5.2 - 2026-10-29
11
+
12
+ No breaking changes. This is a patch release.
13
+
14
+ Changed
15
+
16
+ - The demo page sets `color-scheme: light dark`, so its system-color fallbacks follow the user's dark mode.
17
+ - A test fails if a hard-coded hex color returns to the demo page style. This does not change the package.
18
+ - An end-to-end test covers `mcp` with no model key, and the README documents that behavior. This does not change the package.
19
+
20
+ Security
21
+
22
+ - An npm `overrides` entry sets `zod` to `^4.6.7`, for GHSA-mrhx-c7xc-m3w5 (memory exhaustion while validating oversized constrained collections, fixed in 4.6.6 and later). The entry applies only to this repo. An install of `agentic-assistant` gets the zod that each dependency allows. The optional peer `agentic-design` 0.3.x can bring zod 3 into your project, so run `npm audit` after you upgrade.
23
+
3
24
  ## 0.5.1
4
25
 
5
26
  Changed
@@ -19,7 +40,7 @@ Changed
19
40
 
20
41
  - `createStaticTokenAuth` now builds a `createStoreAuth` over a memory Store. The local `Authorization` header parser is gone, so `agentic-identity` reads the credential. A token now also signs in as a `session` cookie, and a write by cookie needs an origin in `origins`. A token map may not use one `id` twice.
21
42
  - The demo Worker needs the scope `demo:read` on every `/api/v1` route. A token without it gets a 403. Migration: add `demo:read` to each scope list in `ASSISTANT_TOKENS`.
22
- - `react.css` has no hex colors. Its `--aa-*` variables read the `agentic-design` tokens (`--ad-color-*`), so the panel follows the host theme, including dark mode. Load `agentic-design/tokens.css` on the page. Without it each variable falls back to a system color, and the panel loses its blue accent, tinted cards, amber approval box, and red danger color (the risk notice shows in link blue). The palette shifts a little (for example the accent is now `#2B4BC4`). `agentic-design` is an optional peer dependency (`^0.3.1`).
43
+ - `react.css` has no hex colors. Its `--aa-*` variables read the color tokens of `agentic-design` 0.3, so the panel follows the host theme, including dark mode. Load `agentic-design/tokens.css` on the page. Without it each variable falls back to a system color, and the panel loses its blue accent, tinted cards, amber approval box, and red danger color (the risk notice shows in link blue). The palette shifts a little (for example the accent is now `#2B4BC4`). `agentic-design` is an optional peer dependency (`^0.3.1`).
23
44
  - The OpenAI-compatible provider skips a chunk or tool-call part that is not an object, so a JSON `null` no longer throws. It gives a tool-call part with no `index` its own call when it has an `id`, and continues the last call when it has none. It cancels the body of a failed response.
24
45
  - The MCP tool source has unit tests.
25
46
 
package/README.md CHANGED
@@ -118,7 +118,7 @@ import "agentic-assistant/react.css";
118
118
  />;
119
119
  ```
120
120
 
121
- The panel colors are `agentic-design` tokens (`--ad-color-*`), so load `agentic-design/tokens.css` once, as above. The panel then follows your light or dark theme. Without the tokens the panel uses system colors. Set all `--ad-color-*` tokens or none: a partial set can give a pair that fails contrast. To set your own colors, override the `--aa-*` variables on `.aa-panel`.
121
+ The panel colors are `agentic-design` tokens (`--agd-color-*`), so load `agentic-design/tokens.css` once, as above. The panel then follows your light or dark theme. Without the tokens the panel uses system colors. Set all `--agd-color-*` tokens or none: a partial set can give a pair that fails contrast. To set your own colors, override the `--aa-*` variables on `.aa-panel`.
122
122
 
123
123
  The panel streams the answer, shows each tool call as a card, and shows an approval prompt with the exact arguments. Every message, card, and prompt that the assistant makes carries a visible "Machine-made" label. Tool output is shown as text and never as HTML. The panel does not hold a model, a key, or a gate. It needs `react` 18 or newer.
124
124
 
@@ -141,6 +141,7 @@ The assistant prints its answer on stdout. The answer starts with `Assistant (ma
141
141
  - `--scope` is what the assistant may hold. `--tool-scope` is what each tool needs. Both are required, and the CLI guesses neither.
142
142
  - `--tool-risk` defaults to `risky`. A risky call needs approval. Approve one exact call ahead of time with `--approve-call '{"tool":"notes_write","input":{"id":"7","text":"hi"}}'`. The call must match the tool and the arguments, and each approval is used once. On a terminal, `--approve ask` asks you.
143
143
  - Keys come from the environment: `ANTHROPIC_API_KEY`, or the variable named by `--api-key-env`. There is no flag that takes a key.
144
+ - With `ANTHROPIC_API_KEY`, or the variable named by `--api-key-env`, unset or empty, `mcp` prints one line on stderr that names the variable, writes nothing to stdout, and exits 2.
144
145
  - For an EU-hosted model, use `--provider openai-compatible --base-url https://models.example.eu/v1 --model <id> --api-key-env EU_KEY`. Add `--price-in` and `--price-out` to use the cost cap.
145
146
  - A message on stdin may be up to 1 MB.
146
147
  - Limits: `--max-turns`, `--max-tokens`, `--max-cost`, `--max-tool-calls`.
@@ -4,7 +4,7 @@ import {
4
4
  hasScope,
5
5
  parseScope,
6
6
  runAssistant
7
- } from "./chunk-JNZPVHNN.js";
7
+ } from "./chunk-4YOTNHWM.js";
8
8
 
9
9
  // src/api.ts
10
10
  import { PRINCIPAL_KINDS } from "agentic-identity";
@@ -1,6 +1,6 @@
1
1
  // src/version.ts
2
2
  import { createRequire } from "module";
3
- var VERSION = true ? "0.5.1" : readPackageVersion();
3
+ var VERSION = true ? "0.6.0" : readPackageVersion();
4
4
 
5
5
  // src/approvals.ts
6
6
  import { createHash, randomUUID } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ProviderError
3
- } from "./chunk-JNZPVHNN.js";
3
+ } from "./chunk-4YOTNHWM.js";
4
4
 
5
5
  // src/providers/anthropic.ts
6
6
  import Anthropic from "@anthropic-ai/sdk";
@@ -2,12 +2,12 @@ import {
2
2
  describeFailure,
3
3
  runChat,
4
4
  runRemote
5
- } from "./chunk-5BZENFYL.js";
5
+ } from "./chunk-WDZUIVU7.js";
6
6
  import {
7
7
  VERSION,
8
8
  provenanceLabel,
9
9
  provenanceMarker
10
- } from "./chunk-JNZPVHNN.js";
10
+ } from "./chunk-4YOTNHWM.js";
11
11
 
12
12
  // src/mcp-server.ts
13
13
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -5,7 +5,7 @@ import {
5
5
  AnthropicProvider,
6
6
  checkBaseUrl,
7
7
  isLoopback
8
- } from "./chunk-2RRM6OLC.js";
8
+ } from "./chunk-IXOE6XPI.js";
9
9
  import {
10
10
  PrincipalError,
11
11
  ProviderError,
@@ -17,7 +17,7 @@ import {
17
17
  digestCall,
18
18
  printable,
19
19
  runAssistant
20
- } from "./chunk-JNZPVHNN.js";
20
+ } from "./chunk-4YOTNHWM.js";
21
21
  import {
22
22
  AssistantApiError,
23
23
  createClient
package/dist/cli.js CHANGED
@@ -7,15 +7,15 @@ import {
7
7
  readTextFile,
8
8
  runChat,
9
9
  runRemote
10
- } from "./chunk-5BZENFYL.js";
10
+ } from "./chunk-WDZUIVU7.js";
11
11
  import "./chunk-HYT732TN.js";
12
- import "./chunk-2RRM6OLC.js";
12
+ import "./chunk-IXOE6XPI.js";
13
13
  import {
14
14
  TOOL_RISKS,
15
15
  VERSION,
16
16
  printable,
17
17
  provenanceLabel
18
- } from "./chunk-JNZPVHNN.js";
18
+ } from "./chunk-4YOTNHWM.js";
19
19
  import "./chunk-QTIEDY3V.js";
20
20
 
21
21
  // src/cli.ts
@@ -327,7 +327,7 @@ async function runCli(argv, io = defaultIo()) {
327
327
  for (const skip of setup.skipped.slice(0, MAX_SKIPPED_LINES)) io.err(`skipped tool ${oneLine(skip.name, 100)}: ${oneLine(skip.reason, 200)}`);
328
328
  if (setup.skipped.length > MAX_SKIPPED_LINES) io.err(`skipped ${setup.skipped.length - MAX_SKIPPED_LINES} more tools`);
329
329
  if (parsed.command === "mcp") {
330
- const { startAssistantMcp } = await import("./mcp-server-7R5WCSID.js");
330
+ const { startAssistantMcp } = await import("./mcp-server-SYJM77VO.js");
331
331
  await startAssistantMcp(setup, remote, { approve: parsed.allowApprove ?? false });
332
332
  return 0;
333
333
  }
package/dist/demo.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  createStaticTokenAuth,
3
3
  createWorker
4
- } from "./chunk-TOQIHYDH.js";
4
+ } from "./chunk-4N722U3I.js";
5
5
  import {
6
6
  AnthropicProvider
7
- } from "./chunk-2RRM6OLC.js";
7
+ } from "./chunk-IXOE6XPI.js";
8
8
  import {
9
9
  ToolRegistry,
10
10
  VERSION,
11
11
  hasScope
12
- } from "./chunk-JNZPVHNN.js";
12
+ } from "./chunk-4YOTNHWM.js";
13
13
 
14
14
  // src/demo-page.ts
15
15
  var DEMO_CSP = "default-src 'none'; style-src 'unsafe-inline'; script-src 'unsafe-inline'; connect-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'";
@@ -20,13 +20,14 @@ var DEMO_PAGE = `<!doctype html>
20
20
  <meta name="viewport" content="width=device-width, initial-scale=1">
21
21
  <title>agentic-assistant demo</title>
22
22
  <style>
23
- body{font:16px/1.5 system-ui,sans-serif;max-width:42rem;margin:2rem auto;padding:0 1rem;color:var(--ad-color-text,CanvasText);background:var(--ad-color-surface,Canvas)}
23
+ :root{color-scheme:light dark}
24
+ body{font:16px/1.5 system-ui,sans-serif;max-width:42rem;margin:2rem auto;padding:0 1rem;color:var(--agd-color-text,CanvasText);background:var(--agd-color-surface,Canvas)}
24
25
  label{display:block;margin-top:1rem;font-weight:600}
25
26
  input,textarea,button{font:inherit;padding:.5rem;width:100%;box-sizing:border-box}
26
27
  button{width:auto;min-height:2.5rem;margin-top:1rem;cursor:pointer}
27
- :focus-visible{outline:3px solid var(--ad-color-focus,LinkText);outline-offset:2px}
28
- #out{white-space:pre-wrap;border:1px solid var(--ad-color-border-strong,CanvasText);padding:1rem;margin-top:1rem;min-height:4rem}
29
- .badge{display:inline-block;border:1px solid var(--ad-color-text,CanvasText);padding:0 .5rem;font-size:.875rem}
28
+ :focus-visible{outline:3px solid var(--agd-color-focus,LinkText);outline-offset:2px}
29
+ #out{white-space:pre-wrap;border:1px solid var(--agd-color-border-strong,CanvasText);padding:1rem;margin-top:1rem;min-height:4rem}
30
+ .badge{display:inline-block;border:1px solid var(--agd-color-text,CanvasText);padding:0 .5rem;font-size:.875rem}
30
31
  </style>
31
32
  </head>
32
33
  <body>
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createAssistantMcpServer,
3
3
  startAssistantMcp
4
- } from "./chunk-E7TFMM2Z.js";
4
+ } from "./chunk-UJIYGGF5.js";
5
5
  import {
6
6
  ConfigError,
7
7
  FallbackProvider,
@@ -10,13 +10,13 @@ import {
10
10
  connectMcpTools,
11
11
  parseTarget,
12
12
  runChat
13
- } from "./chunk-5BZENFYL.js";
13
+ } from "./chunk-WDZUIVU7.js";
14
14
  import "./chunk-HYT732TN.js";
15
15
  import {
16
16
  AnthropicProvider,
17
17
  DEFAULT_ANTHROPIC_MODEL,
18
18
  PRICING_CHECKED_ON
19
- } from "./chunk-2RRM6OLC.js";
19
+ } from "./chunk-IXOE6XPI.js";
20
20
  import {
21
21
  ACTIONS,
22
22
  DATA_NOTICE,
@@ -40,7 +40,7 @@ import {
40
40
  provenanceMarker,
41
41
  runAssistant,
42
42
  scopeCovers
43
- } from "./chunk-JNZPVHNN.js";
43
+ } from "./chunk-4YOTNHWM.js";
44
44
  import "./chunk-QTIEDY3V.js";
45
45
  export {
46
46
  ACTIONS,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createAssistantMcpServer,
3
3
  startAssistantMcp
4
- } from "./chunk-E7TFMM2Z.js";
5
- import "./chunk-5BZENFYL.js";
4
+ } from "./chunk-UJIYGGF5.js";
5
+ import "./chunk-WDZUIVU7.js";
6
6
  import "./chunk-HYT732TN.js";
7
- import "./chunk-2RRM6OLC.js";
8
- import "./chunk-JNZPVHNN.js";
7
+ import "./chunk-IXOE6XPI.js";
8
+ import "./chunk-4YOTNHWM.js";
9
9
  import "./chunk-QTIEDY3V.js";
10
10
  export {
11
11
  createAssistantMcpServer,
package/dist/react.css CHANGED
@@ -1,22 +1,22 @@
1
- /* Plain CSS variables. They read the agentic-design tokens (--ad-color-*), so load
1
+ /* Plain CSS variables. They read the agentic-design tokens (--agd-color-*), so load
2
2
  agentic-design/tokens.css once on the page. Override --aa-* on .aa-panel or a parent to match your app.
3
3
  Without the tokens, each variable falls back to a system color, so focus and borders stay visible.
4
4
  Every token pair meets WCAG 2.2 AA contrast in light and dark; src/react/styles.test.ts checks it.
5
5
  No remote fonts or images. */
6
6
  .aa-panel {
7
- --aa-bg: var(--ad-color-surface, Canvas);
8
- --aa-fg: var(--ad-color-text, CanvasText);
9
- --aa-muted: var(--ad-color-text-muted, CanvasText);
10
- --aa-border: var(--ad-color-border-strong, CanvasText);
11
- --aa-accent: var(--ad-color-accent, LinkText);
12
- --aa-accent-fg: var(--ad-color-text-on-accent, Canvas);
13
- --aa-focus: var(--ad-color-focus, LinkText);
14
- --aa-machine-bg: var(--ad-color-accent-subtle, Canvas);
15
- --aa-machine-fg: var(--ad-color-accent-text, CanvasText);
16
- --aa-card-bg: var(--ad-color-surface-sunken, Canvas);
17
- --aa-warn-bg: var(--ad-color-warning-subtle, Canvas);
18
- --aa-warn-fg: var(--ad-color-warning-text, CanvasText);
19
- --aa-danger: var(--ad-color-danger, LinkText);
7
+ --aa-bg: var(--agd-color-surface, Canvas);
8
+ --aa-fg: var(--agd-color-text, CanvasText);
9
+ --aa-muted: var(--agd-color-text-muted, CanvasText);
10
+ --aa-border: var(--agd-color-border-strong, CanvasText);
11
+ --aa-accent: var(--agd-color-accent, LinkText);
12
+ --aa-accent-fg: var(--agd-color-text-on-accent, Canvas);
13
+ --aa-focus: var(--agd-color-focus, LinkText);
14
+ --aa-machine-bg: var(--agd-color-accent-subtle, Canvas);
15
+ --aa-machine-fg: var(--agd-color-accent-text, CanvasText);
16
+ --aa-card-bg: var(--agd-color-surface-sunken, Canvas);
17
+ --aa-warn-bg: var(--agd-color-warning-subtle, Canvas);
18
+ --aa-warn-fg: var(--agd-color-warning-text, CanvasText);
19
+ --aa-danger: var(--agd-color-danger, LinkText);
20
20
 
21
21
  display: flex;
22
22
  flex-direction: column;
package/dist/worker.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  createAssistantApi,
4
4
  createStaticTokenAuth,
5
5
  createWorker
6
- } from "./chunk-TOQIHYDH.js";
7
- import "./chunk-JNZPVHNN.js";
6
+ } from "./chunk-4N722U3I.js";
7
+ import "./chunk-4YOTNHWM.js";
8
8
  export {
9
9
  APPROVER_SCOPE,
10
10
  createAssistantApi,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-assistant",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "An AI assistant that acts inside your apps with the user's own permissions.",
5
5
  "keywords": [
6
6
  "assistant",
@@ -84,7 +84,7 @@
84
84
  "@types/node": "^22.0.0",
85
85
  "@types/react": "^19.3.0",
86
86
  "@types/react-dom": "^19.3.0",
87
- "agentic-design": "^0.3.1",
87
+ "agentic-design": "^0.4.0",
88
88
  "jsdom": "^30.1.3",
89
89
  "react": "^19.3.1",
90
90
  "react-dom": "^19.3.1",
@@ -94,7 +94,7 @@
94
94
  "wrangler": "^4.155.0"
95
95
  },
96
96
  "peerDependencies": {
97
- "agentic-design": "^0.3.1",
97
+ "agentic-design": "^0.4.0",
98
98
  "react": ">=18"
99
99
  },
100
100
  "peerDependenciesMeta": {
@@ -104,5 +104,8 @@
104
104
  "react": {
105
105
  "optional": true
106
106
  }
107
+ },
108
+ "overrides": {
109
+ "zod": "^4.6.7"
107
110
  }
108
111
  }