@sealkeeper/schema 0.4.4 → 0.4.6

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.
Files changed (54) hide show
  1. package/dist/agent-name.d.ts +1 -1
  2. package/dist/agent-name.js +4 -4
  3. package/dist/api.d.ts +625 -33
  4. package/dist/api.js +262 -57
  5. package/dist/badge.d.ts +1 -0
  6. package/dist/badge.js +7 -0
  7. package/dist/client-address.d.ts +6 -0
  8. package/dist/client-address.js +81 -0
  9. package/dist/db/agents.d.ts +155 -0
  10. package/dist/db/agents.js +38 -0
  11. package/dist/db/client.d.ts +431 -0
  12. package/dist/db/client.js +24 -1
  13. package/dist/db/events.js +7 -0
  14. package/dist/db/index.d.ts +16 -0
  15. package/dist/db/index.js +4 -0
  16. package/dist/db/migrate.js +5 -1
  17. package/dist/db/migrator.d.ts +5 -1
  18. package/dist/db/migrator.js +18 -2
  19. package/dist/db/operator-identities.d.ts +211 -0
  20. package/dist/db/operator-identities.js +49 -0
  21. package/dist/db/operator-level-grants.d.ts +109 -0
  22. package/dist/db/operator-level-grants.js +30 -0
  23. package/dist/db/operator-slugs.d.ts +92 -0
  24. package/dist/db/operator-slugs.js +25 -0
  25. package/dist/db/operators.d.ts +119 -0
  26. package/dist/db/operators.js +30 -2
  27. package/dist/db/standing.d.ts +1 -0
  28. package/dist/db/standing.js +2 -0
  29. package/dist/db/task-claim-failures.d.ts +143 -0
  30. package/dist/db/task-claim-failures.js +37 -0
  31. package/dist/db/tasks.d.ts +60 -0
  32. package/dist/db/tasks.js +19 -1
  33. package/dist/envelope.d.ts +3 -0
  34. package/dist/envelope.js +16 -11
  35. package/dist/goal.d.ts +62 -1
  36. package/dist/goal.js +70 -11
  37. package/dist/index.d.ts +7 -0
  38. package/dist/index.js +7 -0
  39. package/dist/json-shape.d.ts +9 -0
  40. package/dist/json-shape.js +70 -0
  41. package/dist/moderation.d.ts +29 -0
  42. package/dist/moderation.js +547 -0
  43. package/dist/operator-domains.d.ts +104 -0
  44. package/dist/operator-domains.js +85 -0
  45. package/dist/policy.d.ts +4 -0
  46. package/dist/policy.js +10 -0
  47. package/dist/runtime.d.ts +17 -0
  48. package/dist/runtime.js +61 -0
  49. package/dist/seal-conformance.js +2 -0
  50. package/dist/standing.d.ts +27 -8
  51. package/dist/standing.js +59 -22
  52. package/dist/tasks.d.ts +25 -1
  53. package/dist/tasks.js +43 -9
  54. package/package.json +1 -1
@@ -4,6 +4,6 @@ export declare const AGENT_NAME_MAX = 39;
4
4
  export declare const RESERVED_AGENT_NAMES: ReadonlySet<string>;
5
5
  export declare const AgentName: z.ZodString;
6
6
  export type AgentName = z.infer<typeof AgentName>;
7
- export declare const agentHandle: (login: string, name: string) => string;
7
+ export declare const agentHandle: (slug: string, name: string) => string;
8
8
  export declare function toAgentName(text: string): string | null;
9
9
  export declare function suggestAgentName(name: string, taken: (candidate: string) => boolean): string;
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- // An agent's name, unique per operator. Together with the operator's GitHub
3
- // login it makes the handle, as in alice/claude-code. The agent id (the
2
+ // An agent's name, unique per operator. Together with the operator's slug
3
+ // it makes the handle, as in alice/claude-code. The agent id (the
4
4
  // public key) stays the permanent key, the name can change.
5
5
  //
6
6
  // Lowercase letters, digits and hyphens, 2 to 39 characters, starting and
@@ -26,10 +26,10 @@ export const AgentName = z
26
26
  .regex(AGENT_NAME, 'Use lowercase letters, digits and hyphens, starting and ending with a letter or digit')
27
27
  .refine((name) => !name.includes('--'), 'No double hyphen')
28
28
  .refine((name) => !RESERVED_AGENT_NAMES.has(name), 'This name is reserved');
29
- // The handle of an agent, login/name. The API builds it and sends it, so
29
+ // The handle of an agent, slug/name. The API builds it and sends it, so
30
30
  // clients show it as they got it and never assemble it. The CLI uses this
31
31
  // only for the handle of its own agent from its config.
32
- export const agentHandle = (login, name) => `${login}/${name}`;
32
+ export const agentHandle = (slug, name) => `${slug}/${name}`;
33
33
  // A name made from free text, such as a directory name. Lowercased, every
34
34
  // run of other characters becomes one hyphen, hyphens trimmed from the
35
35
  // ends, cut to the maximum length. Null when nothing usable is left or the