@controlvector/cv-agent 1.11.1 → 1.13.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/LICENSE +201 -0
- package/NOTICE +2 -0
- package/README.md +12 -2
- package/dist/bundle.cjs +17667 -339
- package/dist/bundle.cjs.map +4 -4
- package/dist/commands/agent-git.d.ts +1 -0
- package/dist/commands/agent-git.d.ts.map +1 -1
- package/dist/commands/agent-git.js +26 -3
- package/dist/commands/agent-git.js.map +1 -1
- package/dist/commands/agent.d.ts +49 -0
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +164 -10
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/auth.d.ts +16 -0
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +106 -1
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/git-credential.d.ts +14 -0
- package/dist/commands/git-credential.d.ts.map +1 -0
- package/dist/commands/git-credential.js +53 -0
- package/dist/commands/git-credential.js.map +1 -0
- package/dist/commands/setup.d.ts +20 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +44 -23
- package/dist/commands/setup.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/api.d.ts +1 -1
- package/dist/utils/api.d.ts.map +1 -1
- package/dist/utils/api.js +4 -2
- package/dist/utils/api.js.map +1 -1
- package/dist/utils/config.d.ts +5 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/credentials.d.ts +2 -0
- package/dist/utils/credentials.d.ts.map +1 -1
- package/dist/utils/credentials.js.map +1 -1
- package/dist/utils/git-credentials.d.ts +78 -0
- package/dist/utils/git-credentials.d.ts.map +1 -0
- package/dist/utils/git-credentials.js +171 -0
- package/dist/utils/git-credentials.js.map +1 -0
- package/dist/utils/meter.d.ts +59 -0
- package/dist/utils/meter.d.ts.map +1 -0
- package/dist/utils/meter.js +125 -0
- package/dist/utils/meter.js.map +1 -0
- package/dist/utils/profile.d.ts +123 -0
- package/dist/utils/profile.d.ts.map +1 -0
- package/dist/utils/profile.js +266 -0
- package/dist/utils/profile.js.map +1 -0
- package/package.json +18 -8
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Agent profiles (P14). A profile is data, not a fork: a manifest + system prompt +
|
|
4
|
+
* tool policy that constrains what a cva session can do. It is loaded at start and
|
|
5
|
+
* enforced as a hard gate, so a profiled session cannot exceed its manifest no matter
|
|
6
|
+
* what the model attempts. cv-deploy (P15) is the first profile.
|
|
7
|
+
*
|
|
8
|
+
* This module is pure and self-contained: the manifest schema, the loader, and the
|
|
9
|
+
* enforcement decisions (tool policy, task-type routing, scope ceiling, base semver
|
|
10
|
+
* gate) are all here as testable functions. agent.ts wires them into the run loop and
|
|
11
|
+
* the permission relay; the frozen contract other profiles author against is SPEC.md.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.ProfileError = exports.ProfileManifestSchema = void 0;
|
|
15
|
+
exports.validateManifest = validateManifest;
|
|
16
|
+
exports.checkBaseConstraint = checkBaseConstraint;
|
|
17
|
+
exports.toolBaseName = toolBaseName;
|
|
18
|
+
exports.evaluateTool = evaluateTool;
|
|
19
|
+
exports.allowedToolsList = allowedToolsList;
|
|
20
|
+
exports.extractToolFromPrompt = extractToolFromPrompt;
|
|
21
|
+
exports.relayPermissionDecision = relayPermissionDecision;
|
|
22
|
+
exports.checkTaskType = checkTaskType;
|
|
23
|
+
exports.capScopes = capScopes;
|
|
24
|
+
exports.resolveProfileSpec = resolveProfileSpec;
|
|
25
|
+
exports.loadProfile = loadProfile;
|
|
26
|
+
const node_fs_1 = require("node:fs");
|
|
27
|
+
const node_path_1 = require("node:path");
|
|
28
|
+
const js_yaml_1 = require("js-yaml");
|
|
29
|
+
const zod_1 = require("zod");
|
|
30
|
+
// ============================================================================
|
|
31
|
+
// Manifest schema (profile.yaml)
|
|
32
|
+
// ============================================================================
|
|
33
|
+
const ToolsSchema = zod_1.z
|
|
34
|
+
.object({
|
|
35
|
+
// Explicit allowlist. Absence of a tool here means denied.
|
|
36
|
+
allow: zod_1.z.array(zod_1.z.string().min(1)).default([]),
|
|
37
|
+
// Redundant hard-denies for auditability; a deny wins over an allow.
|
|
38
|
+
deny: zod_1.z.array(zod_1.z.string().min(1)).default([]),
|
|
39
|
+
})
|
|
40
|
+
.strict();
|
|
41
|
+
const LimitsSchema = zod_1.z
|
|
42
|
+
.object({
|
|
43
|
+
max_turns: zod_1.z.number().int().positive().optional(),
|
|
44
|
+
max_tool_calls: zod_1.z.number().int().positive().optional(),
|
|
45
|
+
timeout_s: zod_1.z.number().int().positive().optional(),
|
|
46
|
+
})
|
|
47
|
+
.strict();
|
|
48
|
+
/**
|
|
49
|
+
* The profile manifest. `.strict()` at every level makes an unknown key an ERROR, not
|
|
50
|
+
* a warning (P14 item 2): a typo or a key from a newer schema fails the load loudly
|
|
51
|
+
* rather than being silently ignored.
|
|
52
|
+
*/
|
|
53
|
+
exports.ProfileManifestSchema = zod_1.z
|
|
54
|
+
.object({
|
|
55
|
+
name: zod_1.z.string().min(1),
|
|
56
|
+
version: zod_1.z.string().min(1),
|
|
57
|
+
/** semver constraint on the host binary, e.g. "cv-agent >= 2.0.0". */
|
|
58
|
+
base: zod_1.z.string().min(1),
|
|
59
|
+
/** Path to the system prompt, relative to the manifest (or absolute). */
|
|
60
|
+
system_prompt: zod_1.z.string().min(1),
|
|
61
|
+
tools: ToolsSchema,
|
|
62
|
+
task_types: zod_1.z.array(zod_1.z.string().min(1)).min(1),
|
|
63
|
+
/** The MAXIMUM credential scopes this profile may hold; the ceiling. */
|
|
64
|
+
credential_scopes: zod_1.z.array(zod_1.z.string().min(1)).default([]),
|
|
65
|
+
limits: LimitsSchema.default({}),
|
|
66
|
+
})
|
|
67
|
+
.strict();
|
|
68
|
+
class ProfileError extends Error {
|
|
69
|
+
detail;
|
|
70
|
+
constructor(message, detail = {}) {
|
|
71
|
+
super(message);
|
|
72
|
+
this.detail = detail;
|
|
73
|
+
this.name = 'ProfileError';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.ProfileError = ProfileError;
|
|
77
|
+
/** Validate an already-parsed object as a manifest. Throws ProfileError on any issue. */
|
|
78
|
+
function validateManifest(input) {
|
|
79
|
+
const result = exports.ProfileManifestSchema.safeParse(input);
|
|
80
|
+
if (!result.success) {
|
|
81
|
+
const issues = result.error.issues.map((i) => `${i.path.join('.') || '(root)'}: ${i.message}`).join('; ');
|
|
82
|
+
throw new ProfileError(`invalid profile manifest: ${issues}`, { issues: result.error.issues });
|
|
83
|
+
}
|
|
84
|
+
return result.data;
|
|
85
|
+
}
|
|
86
|
+
const OPS = ['>=', '<=', '>', '<', '='];
|
|
87
|
+
function parseSemver(v) {
|
|
88
|
+
const m = v.trim().match(/^(\d+)\.(\d+)\.(\d+)$/);
|
|
89
|
+
if (!m)
|
|
90
|
+
throw new ProfileError(`not a semver (major.minor.patch): ${v}`);
|
|
91
|
+
return [Number(m[1]), Number(m[2]), Number(m[3])];
|
|
92
|
+
}
|
|
93
|
+
function cmpSemver(a, b) {
|
|
94
|
+
for (let i = 0; i < 3; i++) {
|
|
95
|
+
if (a[i] !== b[i])
|
|
96
|
+
return a[i] < b[i] ? -1 : 1;
|
|
97
|
+
}
|
|
98
|
+
return 0;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Check the manifest `base` constraint against the running host. The grammar is
|
|
102
|
+
* frozen (SPEC): `[<host-name>] <op> <version>`, op one of >= > <= < =, version a
|
|
103
|
+
* bare `major.minor.patch`; a bare version with no op means `=`. A host-name token,
|
|
104
|
+
* when present, must match hostName (a profile for a different host is refused).
|
|
105
|
+
*/
|
|
106
|
+
function checkBaseConstraint(base, hostName, hostVersion) {
|
|
107
|
+
const m = base.trim().match(/^(?:([A-Za-z][A-Za-z0-9_-]*)\s+)?(>=|<=|>|<|=)?\s*(\d+\.\d+\.\d+)$/);
|
|
108
|
+
if (!m)
|
|
109
|
+
return { ok: false, reason: `unparseable base constraint: "${base}" (expected e.g. "cv-agent >= 2.0.0")` };
|
|
110
|
+
const [, name, opRaw, wantVersion] = m;
|
|
111
|
+
if (name && name !== hostName) {
|
|
112
|
+
return { ok: false, reason: `base names host "${name}", but this is "${hostName}"` };
|
|
113
|
+
}
|
|
114
|
+
const op = (opRaw ?? '=');
|
|
115
|
+
if (!OPS.includes(op))
|
|
116
|
+
return { ok: false, reason: `unsupported operator "${op}" in base constraint` };
|
|
117
|
+
const host = parseSemver(hostVersion);
|
|
118
|
+
const want = parseSemver(wantVersion);
|
|
119
|
+
const c = cmpSemver(host, want);
|
|
120
|
+
const satisfied = (op === '>=' && c >= 0) ||
|
|
121
|
+
(op === '>' && c > 0) ||
|
|
122
|
+
(op === '<=' && c <= 0) ||
|
|
123
|
+
(op === '<' && c < 0) ||
|
|
124
|
+
(op === '=' && c === 0);
|
|
125
|
+
if (!satisfied) {
|
|
126
|
+
return { ok: false, reason: `host ${hostName} ${hostVersion} does not satisfy base "${base}"` };
|
|
127
|
+
}
|
|
128
|
+
return { ok: true };
|
|
129
|
+
}
|
|
130
|
+
// ============================================================================
|
|
131
|
+
// Tool policy
|
|
132
|
+
// ============================================================================
|
|
133
|
+
/**
|
|
134
|
+
* A tool spec's base name. Claude Code tools appear as "Bash" or scoped like
|
|
135
|
+
* "Bash(git*)"; policy entries may be "Bash", "Bash(*)", or "Bash(git*)". Policy is
|
|
136
|
+
* evaluated by base name so an allow/deny of "Bash" covers every Bash invocation.
|
|
137
|
+
*/
|
|
138
|
+
function toolBaseName(spec) {
|
|
139
|
+
const paren = spec.indexOf('(');
|
|
140
|
+
return (paren === -1 ? spec : spec.slice(0, paren)).trim();
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* The tool-policy decision: a deny-list entry wins over an allow-list entry, and
|
|
144
|
+
* absence from the allow-list means denied. This is the hard gate the relay and the
|
|
145
|
+
* auto-approve allowlist are both built from.
|
|
146
|
+
*/
|
|
147
|
+
function evaluateTool(manifest, tool) {
|
|
148
|
+
const base = toolBaseName(tool);
|
|
149
|
+
const deny = manifest.tools.deny.map(toolBaseName);
|
|
150
|
+
const allow = manifest.tools.allow.map(toolBaseName);
|
|
151
|
+
if (deny.includes(base))
|
|
152
|
+
return { allowed: false, reason: `tool "${base}" is on the profile deny-list` };
|
|
153
|
+
if (allow.includes(base))
|
|
154
|
+
return { allowed: true };
|
|
155
|
+
return { allowed: false, reason: `tool "${base}" is not on the profile allow-list` };
|
|
156
|
+
}
|
|
157
|
+
/** The `--allowedTools` list for auto-approve mode: allow entries not shadowed by a deny. */
|
|
158
|
+
function allowedToolsList(manifest) {
|
|
159
|
+
const deny = new Set(manifest.tools.deny.map(toolBaseName));
|
|
160
|
+
return manifest.tools.allow.filter((spec) => !deny.has(toolBaseName(spec)));
|
|
161
|
+
}
|
|
162
|
+
/** Pull the tool name out of a Claude Code permission prompt, or null if not present. */
|
|
163
|
+
function extractToolFromPrompt(promptText) {
|
|
164
|
+
const m = promptText.match(/Allow\s+([A-Za-z][A-Za-z0-9_]*)\b/);
|
|
165
|
+
return m ? m[1] : null;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* The relay decision for a permission prompt under a profile. A tool the profile
|
|
169
|
+
* denies is refused AT THE RELAY (action "deny" -> the relay answers no); an allowed
|
|
170
|
+
* (or unidentifiable) tool falls through to the normal human/CV-Hub relay. The profile
|
|
171
|
+
* only hard-denies; it never auto-approves what the operator would otherwise gate.
|
|
172
|
+
*/
|
|
173
|
+
function relayPermissionDecision(manifest, promptText) {
|
|
174
|
+
const tool = extractToolFromPrompt(promptText);
|
|
175
|
+
if (!tool)
|
|
176
|
+
return { action: 'relay' };
|
|
177
|
+
const decision = evaluateTool(manifest, tool);
|
|
178
|
+
if (!decision.allowed)
|
|
179
|
+
return { action: 'deny', tool, reason: decision.reason };
|
|
180
|
+
return { action: 'relay', tool };
|
|
181
|
+
}
|
|
182
|
+
// ============================================================================
|
|
183
|
+
// Task-type routing + scope ceiling
|
|
184
|
+
// ============================================================================
|
|
185
|
+
/** A dispatched task whose type is outside `task_types` is refused (before any model call). */
|
|
186
|
+
function checkTaskType(manifest, taskType) {
|
|
187
|
+
if (manifest.task_types.includes(taskType))
|
|
188
|
+
return { allowed: true };
|
|
189
|
+
return {
|
|
190
|
+
allowed: false,
|
|
191
|
+
reason: `task type "${taskType}" is not permitted by profile "${manifest.name}" (allowed: ${manifest.task_types.join(', ')})`,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Apply the credential-scope ceiling: keep only offered scopes that the profile
|
|
196
|
+
* permits, dropping anything broader. The profile's credential_scopes is a MAXIMUM,
|
|
197
|
+
* so this is the intersection (offered that is within the ceiling).
|
|
198
|
+
*/
|
|
199
|
+
function capScopes(ceiling, offered) {
|
|
200
|
+
const max = new Set(ceiling);
|
|
201
|
+
return offered.filter((s) => max.has(s));
|
|
202
|
+
}
|
|
203
|
+
function defaultRead(path) {
|
|
204
|
+
return (0, node_fs_1.readFileSync)(path, 'utf8');
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Resolve a profile spec to a manifest file path. A spec beginning with "@" (or any
|
|
208
|
+
* bare package name) is resolved as a package whose root holds profile.yaml; anything
|
|
209
|
+
* else is a filesystem path (a directory implies <dir>/profile.yaml, a file is used
|
|
210
|
+
* as-is).
|
|
211
|
+
*/
|
|
212
|
+
function resolveProfileSpec(spec, opts) {
|
|
213
|
+
if (spec.startsWith('@') || (!spec.includes('/') && !spec.includes('\\') && !spec.endsWith('.yaml') && !spec.endsWith('.yml'))) {
|
|
214
|
+
const resolver = opts.resolvePackage ?? ((s) => require.resolve(`${s}/profile.yaml`));
|
|
215
|
+
return resolver(spec);
|
|
216
|
+
}
|
|
217
|
+
if (spec.endsWith('.yaml') || spec.endsWith('.yml'))
|
|
218
|
+
return spec;
|
|
219
|
+
return (0, node_path_1.join)(spec, 'profile.yaml');
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Load and validate a profile: resolve the spec, parse + strictly validate the
|
|
223
|
+
* manifest, gate the host version against `base`, then load the system prompt. Every
|
|
224
|
+
* failure is a ProfileError with a specific reason (P14: unknown keys, bad semver, and
|
|
225
|
+
* a failed base gate are all hard errors).
|
|
226
|
+
*/
|
|
227
|
+
function loadProfile(spec, opts) {
|
|
228
|
+
const read = opts.readFile ?? defaultRead;
|
|
229
|
+
const manifestPath = resolveProfileSpec(spec, opts);
|
|
230
|
+
let rawText;
|
|
231
|
+
try {
|
|
232
|
+
rawText = read(manifestPath);
|
|
233
|
+
}
|
|
234
|
+
catch (err) {
|
|
235
|
+
throw new ProfileError(`could not read profile manifest at ${manifestPath}: ${err.message}`);
|
|
236
|
+
}
|
|
237
|
+
let parsed;
|
|
238
|
+
try {
|
|
239
|
+
parsed = (0, js_yaml_1.load)(rawText);
|
|
240
|
+
}
|
|
241
|
+
catch (err) {
|
|
242
|
+
throw new ProfileError(`profile manifest is not valid YAML: ${err.message}`);
|
|
243
|
+
}
|
|
244
|
+
if (parsed === null || typeof parsed !== 'object') {
|
|
245
|
+
throw new ProfileError('profile manifest must be a YAML mapping');
|
|
246
|
+
}
|
|
247
|
+
const manifest = validateManifest(parsed);
|
|
248
|
+
const gate = checkBaseConstraint(manifest.base, opts.hostName ?? 'cv-agent', opts.hostVersion);
|
|
249
|
+
if (!gate.ok) {
|
|
250
|
+
throw new ProfileError(`profile "${manifest.name}" base gate failed: ${gate.reason}`, { base: manifest.base, hostVersion: opts.hostVersion });
|
|
251
|
+
}
|
|
252
|
+
const dir = (0, node_path_1.dirname)(manifestPath);
|
|
253
|
+
const promptPath = (0, node_path_1.isAbsolute)(manifest.system_prompt) ? manifest.system_prompt : (0, node_path_1.resolve)(dir, manifest.system_prompt);
|
|
254
|
+
let systemPrompt;
|
|
255
|
+
try {
|
|
256
|
+
systemPrompt = read(promptPath);
|
|
257
|
+
}
|
|
258
|
+
catch (err) {
|
|
259
|
+
throw new ProfileError(`could not read system_prompt at ${promptPath}: ${err.message}`);
|
|
260
|
+
}
|
|
261
|
+
if (!systemPrompt.trim()) {
|
|
262
|
+
throw new ProfileError(`system_prompt at ${promptPath} is empty`);
|
|
263
|
+
}
|
|
264
|
+
return { manifest, systemPrompt, dir, source: spec };
|
|
265
|
+
}
|
|
266
|
+
//# sourceMappingURL=profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/utils/profile.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AA+DH,4CAOC;AA4BD,kDA2BC;AAWD,oCAGC;AAYD,oCAOC;AAGD,4CAGC;AAGD,sDAGC;AAQD,0DASC;AAOD,sCAMC;AAOD,8BAGC;AAoCD,gDAOC;AAQD,kCAyCC;AA5SD,qCAAuC;AACvC,yCAA8E;AAE9E,qCAA2C;AAC3C,6BAAwB;AAExB,+EAA+E;AAC/E,iCAAiC;AACjC,+EAA+E;AAE/E,MAAM,WAAW,GAAG,OAAC;KAClB,MAAM,CAAC;IACN,2DAA2D;IAC3D,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7C,qEAAqE;IACrE,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC7C,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,YAAY,GAAG,OAAC;KACnB,MAAM,CAAC;IACN,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACjD,cAAc,EAA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AAQ,CAAC,IAAI,uBAAuB,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;IAChJ,CAAC;IAED,MAAM,GAAG,GAAG,IAAA,mBAAO,EAAC,YAAY,CAAC,CAAC;IAClC,MAAM,UAAU,GAAG,IAAA,sBAAU,EAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,IAAA,mBAAW,EAAC,GAAG,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC1H,IAAI,YAAoB,CAAC;IACzB,IAAI,CAAC;QACH,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,YAAY,CAAC,mCAAmC,UAAU,KAAM,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IACD,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC;QACzB,MAAM,IAAI,YAAY,CAAC,oBAAoB,UAAU,WAAW,CAAC,CAAC;IACpE,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACvD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@controlvector/cv-agent",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Standalone agent daemon for CV-Hub
|
|
3
|
+
"version": "1.13.0",
|
|
4
|
+
"description": "Standalone agent daemon for CV-Hub \u2014 bridges Claude Code with CV-Hub task dispatch",
|
|
5
5
|
"bin": {
|
|
6
6
|
"cva": "./dist/bundle.cjs"
|
|
7
7
|
},
|
|
@@ -12,16 +12,23 @@
|
|
|
12
12
|
"test": "vitest run",
|
|
13
13
|
"test:watch": "vitest",
|
|
14
14
|
"clean": "rm -rf dist",
|
|
15
|
-
"
|
|
15
|
+
"verify-pack": "node scripts/verify-pack.mjs",
|
|
16
|
+
"prepublishOnly": "npm run clean && npm run build && npm run verify-pack"
|
|
16
17
|
},
|
|
17
|
-
"keywords": [
|
|
18
|
+
"keywords": [
|
|
19
|
+
"cv-hub",
|
|
20
|
+
"claude-code",
|
|
21
|
+
"agent",
|
|
22
|
+
"controlvector"
|
|
23
|
+
],
|
|
18
24
|
"author": "Control Vector LLC",
|
|
19
|
-
"license": "
|
|
25
|
+
"license": "Apache-2.0",
|
|
20
26
|
"repository": {
|
|
21
27
|
"type": "git",
|
|
22
|
-
"url": "https://hub.controlvector.io/
|
|
28
|
+
"url": "https://git.hub.controlvector.io/controlvector/cv-agent.git"
|
|
23
29
|
},
|
|
24
30
|
"devDependencies": {
|
|
31
|
+
"@types/js-yaml": "^4.0.9",
|
|
25
32
|
"@types/node": "^22.0.0",
|
|
26
33
|
"chalk": "^5.3.0",
|
|
27
34
|
"commander": "^12.1.0",
|
|
@@ -30,12 +37,15 @@
|
|
|
30
37
|
"vitest": "^2.1.0"
|
|
31
38
|
},
|
|
32
39
|
"dependencies": {
|
|
33
|
-
"@controlvector/cv-git": "^1.4.0"
|
|
40
|
+
"@controlvector/cv-git": "^1.4.0",
|
|
41
|
+
"js-yaml": "^5.2.1",
|
|
42
|
+
"zod": "^4.4.3"
|
|
34
43
|
},
|
|
35
44
|
"engines": {
|
|
36
45
|
"node": ">=20"
|
|
37
46
|
},
|
|
38
47
|
"files": [
|
|
39
|
-
"dist"
|
|
48
|
+
"dist",
|
|
49
|
+
"NOTICE"
|
|
40
50
|
]
|
|
41
51
|
}
|