@potential-agents/cli 0.0.0-stage → 0.1.1

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 (57) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +83 -2
  3. package/dist/adapters/outbound/filesystem/bundle-filesystem-repository.d.ts +20 -0
  4. package/dist/adapters/outbound/filesystem/bundle-filesystem-repository.js +181 -0
  5. package/dist/adapters/outbound/filesystem/bundle-filesystem-repository.js.map +1 -0
  6. package/dist/adapters/outbound/filesystem/yaml-lock-repository.d.ts +7 -0
  7. package/dist/adapters/outbound/filesystem/yaml-lock-repository.js +64 -0
  8. package/dist/adapters/outbound/filesystem/yaml-lock-repository.js.map +1 -0
  9. package/dist/adapters/outbound/http/http-potential-agents-api.d.ts +36 -0
  10. package/dist/adapters/outbound/http/http-potential-agents-api.js +150 -0
  11. package/dist/adapters/outbound/http/http-potential-agents-api.js.map +1 -0
  12. package/dist/adapters/outbound/runtime/sha256-idempotency-key-generator.d.ts +5 -0
  13. package/dist/adapters/outbound/runtime/sha256-idempotency-key-generator.js +8 -0
  14. package/dist/adapters/outbound/runtime/sha256-idempotency-key-generator.js.map +1 -0
  15. package/dist/application/apply-bundle.d.ts +22 -0
  16. package/dist/application/apply-bundle.js +78 -0
  17. package/dist/application/apply-bundle.js.map +1 -0
  18. package/dist/application/plan-bundle.d.ts +18 -0
  19. package/dist/application/plan-bundle.js +22 -0
  20. package/dist/application/plan-bundle.js.map +1 -0
  21. package/dist/application/ports/bundle-repository.d.ts +6 -0
  22. package/dist/application/ports/bundle-repository.js +2 -0
  23. package/dist/application/ports/bundle-repository.js.map +1 -0
  24. package/dist/application/ports/idempotency-key-generator.d.ts +4 -0
  25. package/dist/application/ports/idempotency-key-generator.js +2 -0
  26. package/dist/application/ports/idempotency-key-generator.js.map +1 -0
  27. package/dist/application/ports/lock-repository.d.ts +6 -0
  28. package/dist/application/ports/lock-repository.js +2 -0
  29. package/dist/application/ports/lock-repository.js.map +1 -0
  30. package/dist/application/ports/potential-agents-api.d.ts +35 -0
  31. package/dist/application/ports/potential-agents-api.js +2 -0
  32. package/dist/application/ports/potential-agents-api.js.map +1 -0
  33. package/dist/application/run-agent.d.ts +14 -0
  34. package/dist/application/run-agent.js +20 -0
  35. package/dist/application/run-agent.js.map +1 -0
  36. package/dist/application/validate-bundle.d.ts +8 -0
  37. package/dist/application/validate-bundle.js +11 -0
  38. package/dist/application/validate-bundle.js.map +1 -0
  39. package/dist/cli.d.ts +4 -0
  40. package/dist/cli.js +120 -0
  41. package/dist/cli.js.map +1 -0
  42. package/dist/composition-root.d.ts +29 -0
  43. package/dist/composition-root.js +35 -0
  44. package/dist/composition-root.js.map +1 -0
  45. package/dist/domain/agent-definition.d.ts +40 -0
  46. package/dist/domain/agent-definition.js +94 -0
  47. package/dist/domain/agent-definition.js.map +1 -0
  48. package/dist/domain/bundle.d.ts +16 -0
  49. package/dist/domain/bundle.js +29 -0
  50. package/dist/domain/bundle.js.map +1 -0
  51. package/dist/domain/errors.d.ts +10 -0
  52. package/dist/domain/errors.js +16 -0
  53. package/dist/domain/errors.js.map +1 -0
  54. package/dist/domain/lock.d.ts +18 -0
  55. package/dist/domain/lock.js +2 -0
  56. package/dist/domain/lock.js.map +1 -0
  57. package/package.json +45 -4
