@adecore/agent-contracts 0.54.2 → 0.54.3

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/README.md CHANGED
@@ -31,8 +31,10 @@ The root exports everything. Each group also has a subpath of its own: `agent`,
31
31
  | [Overview](https://adecore.dev/agent-contracts/) | Install, a first check and the entry points |
32
32
  | [Protocol](https://adecore.dev/agent-contracts/protocol) | Frames, the request and event tables, replay and adding requests |
33
33
  | [Conversation](https://adecore.dev/agent-contracts/conversation) | A chat's info and items, attachments, approvals, bookmarks and forks |
34
- | [Providers and accounts](https://adecore.dev/agent-contracts/providers-and-accounts) | Agent kinds, model catalogs, capabilities, runtime modes and accounts |
35
- | [Tasks and usage](https://adecore.dev/agent-contracts/tasks-and-usage) | Tasks, worktrees, token totals, summaries and plan limits |
34
+ | [Providers and models](https://adecore.dev/agent-contracts/providers) | Agent kinds, model catalogs, capabilities and runtime modes |
35
+ | [Accounts](https://adecore.dev/agent-contracts/accounts) | Provider accounts and sign-ins |
36
+ | [Tasks and worktrees](https://adecore.dev/agent-contracts/tasks) | Tasks and worktrees |
37
+ | [Usage](https://adecore.dev/agent-contracts/usage) | Token totals, summaries and plan limits |
36
38
 
37
39
  ## License
38
40
 
package/dist/model.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { AgentKindSchema } from './agent.js';
3
- // Options a model exposes (effort, context window, thinking). Generic descriptors instead of
4
- // per-provider enums: a new model is a catalog entry, not a code change.
3
+ // Options a model exposes (effort, context window, thinking). Generic descriptors rather than
4
+ // per-provider enums, so a new model needs a catalog entry and no code change.
5
5
  export const ModelOptionChoiceSchema = z.object({
6
6
  id: z.string().min(1),
7
7
  label: z.string(),
@@ -79,7 +79,7 @@ export const ModelCatalogDataSchema = z
79
79
  // The thread's permission policy, one vocabulary for every provider; each adapter maps it.
80
80
  export const RuntimeModeSchema = z.enum(['supervised', 'auto-accept-edits', 'auto', 'full-access']);
81
81
  // What a provider's CLI can do, so a client never offers what it would drop and the daemon
82
- // never asks for what the protocol has no room for. Read by the composer and the thread rows.
82
+ // never asks for what the protocol has no room for.
83
83
  export const ProviderCapabilitiesSchema = z.object({
84
84
  // Where this CLI can be opened: as a chat node, as a terminal node, or both.
85
85
  chat: z.boolean(),
@@ -169,9 +169,9 @@ export const ProviderListResultSchema = z.object({
169
169
  providers: z.array(ProviderInfoSchema)
170
170
  });
171
171
  /*
172
- * Fills a provider's resume template; the id is quoted so a shell takes it as one word. `{flags}` is
173
- * a word of its own rather than a substring, since it stands for none, one or several words and a
174
- * substitution would leave a double space behind where a launch carries no flags at all.
172
+ * Fills a provider's resume template and quotes the id, so a shell takes it as one word. `{flags}`
173
+ * must be a word of its own. It stands for zero or more words, so replacing it as a substring would
174
+ * leave a double space where a launch carries no flags.
175
175
  */
176
176
  export function resumeCommandFor(template, agentSessionId, flags = []) {
177
177
  const id = `'${agentSessionId.replaceAll("'", `'\\''`)}'`;
package/dist/visual.js CHANGED
@@ -612,9 +612,9 @@ function hasViewport(html) {
612
612
  return false;
613
613
  }
614
614
  /*
615
- * The page with the bootstrap at the very start of its head: a charset, a viewport when the page has
616
- * none, the theme and its base stylesheet, and the script that applies a theme, reports the size and
617
- * opens links outside the frame. Written into the stored page once, at publish.
615
+ * The page with the bootstrap at the start of its head. The bootstrap holds a charset, a viewport when
616
+ * the page has none, the theme and its base stylesheet, and the script that applies a theme, reports
617
+ * the size and opens links outside the frame. The host writes it into the stored page once, at publish.
618
618
  */
619
619
  export function injectVisualBootstrap(html) {
620
620
  const place = bootstrapPlace(html);
@@ -647,7 +647,7 @@ window.parent.postMessage({ jsonrpc: '2.0', method: methods.ready }, '*');
647
647
  * The sandbox host page: the first document of every frame a visual is drawn in, which an app serves
648
648
  * as UTF-8 HTML with its policy as a header, on another origin or on its own behind a `sandbox`
649
649
  * policy. It says it listens, becomes the first page its parent sends, once, and ignores every other
650
- * message. The page runs in this very document, so the policy this page was served with is the
651
- * page's policy too.
650
+ * message. The page runs in this same document, so it inherits the policy the host page was served
651
+ * with.
652
652
  */
653
653
  export const VISUAL_HOST_PAGE = `<!doctype html>\n<html><head><meta charset="utf-8"><script>${hostPageScript()}</script></head><body></body></html>\n`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/agent-contracts",
3
- "version": "0.54.2",
3
+ "version": "0.54.3",
4
4
  "description": "Schemas and port contracts for agent chats, provider accounts, models and usage.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -81,8 +81,8 @@
81
81
  "test": "bun --conditions=source test"
82
82
  },
83
83
  "dependencies": {
84
- "@adecore/intelligent-ui": "0.54.2",
85
- "@adecore/utils": "0.54.2",
84
+ "@adecore/intelligent-ui": "0.54.3",
85
+ "@adecore/utils": "0.54.3",
86
86
  "zod": "^4.6.7"
87
87
  },
88
88
  "devDependencies": {
package/src/model.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  import { AgentKindSchema, type AgentKind } from './agent.ts';
3
3
 
4
- // Options a model exposes (effort, context window, thinking). Generic descriptors instead of
5
- // per-provider enums: a new model is a catalog entry, not a code change.
4
+ // Options a model exposes (effort, context window, thinking). Generic descriptors rather than
5
+ // per-provider enums, so a new model needs a catalog entry and no code change.
6
6
  export const ModelOptionChoiceSchema = z.object({
7
7
  id: z.string().min(1),
8
8
  label: z.string(),
@@ -97,7 +97,7 @@ export const RuntimeModeSchema = z.enum(['supervised', 'auto-accept-edits', 'aut
97
97
  export type RuntimeMode = z.infer<typeof RuntimeModeSchema>;
98
98
 
99
99
  // What a provider's CLI can do, so a client never offers what it would drop and the daemon
100
- // never asks for what the protocol has no room for. Read by the composer and the thread rows.
100
+ // never asks for what the protocol has no room for.
101
101
  export const ProviderCapabilitiesSchema = z.object({
102
102
  // Where this CLI can be opened: as a chat node, as a terminal node, or both.
103
103
  chat: z.boolean(),
@@ -217,9 +217,9 @@ export const ProviderListResultSchema = z.object({
217
217
  export type ProviderListResult = z.infer<typeof ProviderListResultSchema>;
218
218
 
219
219
  /*
220
- * Fills a provider's resume template; the id is quoted so a shell takes it as one word. `{flags}` is
221
- * a word of its own rather than a substring, since it stands for none, one or several words and a
222
- * substitution would leave a double space behind where a launch carries no flags at all.
220
+ * Fills a provider's resume template and quotes the id, so a shell takes it as one word. `{flags}`
221
+ * must be a word of its own. It stands for zero or more words, so replacing it as a substring would
222
+ * leave a double space where a launch carries no flags.
223
223
  */
224
224
  export function resumeCommandFor(template: string, agentSessionId: string, flags: string[] = []): string {
225
225
  const id = `'${agentSessionId.replaceAll("'", `'\\''`)}'`;
package/src/visual.ts CHANGED
@@ -757,9 +757,9 @@ function hasViewport(html: string): boolean {
757
757
  }
758
758
 
759
759
  /*
760
- * The page with the bootstrap at the very start of its head: a charset, a viewport when the page has
761
- * none, the theme and its base stylesheet, and the script that applies a theme, reports the size and
762
- * opens links outside the frame. Written into the stored page once, at publish.
760
+ * The page with the bootstrap at the start of its head. The bootstrap holds a charset, a viewport when
761
+ * the page has none, the theme and its base stylesheet, and the script that applies a theme, reports
762
+ * the size and opens links outside the frame. The host writes it into the stored page once, at publish.
763
763
  */
764
764
  export function injectVisualBootstrap(html: string): string {
765
765
  const place = bootstrapPlace(html);
@@ -796,7 +796,7 @@ window.parent.postMessage({ jsonrpc: '2.0', method: methods.ready }, '*');
796
796
  * The sandbox host page: the first document of every frame a visual is drawn in, which an app serves
797
797
  * as UTF-8 HTML with its policy as a header, on another origin or on its own behind a `sandbox`
798
798
  * policy. It says it listens, becomes the first page its parent sends, once, and ignores every other
799
- * message. The page runs in this very document, so the policy this page was served with is the
800
- * page's policy too.
799
+ * message. The page runs in this same document, so it inherits the policy the host page was served
800
+ * with.
801
801
  */
802
802
  export const VISUAL_HOST_PAGE = `<!doctype html>\n<html><head><meta charset="utf-8"><script>${hostPageScript()}</script></head><body></body></html>\n`;