@cotal-ai/acp 0.0.0-bootstrap.0 → 0.175.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mesh.d.ts","sourceRoot":"","sources":["../src/mesh.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,oEAAoE;AACpE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,kFAAkF;IAClF,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;CAC1C;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,8CAA8C;AAC9C,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB;iEAC6D;IAC7D,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,+DAA+D;AAC/D,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,+DAA+D;IAC/D,QAAQ,CAAC,iBA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QAAQ,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACrC;4BACwB;IACxB,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACpD;wEACoE;IACpE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACxD,mEAAmE;IACnE,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/C,6CAA6C;IAC7C,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3B,uDAAuD;IACvD,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC;0EACsE;IACtE,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC;iGAC6F;IAC7F,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,iFAAiF;IACjF,YAAY,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAC9D,2EAA2E;IAC3E,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IAClD;kBACc;IACd,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC5C,MAAM,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACjC,QAAQ,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB"}
package/dist/mesh.js ADDED
@@ -0,0 +1,25 @@
1
+ /**
2
+ * What the ACP agent needs from a Cotal space, as one interface. The protocol layer in `agent.ts`
3
+ * depends on this and on nothing else in the repo, so a smoke can drive it with a fake space and
4
+ * `live-mesh.ts` binds it to a real one.
5
+ */
6
+ /** Opening the space needs the operator to sign in first. Any other failure to open is not this. */
7
+ export class SignInRequired extends Error {
8
+ name = "SignInRequired";
9
+ }
10
+ /** The caller may not read a manager's launch lists, its applications, models and personas: a person
11
+ * whose grant does not let them spawn agents. They still control the agents they have. */
12
+ export class LaunchListsRefused extends Error {
13
+ name = "LaunchListsRefused";
14
+ }
15
+ /** No manager may start a new agent for the caller, as when none of a person's registered managers is
16
+ * live. The agents they have stay listed and controllable. The message says why. */
17
+ export class NoLaunchManager extends Error {
18
+ name = "NoLaunchManager";
19
+ }
20
+ /** What a person on a space where people sign in can do about a registered manager that does not
21
+ * answer. Its registration stays listed until it is removed, as `cotal ps` says. */
22
+ export function deregisterRemedy(space, instanceIds) {
23
+ return `For a computer that is gone, ask the space's auth service to remove your registration. Removing it needs the \`supervise\` scope: ${instanceIds.map((id) => `\`cotal endpoint deregister manager ${id} --space ${space} --yes\``).join(", ")}.`;
24
+ }
25
+ //# sourceMappingURL=mesh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mesh.js","sourceRoot":"","sources":["../src/mesh.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyFH,oGAAoG;AACpG,MAAM,OAAO,cAAe,SAAQ,KAAK;IACrB,IAAI,GAAG,gBAAgB,CAAC;CAC3C;AAED;2FAC2F;AAC3F,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IACzB,IAAI,GAAG,oBAAoB,CAAC;CAC/C;AAED;qFACqF;AACrF,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACtB,IAAI,GAAG,iBAAiB,CAAC;CAC5C;AAED;qFACqF;AACrF,MAAM,UAAU,gBAAgB,CAAC,KAAa,EAAE,WAA8B;IAC5E,OAAO,qIAAqI,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,uCAAuC,EAAE,YAAY,KAAK,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AAC1P,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * A session's config options, built from what the managers offer.
3
+ *
4
+ * The model select lists `<agent>/<model>` grouped by agent, with a `<agent>/default` choice for
5
+ * the application's own default. A client must be able to select the default again after a named
6
+ * model ran, so it is a real choice rather than an absent value. Applications without an event
7
+ * plane are not offered: the bridge reads a seat's turns from that plane and has nothing to show
8
+ * without it. A model the catalog does not list is accepted as a custom id, as a client's own model
9
+ * field sends it, and the manager validates it at launch.
10
+ */
11
+ import type { SessionConfigOption } from "@agentclientprotocol/sdk";
12
+ import type { AgentCatalog, ManagerChoice } from "./mesh.js";
13
+ /** The value of a model choice that leaves the model to the application. */
14
+ export declare const DEFAULT_MODEL = "default";
15
+ /** The value of a variant choice that leaves the variant to the model. */
16
+ export declare const DEFAULT_VARIANT = "default";
17
+ /** The value of a persona choice that uses the manager's default persona. */
18
+ export declare const DEFAULT_PERSONA = "default";
19
+ /** The value of a channel choice that subscribes the new seat to no extra channel. */
20
+ export declare const NO_CHANNEL = "none";
21
+ /** A client caps a select at this many choices (T3 Code's limit). A list that does not fit is not
22
+ * offered rather than cut. */
23
+ export declare const MAX_CHOICES = 64;
24
+ export interface Selection {
25
+ /** `<agent>/<model>`, where the model may be {@link DEFAULT_MODEL}. */
26
+ model: string;
27
+ variant: string;
28
+ persona: string;
29
+ /** A channel the new seat subscribes to, or {@link NO_CHANNEL}. */
30
+ channel: string;
31
+ /** A manager instance id, or undefined for the space's own choice. */
32
+ machine?: string;
33
+ }
34
+ export interface Offer {
35
+ readonly catalogs: readonly AgentCatalog[];
36
+ readonly personas: readonly string[];
37
+ readonly channels: readonly string[];
38
+ readonly managers: readonly ManagerChoice[];
39
+ readonly defaultAgent?: string;
40
+ /** The thread opened without the launch lists: it drives the agent it loaded, offers only that
41
+ * agent's model, and cannot start another. */
42
+ readonly seatOnly?: boolean;
43
+ }
44
+ /** Split a model choice into its application and model. */
45
+ export declare function parseModel(value: string): {
46
+ agent: string;
47
+ model?: string;
48
+ };
49
+ /** The applications a session can run: available and with an event plane. */
50
+ export declare function usable(catalogs: readonly AgentCatalog[]): AgentCatalog[];
51
+ /** Why `agent` cannot run a session, or undefined when it can. */
52
+ export declare function refusal(catalogs: readonly AgentCatalog[], agent: string): string | undefined;
53
+ /** The manager a new session starts on: this machine's, else one whose presence is current, else the
54
+ * first listed. A registration whose computer is gone stays listed on a space where people sign in,
55
+ * so sort order alone could choose it. Leaving it unpinned would let the space's exchange choose,
56
+ * and that refuses when several of a person's own managers are live. */
57
+ export declare function defaultManager(managers: readonly ManagerChoice[]): ManagerChoice | undefined;
58
+ /** The selection a new session starts with. */
59
+ export declare function initialSelection(offer: Offer): Selection;
60
+ /** A selection made against one manager, carried to another manager's offer. A choice the new
61
+ * manager does not offer returns to its default. Throws when the new manager offers no application. */
62
+ export declare function reconcile(offer: Offer, selection: Selection): Selection;
63
+ /** Apply one `session/set_config_option` to a selection. Throws on a value the offer does not hold. */
64
+ export declare function applyOption(offer: Offer, selection: Selection, configId: string, value: string): Selection;
65
+ /** The full option set for a selection. Every reply that changes an option carries all of them. */
66
+ export declare function configOptions(offer: Offer, selection: Selection): SessionConfigOption[];
67
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE7D,4EAA4E;AAC5E,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,0EAA0E;AAC1E,eAAO,MAAM,eAAe,YAAY,CAAC;AACzC,6EAA6E;AAC7E,eAAO,MAAM,eAAe,YAAY,CAAC;AACzC,sFAAsF;AACtF,eAAO,MAAM,UAAU,SAAS,CAAC;AACjC;+BAC+B;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,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,SAAS,CAQvE;AAED,uGAAuG;AACvG,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CA0B1G;AAED,mGAAmG;AACnG,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,mBAAmB,EAAE,CAuDvF"}
@@ -0,0 +1,160 @@
1
+ /** The value of a model choice that leaves the model to the application. */
2
+ export const DEFAULT_MODEL = "default";
3
+ /** The value of a variant choice that leaves the variant to the model. */
4
+ export const DEFAULT_VARIANT = "default";
5
+ /** The value of a persona choice that uses the manager's default persona. */
6
+ export const DEFAULT_PERSONA = "default";
7
+ /** The value of a channel choice that subscribes the new seat to no extra channel. */
8
+ export const NO_CHANNEL = "none";
9
+ /** A client caps a select at this many choices (T3 Code's limit). A list that does not fit is not
10
+ * offered rather than cut. */
11
+ export const MAX_CHOICES = 64;
12
+ /** Split a model choice into its application and model. */
13
+ export function parseModel(value) {
14
+ const slash = value.indexOf("/");
15
+ if (slash <= 0 || slash === value.length - 1)
16
+ throw new Error(`model "${value}" is not <agent>/<model>`);
17
+ const agent = value.slice(0, slash);
18
+ const model = value.slice(slash + 1);
19
+ return { agent, ...(model === DEFAULT_MODEL ? {} : { model }) };
20
+ }
21
+ /** The applications a session can run: available and with an event plane. */
22
+ export function usable(catalogs) {
23
+ return catalogs.filter((c) => c.available && c.eventPlane);
24
+ }
25
+ /** Why `agent` cannot run a session, or undefined when it can. */
26
+ export function refusal(catalogs, agent) {
27
+ const catalog = catalogs.find((c) => c.agent === agent);
28
+ if (!catalog)
29
+ return `the manager offers no application named "${agent}"`;
30
+ if (!catalog.available)
31
+ return `${agent} is not available on the manager's host${catalog.reason ? `: ${catalog.reason}` : ""}`;
32
+ if (!catalog.eventPlane)
33
+ return `${agent} publishes no event plane, so its turns cannot be shown here`;
34
+ return undefined;
35
+ }
36
+ /** The manager a new session starts on: this machine's, else one whose presence is current, else the
37
+ * first listed. A registration whose computer is gone stays listed on a space where people sign in,
38
+ * so sort order alone could choose it. Leaving it unpinned would let the space's exchange choose,
39
+ * and that refuses when several of a person's own managers are live. */
40
+ export function defaultManager(managers) {
41
+ return managers.find((m) => m.local) ?? managers.find((m) => m.live) ?? managers[0];
42
+ }
43
+ /** The selection a new session starts with. */
44
+ export function initialSelection(offer) {
45
+ const apps = usable(offer.catalogs);
46
+ const agent = apps.find((c) => c.agent === offer.defaultAgent) ?? apps[0];
47
+ if (!agent) {
48
+ const reasons = offer.catalogs.map((c) => `${c.agent}: ${refusal(offer.catalogs, c.agent)}`);
49
+ throw new Error(`no application can run a session${reasons.length ? ` (${reasons.join("; ")})` : ": the manager offers none"}`);
50
+ }
51
+ const machine = defaultManager(offer.managers);
52
+ return { model: `${agent.agent}/${DEFAULT_MODEL}`, variant: DEFAULT_VARIANT, persona: DEFAULT_PERSONA, channel: NO_CHANNEL, ...(machine ? { machine: machine.instanceId } : {}) };
53
+ }
54
+ function variantsOf(offer, selection) {
55
+ const { agent, model } = parseModel(selection.model);
56
+ if (model === undefined)
57
+ return [];
58
+ return offer.catalogs.find((c) => c.agent === agent)?.models.find((m) => m.id === model)?.variants ?? [];
59
+ }
60
+ /** A selection made against one manager, carried to another manager's offer. A choice the new
61
+ * manager does not offer returns to its default. Throws when the new manager offers no application. */
62
+ export function reconcile(offer, selection) {
63
+ const { agent } = parseModel(selection.model);
64
+ const next = refusal(offer.catalogs, agent) ? { ...selection, model: initialSelection(offer).model } : selection;
65
+ return {
66
+ ...next,
67
+ variant: next.variant === DEFAULT_VARIANT || variantsOf(offer, next).includes(next.variant) ? next.variant : DEFAULT_VARIANT,
68
+ persona: next.persona === DEFAULT_PERSONA || offer.personas.includes(next.persona) ? next.persona : DEFAULT_PERSONA,
69
+ };
70
+ }
71
+ /** Apply one `session/set_config_option` to a selection. Throws on a value the offer does not hold. */
72
+ export function applyOption(offer, selection, configId, value) {
73
+ switch (configId) {
74
+ case "model": {
75
+ const { agent } = parseModel(value);
76
+ const why = refusal(offer.catalogs, agent);
77
+ if (why)
78
+ throw new Error(why);
79
+ const next = { ...selection, model: value };
80
+ // A variant belongs to one model; it does not carry to another.
81
+ return variantsOf(offer, next).includes(selection.variant) ? next : { ...next, variant: DEFAULT_VARIANT };
82
+ }
83
+ case "variant":
84
+ if (value !== DEFAULT_VARIANT && !variantsOf(offer, selection).includes(value))
85
+ throw new Error(`the selected model has no variant "${value}"`);
86
+ return { ...selection, variant: value };
87
+ case "persona":
88
+ if (value !== DEFAULT_PERSONA && !offer.personas.includes(value))
89
+ throw new Error(`the manager's catalog has no persona "${value}"`);
90
+ return { ...selection, persona: value };
91
+ case "channel":
92
+ if (value !== NO_CHANNEL && !offer.channels.includes(value))
93
+ throw new Error(`the space has no channel "${value}"`);
94
+ return { ...selection, channel: value };
95
+ case "machine":
96
+ if (!offer.managers.some((m) => m.instanceId === value))
97
+ throw new Error(`no manager "${value}" is live`);
98
+ return { ...selection, machine: value };
99
+ default:
100
+ throw new Error(`unknown config option "${configId}"`);
101
+ }
102
+ }
103
+ /** The full option set for a selection. Every reply that changes an option carries all of them. */
104
+ export function configOptions(offer, selection) {
105
+ const options = [{
106
+ id: "model",
107
+ name: "Model",
108
+ category: "model",
109
+ type: "select",
110
+ currentValue: selection.model,
111
+ options: usable(offer.catalogs).map((c) => {
112
+ // A seat-only thread offers the model its agent runs, and the default only when it names none.
113
+ const choices = [
114
+ ...(offer.seatOnly && c.models.length > 0 ? [] : [{ value: `${c.agent}/${DEFAULT_MODEL}`, name: `${c.agent} default` }]),
115
+ ...c.models.map((m) => ({ value: `${c.agent}/${m.id}`, name: m.name ?? m.id })),
116
+ ];
117
+ // The current value is always a choice, a custom id included.
118
+ if (parseModel(selection.model).agent === c.agent && !choices.some((o) => o.value === selection.model))
119
+ choices.push({ value: selection.model, name: selection.model.slice(c.agent.length + 1) });
120
+ return { group: c.agent, name: c.agent, options: choices };
121
+ }),
122
+ }];
123
+ const variants = variantsOf(offer, selection);
124
+ if (variants.length && variants.length < MAX_CHOICES)
125
+ options.push({
126
+ id: "variant",
127
+ name: "Reasoning",
128
+ category: "thought_level",
129
+ type: "select",
130
+ currentValue: selection.variant,
131
+ options: [{ value: DEFAULT_VARIANT, name: "Model default" }, ...variants.map((v) => ({ value: v, name: v }))],
132
+ });
133
+ if (offer.personas.length && offer.personas.length < MAX_CHOICES)
134
+ options.push({
135
+ id: "persona",
136
+ name: "Persona",
137
+ type: "select",
138
+ currentValue: selection.persona,
139
+ options: [{ value: DEFAULT_PERSONA, name: "Default persona" }, ...offer.personas.filter((p) => p !== DEFAULT_PERSONA).map((p) => ({ value: p, name: p }))],
140
+ });
141
+ if (offer.channels.length && offer.channels.length < MAX_CHOICES)
142
+ options.push({
143
+ id: "channel",
144
+ name: "Channel",
145
+ description: "A channel the new agent joins. Applies at spawn.",
146
+ type: "select",
147
+ currentValue: selection.channel,
148
+ options: [{ value: NO_CHANNEL, name: "No channel" }, ...offer.channels.map((c) => ({ value: c, name: `#${c}` }))],
149
+ });
150
+ if (offer.managers.length > 1 && offer.managers.length <= MAX_CHOICES)
151
+ options.push({
152
+ id: "machine",
153
+ name: "Machine",
154
+ type: "select",
155
+ currentValue: selection.machine ?? defaultManager(offer.managers).instanceId,
156
+ options: offer.managers.map((m) => ({ value: m.instanceId, name: `${m.host ?? m.instanceId}${m.local ? " (this machine)" : ""}` })),
157
+ });
158
+ return options;
159
+ }
160
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAaA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC;AACvC,0EAA0E;AAC1E,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,CAAC;AACzC,6EAA6E;AAC7E,MAAM,CAAC,MA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EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;SAClH,CAAC,CAAC;IACL,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,IAAI,WAAW;QACnE,OAAO,CAAC,IAAI,CAAC;YACX,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,QAAQ;YACd,YAAY,EAAE,SAAS,CAAC,OAAO,IAAI,cAAc,CAAC,KAAK,CAAC,QAAQ,CAAE,CAAC,UAAU;YAC7E,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;SACpI,CAAC,CAAC;IACL,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,43 @@
1
1
  {
2
2
  "name": "@cotal-ai/acp",
3
- "version": "0.0.0-bootstrap.0",
4
- "description": "Bootstrap placeholder for configuring npm trusted publishing. Not a functional release.",
3
+ "description": "Cotal as an Agent Client Protocol agent: spawn and manage mesh agents from T3 Code, Zed and other ACP clients.",
4
+ "version": "0.175.0",
5
5
  "license": "Apache-2.0",
6
- "repository": { "type": "git", "url": "git+https://github.com/Cotal-AI/Cotal.git" }
7
- }
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/Cotal-AI/Cotal.git",
9
+ "directory": "implementations/acp"
10
+ },
11
+ "type": "module",
12
+ "main": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js"
18
+ }
19
+ },
20
+ "dependencies": {
21
+ "@agentclientprotocol/sdk": "2.8.0",
22
+ "zod": "^4.4.3"
23
+ },
24
+ "peerDependencies": {
25
+ "@cotal-ai/core": "*",
26
+ "@cotal-ai/workspace": "*"
27
+ },
28
+ "devDependencies": {
29
+ "@cotal-ai/core": "0.175.0",
30
+ "@cotal-ai/workspace": "0.175.0"
31
+ },
32
+ "files": [
33
+ "dist"
34
+ ],
35
+ "publishConfig": {
36
+ "access": "public"
37
+ },
38
+ "scripts": {
39
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.smoke.json",
40
+ "build": "tsc -p tsconfig.json",
41
+ "test": "tsx smoke/agent.smoke.ts && tsx smoke/frames.smoke.ts"
42
+ }
43
+ }