@@ -0,0 +1,94 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { validationError } from './errors.js';
3
+ export const ALLOWED_TOOLS = ['Read', 'Write', 'Edit', 'Bash', 'Glob', 'Grep'];
4
+ /** Immutable, validated user intent for one Potential Agent revision. */
5
+ export class AgentDefinition {
6
+ apiVersion;
7
+ id;
8
+ name;
9
+ description;
10
+ engine;
11
+ model;
12
+ tools;
13
+ browser;
14
+ skillPaths;
15
+ limits;
16
+ instructions;
17
+ constructor(input) {
18
+ this.apiVersion = 'potentialagents/v1alpha1';
19
+ this.id = input.id;
20
+ this.name = input.name;
21
+ this.description = input.description;
22
+ this.engine = 'claude';
23
+ this.model = input.model;
24
+ this.tools = Object.freeze([...input.tools]);
25
+ this.browser = input.browser;
26
+ this.skillPaths = Object.freeze([...input.skillPaths]);
27
+ this.limits = Object.freeze({ ...input.limits });
28
+ this.instructions = input.instructions;
29
+ Object.freeze(this);
30
+ }
31
+ /** Validates raw parsed content and constructs one immutable definition. */
32
+ static create(input) {
33
+ if (input.apiVersion !== 'potentialagents/v1alpha1') {
34
+ throw validationError('apiVersion must be exactly "potentialagents/v1alpha1".');
35
+ }
36
+ if (!/^[a-z][a-z0-9-]{1,62}$/u.test(input.id)) {
37
+ throw validationError('id must match [a-z][a-z0-9-]{1,62}.');
38
+ }
39
+ if (!input.name.trim() || input.name.length > 120) {
40
+ throw validationError('name must be a non-blank string of at most 120 characters.');
41
+ }
42
+ if (input.description !== undefined && input.description.length > 500) {
43
+ throw validationError('description must contain at most 500 characters.');
44
+ }
45
+ if (input.engine !== 'claude') {
46
+ throw validationError('engine must currently be "claude".');
47
+ }
48
+ if (!input.model.trim()) {
49
+ throw validationError('model must be a non-blank identifier.');
50
+ }
51
+ if (!input.instructions.trim()) {
52
+ throw validationError('The Markdown body must contain non-blank system instructions.');
53
+ }
54
+ const tools = input.tools ?? [];
55
+ if (new Set(tools).size !== tools.length || tools.some((tool) => !ALLOWED_TOOLS.includes(tool))) {
56
+ throw validationError(`tools must be unique values from: ${ALLOWED_TOOLS.join(', ')}.`);
57
+ }
58
+ const skillPaths = input.skillPaths ?? [];
59
+ if (new Set(skillPaths).size !== skillPaths.length) {
60
+ throw validationError('skills must not contain duplicate paths.');
61
+ }
62
+ const limits = input.limits ?? {};
63
+ if (limits.durationSeconds !== undefined && (!Number.isInteger(limits.durationSeconds) || limits.durationSeconds < 1 || limits.durationSeconds > 28_800)) {
64
+ throw validationError('limits.duration_seconds must be an integer from 1 through 28800.');
65
+ }
66
+ if (limits.maxBudgetUsd !== undefined && (!Number.isFinite(limits.maxBudgetUsd) || limits.maxBudgetUsd <= 0 || limits.maxBudgetUsd > 10)) {
67
+ throw validationError('limits.max_budget_usd must be greater than 0 and at most 10.');
68
+ }
69
+ return new AgentDefinition({
70
+ ...input,
71
+ name: input.name.trim(),
72
+ description: input.description?.trim() || undefined,
73
+ model: input.model.trim(),
74
+ tools,
75
+ browser: input.browser ?? false,
76
+ skillPaths,
77
+ limits,
78
+ instructions: input.instructions.trim(),
79
+ });
80
+ }
81
+ }
82
+ /** Returns deterministic JSON by sorting object keys recursively. */
83
+ export const stableJson = (value) => {
84
+ if (Array.isArray(value))
85
+ return `[${value.map(stableJson).join(',')}]`;
86
+ if (value !== null && typeof value === 'object') {
87
+ const record = value;
88
+ return `{${Object.keys(record).sort().map((key) => `${JSON.stringify(key)}:${stableJson(record[key])}`).join(',')}}`;
89
+ }
90
+ return JSON.stringify(value);
91
+ };
92
+ /** Calculates the version-independent SHA-256 representation of an agent intent. */
93
+ export const sha256 = (value) => `sha256:${createHash('sha256').update(stableJson(value)).digest('hex')}`;
94
+ //# sourceMappingURL=agent-definition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-definition.js","sourceRoot":"","sources":["../../src/domain/agent-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAoCxF,yEAAyE;AACzE,MAAM,OAAO,eAAe;IACV,UAAU,CAA6B;IACvC,EAAE,CAAS;IACX,IAAI,CAAS;IACb,WAAW,CAAqB;IAChC,MAAM,CAAW;IACjB,KAAK,CAAS;IACd,KAAK,CAAkB;IACvB,OAAO,CAAU;IACjB,UAAU,CAAoB;IAC9B,MAAM,CAAS;IACf,YAAY,CAAS;IAErC,YAAoB,KAAgC;QAClD,IAAI,CAAC,UAAU,GAAG,0BAA0B,CAAC;QAC7C,IAAI,CA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AI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IACvH,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,oFAAoF;AACpF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAc,EAAU,EAAE,CAAC,UAAU,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { AgentDefinition } from './agent-definition.js';
2
+ export interface SkillSource {
3
+ readonly path: string;
4
+ readonly name: string;
5
+ readonly sha256: string;
6
+ /** Local resolved directory; never serialized into a lockfile or API request. */
7
+ readonly sourceDirectory: string;
8
+ }
9
+ /** A fully resolved local bundle with skills pinned by their deterministic content hashes. */
10
+ export declare class Bundle {
11
+ readonly root: string;
12
+ readonly definition: AgentDefinition;
13
+ readonly skills: readonly SkillSource[];
14
+ readonly definitionSha256: string;
15
+ constructor(root: string, definition: AgentDefinition, skills: readonly SkillSource[]);
16
+ }
@@ -0,0 +1,29 @@
1
+ import { sha256 } from './agent-definition.js';
2
+ /** A fully resolved local bundle with skills pinned by their deterministic content hashes. */
3
+ export class Bundle {
4
+ root;
5
+ definition;
6
+ skills;
7
+ definitionSha256;
8
+ constructor(root, definition, skills) {
9
+ this.root = root;
10
+ this.definition = definition;
11
+ this.skills = skills;
12
+ this.definitionSha256 = sha256({
13
+ apiVersion: definition.apiVersion,
14
+ id: definition.id,
15
+ name: definition.name,
16
+ description: definition.description,
17
+ engine: definition.engine,
18
+ model: definition.model,
19
+ tools: definition.tools,
20
+ browser: definition.browser,
21
+ limits: definition.limits,
22
+ instructions: definition.instructions,
23
+ skills: skills.map((skill) => ({ path: skill.path, name: skill.name, sha256: skill.sha256 })),
24
+ });
25
+ Object.freeze(this.skills);
26
+ Object.freeze(this);
27
+ }
28
+ }
29
+ //# sourceMappingURL=bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.js","sourceRoot":"","sources":["../../src/domain/bundle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAU/C,8FAA8F;AAC9F,MAAM,OAAO,MAAM;IAIC;IACA;IACA;IALF,gBAAgB,CAAS;IAEzC,YACkB,IAAY,EACZ,UAA2B,EAC3B,MAA8B;QAF9B,SAAI,GAAJ,IAAI,CAAQ;QACZ,eAAU,GAAV,UAAU,CAAiB;QAC3B,WAAM,GAAN,MAAM,CAAwB;QAE9C,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC;YAC7B,UAAU,EAAE,UAAU,CAAC,UAAU;YACjC,EAAE,EAAE,UAAU,CAAC,EAAE;YACjB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,WAAW,EAAE,UAAU,CAAC,WAAW;YACnC,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,OAAO,EAAE,UAAU,CAAC,OAAO;YAC3B,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,YAAY,EAAE,UAAU,CAAC,YAAY;YACrC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;SAC9F,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;CACF"}
@@ -0,0 +1,10 @@
1
+ /** Error with a stable category suitable for CLI diagnostics and exit mapping. */
2
+ export declare class PotentialAgentsError extends Error {
3
+ readonly code: string;
4
+ readonly cause?: unknown | undefined;
5
+ constructor(code: string, message: string, cause?: unknown | undefined);
6
+ }
7
+ /** Creates an input-validation error without exposing adapter details. */
8
+ export declare const validationError: (message: string) => PotentialAgentsError;
9
+ /** Creates an error for a required execution setting that was not configured. */
10
+ export declare const configurationError: (message: string) => PotentialAgentsError;
@@ -0,0 +1,16 @@
1
+ /** Error with a stable category suitable for CLI diagnostics and exit mapping. */
2
+ export class PotentialAgentsError extends Error {
3
+ code;
4
+ cause;
5
+ constructor(code, message, cause) {
6
+ super(message);
7
+ this.code = code;
8
+ this.cause = cause;
9
+ this.name = 'PotentialAgentsError';
10
+ }
11
+ }
12
+ /** Creates an input-validation error without exposing adapter details. */
13
+ export const validationError = (message) => new PotentialAgentsError('VALIDATION_ERROR', message);
14
+ /** Creates an error for a required execution setting that was not configured. */
15
+ export const configurationError = (message) => new PotentialAgentsError('CONFIGURATION_ERROR', message);
16
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/domain/errors.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAE3B;IAES;IAH3B,YACkB,IAAY,EAC5B,OAAe,EACU,KAAe;QAExC,KAAK,CAAC,OAAO,CAAC,CAAC;QAJC,SAAI,GAAJ,IAAI,CAAQ;QAEH,UAAK,GAAL,KAAK,CAAU;QAGxC,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,0EAA0E;AAC1E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAe,EAAwB,EAAE,CACvE,IAAI,oBAAoB,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;AAExD,iFAAiF;AACjF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAe,EAAwB,EAAE,CAC1E,IAAI,oBAAoB,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ export interface LockSkill {
2
+ readonly path: string;
3
+ readonly skillId: string;
4
+ readonly revision: string;
5
+ readonly sha256: string;
6
+ }
7
+ export interface PotentialLock {
8
+ readonly format: 'potentialagents/lock/v1';
9
+ readonly agent: {
10
+ readonly localId: string;
11
+ readonly remoteId: string;
12
+ readonly activeRevision: string;
13
+ readonly deploymentId: string;
14
+ readonly definitionSha256: string;
15
+ readonly status: string;
16
+ };
17
+ readonly skills: Readonly<Record<string, LockSkill>>;
18
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=lock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock.js","sourceRoot":"","sources":["../../src/domain/lock.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,47 @@
1
1
  {
2
2
  "name": "@potential-agents/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "description": "Declarative GitOps CLI for Potential Agents",
5
+ "license": "MIT",
6
+ "private": false,
7
+ "type": "module",
8
+ "engines": {
9
+ "node": ">=22.14.0"
10
+ },
11
+ "bin": {
12
+ "p-agents": "dist/cli.js"
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "README.md",
17
+ "LICENSE"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc -p tsconfig.build.json",
21
+ "clean": "node --input-type=module -e \"import { rm } from 'node:fs/promises'; await rm('dist', { recursive: true, force: true });\"",
22
+ "typecheck": "tsc --noEmit -p tsconfig.json",
23
+ "test": "vitest run",
24
+ "test:watch": "vitest",
25
+ "prepack": "npm run clean && npm run build && npm run typecheck"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/shinsekai-dev/potential-agents-cli.git"
30
+ },
31
+ "bugs": {
32
+ "url": "https://github.com/shinsekai-dev/potential-agents-cli/issues"
33
+ },
34
+ "homepage": "https://github.com/shinsekai-dev/potential-agents-cli#readme",
35
+ "publishConfig": {
36
+ "access": "public"
37
+ },
38
+ "dependencies": {
39
+ "commander": "14.0.0",
40
+ "yaml": "2.9.1"
41
+ },
42
+ "devDependencies": {
43
+ "@types/node": "22.18.0",
44
+ "typescript": "5.9.3",
45
+ "vitest": "5.0.3"
46
+ }
47
+ }