@jsm-mit/agent-platform-canister-package 0.3.0 → 0.4.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/README.md CHANGED
@@ -109,6 +109,38 @@ const settings = await adminActor.getConfigChangeNotificationsAsyncUnsafe(); //
109
109
  await adminActor.setConfigChangeNotificationsAsyncUnsafe(null); // switch off
110
110
  ```
111
111
 
112
+ ### Agent placement: village and tags (0.4.0)
113
+
114
+ Every agent lives in a **village** — the agents-village process that runs it,
115
+ `"Development"` unless placed elsewhere — and wears **tags**, labels the
116
+ dashboard filters by (the canister attaches no meaning to them). Both come back
117
+ on every `AgentConfigView`. On upsert they are optional: left out, a create lands
118
+ in `"Development"` with no tags and an update keeps what is stored, so a caller
119
+ that never heard of villages cannot move an agent. `setAgentTagsAsyncUnsafe`
120
+ replaces the tags alone (the creating app and admins); a different set counts as
121
+ a config change and is reported like any other.
122
+
123
+ ```typescript
124
+ const placed = await agentConfigsActor.upsertAgentConfigAsyncUnsafe({
125
+ id: "kasia",
126
+ name: "Kasia",
127
+ persona: "...",
128
+ disclosesAsAi: true,
129
+ village: "SultanaProd",
130
+ tags: ["salon", "vip"],
131
+ });
132
+ const retagged = await agentConfigsActor.setAgentTagsAsyncUnsafe("kasia", [
133
+ "vip",
134
+ ]);
135
+ const mine = (await agentConfigsActor.listAgentConfigsAsyncUnsafe(500)).filter(
136
+ (c) => c.village === "Development",
137
+ );
138
+ ```
139
+
140
+ Village: 1–50 chars, letters, digits, `-` and `_`, starting with a letter or
141
+ digit. Tag: 1–30 chars, lowercase letters, digits and `-`, starting with a
142
+ letter or digit; at most 20 per agent, no duplicates — `InvalidData` otherwise.
143
+
112
144
  ## Error model
113
145
 
114
146
  Every `...AsyncUnsafe` method throws one of exactly three errors — switch on
@@ -124,8 +156,9 @@ Every `...AsyncUnsafe` method throws one of exactly three errors — switch on
124
156
 
125
157
  ## API
126
158
 
127
- - `AgentConfigsActor` — `upsertAgentConfigAsyncUnsafe`, `getAgentConfigAsyncUnsafe`,
128
- `listAgentConfigsAsyncUnsafe`, `deleteAgentConfigAsyncUnsafe`.
159
+ - `AgentConfigsActor` — `upsertAgentConfigAsyncUnsafe`, `setAgentPersonaAsyncUnsafe`,
160
+ `setAgentTagsAsyncUnsafe`, `getAgentConfigAsyncUnsafe`, `listAgentConfigsAsyncUnsafe`,
161
+ `deleteAgentConfigAsyncUnsafe`.
129
162
  - `ChatHistoryActor` — `appendMessageBatchAsyncUnsafe`, `getConversationHistoryAsyncUnsafe`.
130
163
  - `AdminActor` — admin allowlist and diagnostics: `registerAsAdminAsyncUnsafe`,
131
164
  `addAdminAsyncUnsafe`, `removeAdminAsyncUnsafe`, `getAdminsAsyncUnsafe`,
@@ -140,8 +173,29 @@ Every `...AsyncUnsafe` method throws one of exactly three errors — switch on
140
173
  ## Development
141
174
 
142
175
  See `CLAUDE.md` for the canister-change workflow (declarations sync, wrapper
143
- updates) and the integration-test policy (`npm run test-suite` runs against a
144
- real mainnet test canister — human-run only).
176
+ updates). The scripts below deploy to mainnet and spend cycles — the user runs
177
+ them; Claude never does.
178
+
179
+ - `npm run test-suite` — reinstalls the current canister build into `short-living`,
180
+ the short-lived test canister of `motoko-crafting-table`, with a 3-minute
181
+ lease (no prompt), then runs `tests/test-suite.ts` with `CANISTER_ID` set to
182
+ `short-living`. No `.env`: every identity is generated per run. Tests never touch `backend5`.
183
+ - `npm run test-smoke` — the same, with `tests/test-smoke.ts`: one write and one
184
+ read per domain (~20 seconds). `publish-public` runs it too.
185
+ - `npm run redeploy -- [slot] [reinstall|upgrade] [--force] [--wipe]` — deploys
186
+ the canister build without tests through `../agent-platform-canister`'s
187
+ `craft:upgrade`/`craft:deploy`. Defaults: slot `backend5` (the live agents of
188
+ agents-village), mode **upgrade** (state kept). A reinstall of any slot but
189
+ `short-living` needs `--wipe` and prints the restore steps (`registerAsAdmin`,
190
+ `addAdmin` the village, `addApp` Sultana core, `setConfigChangeNotifications`).
191
+ - `npm run publish-public` — bump the version by hand (uncommitted), then run it
192
+ from `master`. It checks both repos are on a clean `master` equal to
193
+ `origin/master` and the version is unpublished, reinstalls the canister master
194
+ into `short-living` (lease 2 minutes) and refuses unless the candid `short-living` serves
195
+ equals the committed `declarations/` and the smoke test passes against that
196
+ deploy. Then it stamps the canister commit
197
+ into `package.json`, builds, publishes and commits "Version bump to
198
+ <version>".
145
199
 
146
200
  ## Requirements
147
201
 
@@ -6,7 +6,9 @@ type UpsertAgentConfigArgs =
6
6
  name: text;
7
7
  owner: opt principal;
8
8
  persona: text;
9
+ tags: opt vec text;
9
10
  tools: vec ToolBinding;
11
+ village: opt text;
10
12
  };
11
13
  type ToolBinding =
12
14
  record {
@@ -16,6 +18,11 @@ type ToolBinding =
16
18
  type SetConfigChangeNotificationsArgs = record {
17
19
  settings:
18
20
  opt ConfigChangeNotifications;};
21
+ type SetAgentTagsArgs =
22
+ record {
23
+ agentId: AgentId;
24
+ tags: vec text;
25
+ };
19
26
  type SetAgentPersonaArgs =
20
27
  record {
21
28
  agentId: AgentId;
@@ -120,8 +127,10 @@ type AgentConfigView =
120
127
  name: text;
121
128
  owner: opt principal;
122
129
  persona: text;
130
+ tags: vec text;
123
131
  tools: vec ToolBinding;
124
132
  updatedAt: int;
133
+ village: text;
125
134
  };
126
135
  service : {
127
136
  addAdmin: ("principal": principal) -> (Result_1);
@@ -144,6 +153,8 @@ service : {
144
153
  /// The one field an agent's owner may change — the salon owner editing what their
145
154
  /// receptionist says. Admins and the creating app may use it too.
146
155
  setAgentPersona: (args: SetAgentPersonaArgs) -> (Result);
156
+ /// Replaces the tags an agent wears. Admins and the app that created the agent.
157
+ setAgentTags: (args: SetAgentTagsArgs) -> (Result);
147
158
  /// Where agent configuration changes are reported; null switches the reports off. Admin only.
148
159
  setConfigChangeNotifications: (args: SetConfigChangeNotificationsArgs) ->
149
160
  (Result_2);
@@ -9,8 +9,10 @@ export interface AgentConfigView {
9
9
  'name' : string,
10
10
  'createdAt' : bigint,
11
11
  'createdBy' : [] | [Principal],
12
+ 'tags' : Array<string>,
12
13
  'updatedAt' : bigint,
13
14
  'persona' : string,
15
+ 'village' : string,
14
16
  'disclosesAsAi' : boolean,
15
17
  'customConfigJson' : [] | [string],
16
18
  }
@@ -66,6 +68,10 @@ export type Result_6 = { 'ok' : Array<Principal> } |
66
68
  export type Result_7 = { 'ok' : null } |
67
69
  { 'err' : Error };
68
70
  export interface SetAgentPersonaArgs { 'agentId' : AgentId, 'persona' : string }
71
+ export interface SetAgentTagsArgs {
72
+ 'tags' : Array<string>,
73
+ 'agentId' : AgentId,
74
+ }
69
75
  export interface SetConfigChangeNotificationsArgs {
70
76
  'settings' : [] | [ConfigChangeNotifications],
71
77
  }
@@ -75,7 +81,9 @@ export interface UpsertAgentConfigArgs {
75
81
  'tools' : Array<ToolBinding>,
76
82
  'owner' : [] | [Principal],
77
83
  'name' : string,
84
+ 'tags' : [] | [Array<string>],
78
85
  'persona' : string,
86
+ 'village' : [] | [string],
79
87
  'disclosesAsAi' : boolean,
80
88
  'customConfigJson' : [] | [string],
81
89
  }
@@ -106,6 +114,10 @@ export interface _SERVICE {
106
114
  * / receptionist says. Admins and the creating app may use it too.
107
115
  */
108
116
  'setAgentPersona' : ActorMethod<[SetAgentPersonaArgs], Result>,
117
+ /**
118
+ * / Replaces the tags an agent wears. Admins and the app that created the agent.
119
+ */
120
+ 'setAgentTags' : ActorMethod<[SetAgentTagsArgs], Result>,
109
121
  /**
110
122
  * / Where agent configuration changes are reported; null switches the reports off. Admin only.
111
123
  */
@@ -49,8 +49,10 @@ export const idlFactory = ({ IDL }) => {
49
49
  'name' : IDL.Text,
50
50
  'createdAt' : IDL.Int,
51
51
  'createdBy' : IDL.Opt(IDL.Principal),
52
+ 'tags' : IDL.Vec(IDL.Text),
52
53
  'updatedAt' : IDL.Int,
53
54
  'persona' : IDL.Text,
55
+ 'village' : IDL.Text,
54
56
  'disclosesAsAi' : IDL.Bool,
55
57
  'customConfigJson' : IDL.Opt(IDL.Text),
56
58
  });
@@ -77,6 +79,10 @@ export const idlFactory = ({ IDL }) => {
77
79
  'agentId' : AgentId,
78
80
  'persona' : IDL.Text,
79
81
  });
82
+ const SetAgentTagsArgs = IDL.Record({
83
+ 'tags' : IDL.Vec(IDL.Text),
84
+ 'agentId' : AgentId,
85
+ });
80
86
  const SetConfigChangeNotificationsArgs = IDL.Record({
81
87
  'settings' : IDL.Opt(ConfigChangeNotifications),
82
88
  });
@@ -85,7 +91,9 @@ export const idlFactory = ({ IDL }) => {
85
91
  'tools' : IDL.Vec(ToolBinding),
86
92
  'owner' : IDL.Opt(IDL.Principal),
87
93
  'name' : IDL.Text,
94
+ 'tags' : IDL.Opt(IDL.Vec(IDL.Text)),
88
95
  'persona' : IDL.Text,
96
+ 'village' : IDL.Opt(IDL.Text),
89
97
  'disclosesAsAi' : IDL.Bool,
90
98
  'customConfigJson' : IDL.Opt(IDL.Text),
91
99
  });
@@ -110,6 +118,7 @@ export const idlFactory = ({ IDL }) => {
110
118
  'removeAdmin' : IDL.Func([IDL.Principal], [Result_1], []),
111
119
  'removeApp' : IDL.Func([AppArgs], [Result_1], []),
112
120
  'setAgentPersona' : IDL.Func([SetAgentPersonaArgs], [Result], []),
121
+ 'setAgentTags' : IDL.Func([SetAgentTagsArgs], [Result], []),
113
122
  'setConfigChangeNotifications' : IDL.Func(
114
123
  [SetConfigChangeNotificationsArgs],
115
124
  [Result_2],
@@ -6,15 +6,31 @@ export declare class AgentConfigsActor extends ActorBase {
6
6
  constructor(canisterId: string, identity?: Identity);
7
7
  /**
8
8
  * Creates the config on first write, otherwise updates it in place —
9
- * `createdAt` is preserved across an update. Admin only.
9
+ * `createdAt` is preserved across an update. Admins and registered apps create;
10
+ * an update belongs to the creating app or an admin.
10
11
  * @param input - The full desired config; `id` decides create-vs-update. `tools`
11
- * defaults to [] (a tool-less agent) when omitted.
12
+ * defaults to [] (a tool-less agent) when omitted. `village` and `tags` left out keep
13
+ * what is stored (the defaults on a create).
12
14
  * @returns The stored config as it now stands.
13
15
  * @throws Error with message `CanisterError` when the canister returns a business error (not authorized, or `InvalidData` — a bounded field was too long/too many entries). Examine "cause" for {errorKey, errorMessage, logs}.
14
16
  * @throws Error with message `CriticalCanisterError` when there is no communication with the canister or the canister code traps during execution.
15
17
  * @throws Error with message `CallRefusedAtInspectionStage` when the canister's `inspect` rejects the call before execution.
16
18
  */
17
19
  upsertAgentConfigAsyncUnsafe(input: UpsertAgentConfigInput): Promise<AgentConfigView>;
20
+ /**
21
+ * Replaces every tag the agent wears. Tags decide nothing about how the agent runs —
22
+ * the dashboard filters by them — but a different set moves `updatedAt` and is
23
+ * reported to config-change listeners like any other change; the same set again
24
+ * changes nothing.
25
+ *
26
+ * Allowed for the app that created the agent and canister admins.
27
+ * @param tags - Each 1–30 chars, lowercase letters, digits and `-`, starting with a
28
+ * letter or digit; at most 20, no duplicates.
29
+ * @throws Error with message `CanisterError` when the canister returns a business error (`NotAuthorized` for anybody else, `NotFound`, `InvalidData` for a malformed tag, a duplicate or too many). Examine "cause" for {errorKey, errorMessage, logs}.
30
+ * @throws Error with message `CriticalCanisterError` when there is no communication with the canister or the canister code traps during execution.
31
+ * @throws Error with message `CallRefusedAtInspectionStage` when the canister's `inspect` rejects the call before execution.
32
+ */
33
+ setAgentTagsAsyncUnsafe(agentId: string, tags: string[]): Promise<AgentConfigView>;
18
34
  /**
19
35
  * Changes what the agent says it is — the one field its owner may touch. A full
20
36
  * upsert belongs to the app that created the agent, because it would also re-point
@@ -1 +1 @@
1
- {"version":3,"file":"agent-configs-actor.d.ts","sourceRoot":"","sources":["../../src/actors/agent-configs-actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAGhF,6DAA6D;AAC7D,qBAAa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AM,GAChB,OAAO,CAAC,eAAe,CAAC;IAO3B;;;;;;OAMG;IACU,yBAAyB,CAClC,EAAE,EAAE,MAAM,GACX,OAAO,CAAC,eAAe,CAAC;IAO3B;;;;;;;OAOG;IACU,2BAA2B,CACpC,KAAK,EAAE,MAAM,GACd,OAAO,CAAC,eAAe,EAAE,CAAC;IAO7B;;;;;;OAMG;IACU,4BAA4B,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAKvE"}
@@ -9,9 +9,11 @@ export class AgentConfigsActor extends ActorBase {
9
9
  }
10
10
  /**
11
11
  * Creates the config on first write, otherwise updates it in place —
12
- * `createdAt` is preserved across an update. Admin only.
12
+ * `createdAt` is preserved across an update. Admins and registered apps create;
13
+ * an update belongs to the creating app or an admin.
13
14
  * @param input - The full desired config; `id` decides create-vs-update. `tools`
14
- * defaults to [] (a tool-less agent) when omitted.
15
+ * defaults to [] (a tool-less agent) when omitted. `village` and `tags` left out keep
16
+ * what is stored (the defaults on a create).
15
17
  * @returns The stored config as it now stands.
16
18
  * @throws Error with message `CanisterError` when the canister returns a business error (not authorized, or `InvalidData` — a bounded field was too long/too many entries). Examine "cause" for {errorKey, errorMessage, logs}.
17
19
  * @throws Error with message `CriticalCanisterError` when there is no communication with the canister or the canister code traps during execution.
@@ -26,9 +28,28 @@ export class AgentConfigsActor extends ActorBase {
26
28
  tools: input.tools ?? [],
27
29
  customConfigJson: toOpt(input.customConfigJson),
28
30
  owner: toOpt(input.owner ? Principal.fromText(input.owner) : undefined),
31
+ village: toOpt(input.village),
32
+ tags: toOpt(input.tags),
29
33
  }));
30
34
  return mapAgentConfigView(config);
31
35
  }
36
+ /**
37
+ * Replaces every tag the agent wears. Tags decide nothing about how the agent runs —
38
+ * the dashboard filters by them — but a different set moves `updatedAt` and is
39
+ * reported to config-change listeners like any other change; the same set again
40
+ * changes nothing.
41
+ *
42
+ * Allowed for the app that created the agent and canister admins.
43
+ * @param tags - Each 1–30 chars, lowercase letters, digits and `-`, starting with a
44
+ * letter or digit; at most 20, no duplicates.
45
+ * @throws Error with message `CanisterError` when the canister returns a business error (`NotAuthorized` for anybody else, `NotFound`, `InvalidData` for a malformed tag, a duplicate or too many). Examine "cause" for {errorKey, errorMessage, logs}.
46
+ * @throws Error with message `CriticalCanisterError` when there is no communication with the canister or the canister code traps during execution.
47
+ * @throws Error with message `CallRefusedAtInspectionStage` when the canister's `inspect` rejects the call before execution.
48
+ */
49
+ async setAgentTagsAsyncUnsafe(agentId, tags) {
50
+ const config = await this.executeFunctionAsyncUnsafe(() => this.actor.setAgentTags({ agentId, tags }));
51
+ return mapAgentConfigView(config);
52
+ }
32
53
  /**
33
54
  * Changes what the agent says it is — the one field its owner may touch. A full
34
55
  * upsert belongs to the app that created the agent, because it would also re-point
@@ -45,6 +45,13 @@ export interface AgentConfigView {
45
45
  createdBy?: string;
46
46
  /** The person allowed to change the agent's words (and nothing else). */
47
47
  owner?: string;
48
+ /** The agents-village process that runs this agent — "Development" unless it was
49
+ * placed elsewhere (a second village, e.g. Sultana's production, shares the canister
50
+ * and runs only what is placed in it). */
51
+ village: string;
52
+ /** Labels the dashboard filters by; the canister attaches no meaning to them. Empty
53
+ * unless set. */
54
+ tags: string[];
48
55
  /** Nanoseconds since epoch */
49
56
  createdAt: bigint;
50
57
  /** Nanoseconds since epoch */
@@ -77,5 +84,14 @@ export interface UpsertAgentConfigInput {
77
84
  customConfigJson?: string;
78
85
  /** Read only when the agent is CREATED: the person who may change its words later. */
79
86
  owner?: string;
87
+ /** The village that runs the agent. Omitted: the stored village stays on an update,
88
+ * a create lands in "Development" — a caller that never heard of villages cannot
89
+ * move an agent. 1–50 chars, letters, digits, `-` and `_`, starting with a letter
90
+ * or digit. */
91
+ village?: string;
92
+ /** Omitted: the stored tags stay on an update, a create gets none. Each 1–30 chars,
93
+ * lowercase letters, digits and `-`, starting with a letter or digit; at most 20,
94
+ * no duplicates. */
95
+ tags?: string[];
80
96
  }
81
97
  //# sourceMappingURL=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jB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,eAAe,CAQxE;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,iBAAiB,GAAG,eAAe,CAe7E;AAED,wBAAgB,oCAAoC,CAChD,QAAQ,EAAE,EAAE,GAAG,CAAC,+BAA+B,CAAC,GACjD,iCAAiC,GAAG,IAAI,CAQ1C;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
package/dist/mappers.js CHANGED
@@ -29,6 +29,8 @@ export function mapAgentConfigView(config) {
29
29
  customConfigJson: fromOpt(config.customConfigJson),
30
30
  createdBy: fromOpt(config.createdBy)?.toString(),
31
31
  owner: fromOpt(config.owner)?.toString(),
32
+ village: config.village,
33
+ tags: config.tags,
32
34
  createdAt: config.createdAt,
33
35
  updatedAt: config.updatedAt,
34
36
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsm-mit/agent-platform-canister-package",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Wrapper TypeScript package for the agent-platform-canister canister.",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -25,7 +25,8 @@
25
25
  "publish-public": "bash scripts/publish-public.sh",
26
26
  "typecheck": "tsc --noEmit -p tsconfig.tests.json",
27
27
  "sync-declarations": "bash scripts/sync-declarations.sh",
28
- "test-suite": "bash scripts/run-tests.sh tests/test-suite.ts",
28
+ "test-suite": "bash scripts/run-tests.sh tests/test-suite.ts --lease 3",
29
+ "test-smoke": "bash scripts/run-tests.sh tests/test-smoke.ts --lease 3",
29
30
  "redeploy": "bash scripts/redeploy.sh",
30
31
  "sandbox": "npx tsx sandbox/main.ts",
31
32
  "format": "prettier --write .",
@@ -50,6 +51,6 @@
50
51
  "agentPlatformCanister": {
51
52
  "repo": "agent-platform-canister",
52
53
  "repoUrl": "https://github.com/JSM-Agent-Platform/agent-platform-canister",
53
- "commit": "ef1892ea4ce350afd6dc13e1452167aa7e9b4970"
54
+ "commit": "2f8d258092707ef4d50f0a2c6bdf557969f3f8a3"
54
55
  }
55
56
  }