@invictus-group-ai/orchestra 0.5.1 → 0.7.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.
- package/content-dist/README.md +1 -1
- package/content-dist/agents/README.md +3 -2
- package/content-dist/fragments/base.md +5 -4
- package/content-dist/fragments/index.json +3 -3
- package/content-dist/skills/fast-po/SKILL.md +145 -0
- package/content-dist/skills/fast-req/SKILL.md +129 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +55 -6
- package/dist/cli.js.map +1 -1
- package/dist/commands/keys.d.ts +63 -15
- package/dist/commands/keys.d.ts.map +1 -1
- package/dist/commands/keys.js +209 -41
- package/dist/commands/keys.js.map +1 -1
- package/dist/commands/keysStatus.d.ts +69 -0
- package/dist/commands/keysStatus.d.ts.map +1 -0
- package/dist/commands/keysStatus.js +156 -0
- package/dist/commands/keysStatus.js.map +1 -0
- package/dist/commands/reqPull.d.ts +61 -0
- package/dist/commands/reqPull.d.ts.map +1 -0
- package/dist/commands/reqPull.js +165 -0
- package/dist/commands/reqPull.js.map +1 -0
- package/dist/commands/reqShare.d.ts +33 -0
- package/dist/commands/reqShare.d.ts.map +1 -0
- package/dist/commands/reqShare.js +53 -0
- package/dist/commands/reqShare.js.map +1 -0
- package/dist/commands/sync.d.ts +13 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +64 -4
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/syncCommits.d.ts +1 -11
- package/dist/commands/syncCommits.d.ts.map +1 -1
- package/dist/commands/syncContext.d.ts +67 -0
- package/dist/commands/syncContext.d.ts.map +1 -0
- package/dist/commands/syncContext.js +135 -0
- package/dist/commands/syncContext.js.map +1 -0
- package/dist/content.d.ts +10 -72
- package/dist/content.d.ts.map +1 -1
- package/dist/credentials.d.ts +102 -0
- package/dist/credentials.d.ts.map +1 -0
- package/dist/credentials.js +203 -0
- package/dist/credentials.js.map +1 -0
- package/dist/i18n/en.d.ts +50 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +51 -0
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/pt-BR.d.ts.map +1 -1
- package/dist/i18n/pt-BR.js +51 -0
- package/dist/i18n/pt-BR.js.map +1 -1
- package/dist/identity.d.ts +27 -3
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +45 -9
- package/dist/identity.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/inventory.d.ts +11 -43
- package/dist/inventory.d.ts.map +1 -1
- package/dist/render/agents.d.ts +34 -160
- package/dist/render/agents.d.ts.map +1 -1
- package/dist/render/transparency.js +26 -2
- package/dist/render/transparency.js.map +1 -1
- package/dist/tasks.d.ts +35 -60
- package/dist/tasks.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `invi keys status [--check]` — the answer to "did provisioning actually work?"
|
|
3
|
+
*
|
|
4
|
+
* Until now the only way to find out was to make real work and wait for it to
|
|
5
|
+
* show up on a dashboard, which is a terrible feedback loop: a developer who
|
|
6
|
+
* mistyped a URL, or whose repository is not on their seat, learns about it
|
|
7
|
+
* days later as an absence — the hardest thing to notice.
|
|
8
|
+
*
|
|
9
|
+
* Without `--check` this is a pure local report: which client this checkout
|
|
10
|
+
* belongs to, which identity it resolves, where the key is read from, and
|
|
11
|
+
* whether the store file is readable by other accounts on the machine.
|
|
12
|
+
*
|
|
13
|
+
* With `--check` it does the one round trip that settles it: POST an EMPTY
|
|
14
|
+
* batch to `/v1/ingest/events`. Empty is deliberate — it writes nothing, so it
|
|
15
|
+
* can be run as often as you like, and it still passes through authentication
|
|
16
|
+
* AND the seat's repository check. Three different failures therefore come
|
|
17
|
+
* back distinct:
|
|
18
|
+
*
|
|
19
|
+
* 401 → the key is wrong, or the seat was revoked
|
|
20
|
+
* 403 → the key is right and this REPOSITORY is not on the seat
|
|
21
|
+
* 200 → work from this checkout will land under this repo name
|
|
22
|
+
*
|
|
23
|
+
* The 403 is the valuable one. It is the silent failure the panel shows as
|
|
24
|
+
* "sem atividade ainda" forever, and it has never had a way to be seen from
|
|
25
|
+
* the machine where it happens.
|
|
26
|
+
*/
|
|
27
|
+
import { resolve } from 'node:path';
|
|
28
|
+
import { clientCredentialsPath, listStoredClients, readClientCredentials, storeIsLoose, storedDevKey, } from '../credentials.js';
|
|
29
|
+
import { gitUserEmail, localDir, repoClientId, resolveLocalDevId, resolveSalt } from '../identity.js';
|
|
30
|
+
import { translatorFor } from '../i18n/index.js';
|
|
31
|
+
import { readJsonFile, readTextFile } from '../util/fsx.js';
|
|
32
|
+
import { makeLocalizedReporter } from '../util/out.js';
|
|
33
|
+
import { repoName } from './sync.js';
|
|
34
|
+
import { join } from 'node:path';
|
|
35
|
+
const defaultFetch = (url, init) => fetch(url, { ...init, signal: AbortSignal.timeout(15_000) });
|
|
36
|
+
async function runCheck(platformUrl, clientId, devKey, repo, fetchImpl) {
|
|
37
|
+
let response;
|
|
38
|
+
try {
|
|
39
|
+
response = await fetchImpl(`${platformUrl}/v1/ingest/events`, {
|
|
40
|
+
method: 'POST',
|
|
41
|
+
headers: {
|
|
42
|
+
'content-type': 'application/json',
|
|
43
|
+
authorization: `Bearer ${devKey}`,
|
|
44
|
+
'x-invictus-client': clientId,
|
|
45
|
+
},
|
|
46
|
+
body: JSON.stringify({ repo, events: [] }),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
return {
|
|
51
|
+
ok: false,
|
|
52
|
+
status: null,
|
|
53
|
+
verdict: 'unreachable',
|
|
54
|
+
detail: error instanceof Error ? error.message : String(error),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
if (response.status === 200)
|
|
58
|
+
return { ok: true, status: 200, verdict: 'authenticated', detail: null };
|
|
59
|
+
if (response.status === 401)
|
|
60
|
+
return { ok: false, status: 401, verdict: 'unauthorized', detail: null };
|
|
61
|
+
if (response.status === 403)
|
|
62
|
+
return { ok: false, status: 403, verdict: 'repo-not-on-seat', detail: repo };
|
|
63
|
+
return { ok: false, status: response.status, verdict: 'unexpected', detail: null };
|
|
64
|
+
}
|
|
65
|
+
export async function runKeysStatus(options = {}) {
|
|
66
|
+
const root = resolve(options.dir ?? process.cwd());
|
|
67
|
+
const t = translatorFor(root, options.lang);
|
|
68
|
+
const out = options.reporter ?? makeLocalizedReporter(options.json ?? false, t);
|
|
69
|
+
const env = options.env ?? process.env;
|
|
70
|
+
const pointer = readJsonFile(join(localDir(root), 'client.json'));
|
|
71
|
+
const clientId = env['INVICTUS_CLIENT_ID'] ?? repoClientId(root);
|
|
72
|
+
const stored = clientId === null ? null : readClientCredentials(clientId, env);
|
|
73
|
+
const platformUrl = env['INVICTUS_PLATFORM_URL'] ??
|
|
74
|
+
(pointer && typeof pointer.platformUrl === 'string' ? pointer.platformUrl : null) ??
|
|
75
|
+
stored?.platformUrl ??
|
|
76
|
+
null;
|
|
77
|
+
const rawEmail = options.gitEmail ?? gitUserEmail(root) ?? undefined;
|
|
78
|
+
const devId = resolveLocalDevId(root, env, rawEmail, { createSalt: false });
|
|
79
|
+
const repo = repoName(root);
|
|
80
|
+
const legacyKey = readTextFile(join(localDir(root), 'dev.key'))?.trim() || null;
|
|
81
|
+
const fromStore = clientId !== null && devId !== null ? storedDevKey(clientId, devId, env) : null;
|
|
82
|
+
const devKey = env['INVICTUS_DEV_KEY'] ?? fromStore ?? legacyKey;
|
|
83
|
+
const keySource = env['INVICTUS_DEV_KEY']
|
|
84
|
+
? 'env'
|
|
85
|
+
: fromStore !== null
|
|
86
|
+
? 'user-store'
|
|
87
|
+
: legacyKey !== null
|
|
88
|
+
? 'repo-legacy'
|
|
89
|
+
: 'none';
|
|
90
|
+
const saltSource = readTextFile(join(localDir(root), 'salt'))?.trim()
|
|
91
|
+
? 'repo-legacy'
|
|
92
|
+
: resolveSalt(root, env) !== null
|
|
93
|
+
? 'user-store'
|
|
94
|
+
: 'none';
|
|
95
|
+
const configured = Boolean(clientId && platformUrl && devId && devKey);
|
|
96
|
+
let check = null;
|
|
97
|
+
if (options.check) {
|
|
98
|
+
if (!configured) {
|
|
99
|
+
check = { ok: false, status: null, verdict: 'unreachable', detail: t('keys.status.notConfigured') };
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
check = await runCheck(platformUrl.replace(/\/+$/, ''), clientId, devKey, repo, options.fetchImpl ?? defaultFetch);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
const result = {
|
|
106
|
+
clientId,
|
|
107
|
+
platformUrl,
|
|
108
|
+
devId,
|
|
109
|
+
repo,
|
|
110
|
+
keySource,
|
|
111
|
+
saltSource,
|
|
112
|
+
storePath: stored === null || clientId === null ? null : clientCredentialsPath(clientId, env),
|
|
113
|
+
storeLoose: clientId !== null && storeIsLoose(clientId, env),
|
|
114
|
+
storedClients: listStoredClients(env),
|
|
115
|
+
legacyKeyFilePresent: legacyKey !== null,
|
|
116
|
+
check,
|
|
117
|
+
configured,
|
|
118
|
+
};
|
|
119
|
+
report(out, t, result);
|
|
120
|
+
return result;
|
|
121
|
+
}
|
|
122
|
+
function report(out, t, r) {
|
|
123
|
+
if (!r.configured) {
|
|
124
|
+
out.warn(t('keys.status.notConfigured'));
|
|
125
|
+
}
|
|
126
|
+
out.info(t('keys.status.client', { client: r.clientId ?? '—', url: r.platformUrl ?? '—' }));
|
|
127
|
+
out.info(t('keys.status.dev', { dev: r.devId ?? '—' }));
|
|
128
|
+
out.info(t('keys.status.repo', { repo: r.repo }));
|
|
129
|
+
out.info(t('keys.status.keySource', { source: t(`keys.status.source.${r.keySource}`) }));
|
|
130
|
+
if (r.storeLoose)
|
|
131
|
+
out.warn(t('keys.status.loose', { path: r.storePath ?? '?' }));
|
|
132
|
+
if (r.legacyKeyFilePresent && r.keySource === 'user-store') {
|
|
133
|
+
out.warn(t('keys.status.legacyLeftover'));
|
|
134
|
+
}
|
|
135
|
+
if (r.storedClients.length > 1) {
|
|
136
|
+
out.info(t('keys.status.otherClients', { clients: r.storedClients.join(', ') }));
|
|
137
|
+
}
|
|
138
|
+
if (r.check === null) {
|
|
139
|
+
out.info(t('keys.status.hint'));
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (r.check.verdict === 'authenticated')
|
|
143
|
+
out.info(t('keys.status.check.ok', { repo: r.repo }));
|
|
144
|
+
else if (r.check.verdict === 'unauthorized')
|
|
145
|
+
out.error(t('keys.status.check.unauthorized'));
|
|
146
|
+
else if (r.check.verdict === 'repo-not-on-seat') {
|
|
147
|
+
out.error(t('keys.status.check.repoNotOnSeat', { repo: r.repo }));
|
|
148
|
+
}
|
|
149
|
+
else if (r.check.verdict === 'unreachable') {
|
|
150
|
+
out.error(t('keys.status.check.unreachable', { reason: r.check.detail ?? '?' }));
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
out.error(t('keys.status.check.unexpected', { status: String(r.check.status ?? '?') }));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=keysStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keysStatus.js","sourceRoot":"","sources":["../../src/commands/keysStatus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,YAAY,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;A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6
|
+
* The obvious design is the dangerous one. If Maestro wrote the approved
|
|
7
|
+
* requirement straight into the client's repository, it would need a forge
|
|
8
|
+
* credential with WRITE access to their code, held by us, for every client —
|
|
9
|
+
* the most dangerous credential the product could own, created to save a
|
|
10
|
+
* developer one command. And it would put a commit in their history that no
|
|
11
|
+
* gate ever ran on.
|
|
12
|
+
*
|
|
13
|
+
* Pulling costs nothing and already has its trust direction right: this
|
|
14
|
+
* machine holds a dev key, the platform holds nothing of theirs, and the
|
|
15
|
+
* requirement lands here as an UNCOMMITTED file. From there it goes through
|
|
16
|
+
* the path everything else goes through — branch, four gates, human merge.
|
|
17
|
+
*
|
|
18
|
+
* ## What it refuses to do
|
|
19
|
+
*
|
|
20
|
+
* It never overwrites a requirement that already exists on disk. A file under
|
|
21
|
+
* `.invictus/requirements/` may have been edited by the team after it was
|
|
22
|
+
* approved, and silently replacing it with the platform's copy would delete
|
|
23
|
+
* work nobody asked us to delete. An id that exists is reported as `kept` and
|
|
24
|
+
* skipped; `--force` is the explicit way to say otherwise.
|
|
25
|
+
*
|
|
26
|
+
* It writes nothing on a failed fetch, and it is safe to run as often as you
|
|
27
|
+
* like: the platform only ever returns requirements already approved by a
|
|
28
|
+
* human, and writing the same file twice is a no-op.
|
|
29
|
+
*/
|
|
30
|
+
import type { Reporter } from '../util/out.js';
|
|
31
|
+
export type PullFetch = (url: string, init: RequestInit) => Promise<Response>;
|
|
32
|
+
export interface PulledRequirement {
|
|
33
|
+
id: string;
|
|
34
|
+
path: string;
|
|
35
|
+
/** `written` — new on disk. `kept` — already here and left alone. */
|
|
36
|
+
outcome: 'written' | 'kept' | 'replaced';
|
|
37
|
+
approvedBy: string | null;
|
|
38
|
+
}
|
|
39
|
+
export interface ReqPullResult {
|
|
40
|
+
repo: string;
|
|
41
|
+
/** Null when this checkout has no platform configured — then nothing ran. */
|
|
42
|
+
clientId: string | null;
|
|
43
|
+
requirements: PulledRequirement[];
|
|
44
|
+
written: number;
|
|
45
|
+
kept: number;
|
|
46
|
+
/** A sentence for a human when the pull could not happen at all. */
|
|
47
|
+
problem: string | null;
|
|
48
|
+
}
|
|
49
|
+
export interface ReqPullOptions {
|
|
50
|
+
dir?: string;
|
|
51
|
+
json?: boolean;
|
|
52
|
+
lang?: string;
|
|
53
|
+
/** Replace a requirement already on disk. Off by default, and loudly. */
|
|
54
|
+
force?: boolean;
|
|
55
|
+
reporter?: Reporter;
|
|
56
|
+
env?: NodeJS.ProcessEnv;
|
|
57
|
+
gitEmail?: string;
|
|
58
|
+
fetchImpl?: PullFetch;
|
|
59
|
+
}
|
|
60
|
+
export declare function runReqPull(options?: ReqPullOptions): Promise<ReqPullResult>;
|
|
61
|
+
//# sourceMappingURL=reqPull.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reqPull.d.ts","sourceRoot":"","sources":["../../src/commands/reqPull.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAUH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAkB/C,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAK9E,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,OAAO,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;IACzC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,wBAAsB,UAAU,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CAgIrF"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `invi req pull` — bring the requirements the PO approved into this checkout.
|
|
3
|
+
*
|
|
4
|
+
* ## Why the kit pulls instead of the platform pushing
|
|
5
|
+
*
|
|
6
|
+
* The obvious design is the dangerous one. If Maestro wrote the approved
|
|
7
|
+
* requirement straight into the client's repository, it would need a forge
|
|
8
|
+
* credential with WRITE access to their code, held by us, for every client —
|
|
9
|
+
* the most dangerous credential the product could own, created to save a
|
|
10
|
+
* developer one command. And it would put a commit in their history that no
|
|
11
|
+
* gate ever ran on.
|
|
12
|
+
*
|
|
13
|
+
* Pulling costs nothing and already has its trust direction right: this
|
|
14
|
+
* machine holds a dev key, the platform holds nothing of theirs, and the
|
|
15
|
+
* requirement lands here as an UNCOMMITTED file. From there it goes through
|
|
16
|
+
* the path everything else goes through — branch, four gates, human merge.
|
|
17
|
+
*
|
|
18
|
+
* ## What it refuses to do
|
|
19
|
+
*
|
|
20
|
+
* It never overwrites a requirement that already exists on disk. A file under
|
|
21
|
+
* `.invictus/requirements/` may have been edited by the team after it was
|
|
22
|
+
* approved, and silently replacing it with the platform's copy would delete
|
|
23
|
+
* work nobody asked us to delete. An id that exists is reported as `kept` and
|
|
24
|
+
* skipped; `--force` is the explicit way to say otherwise.
|
|
25
|
+
*
|
|
26
|
+
* It writes nothing on a failed fetch, and it is safe to run as often as you
|
|
27
|
+
* like: the platform only ever returns requirements already approved by a
|
|
28
|
+
* human, and writing the same file twice is a no-op.
|
|
29
|
+
*/
|
|
30
|
+
import { join, resolve } from 'node:path';
|
|
31
|
+
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
32
|
+
import { z } from 'zod';
|
|
33
|
+
import { readClientCredentials, storedDevKey } from '../credentials.js';
|
|
34
|
+
import { gitUserEmail, localDir, repoClientId, resolveLocalDevId } from '../identity.js';
|
|
35
|
+
import { translatorFor } from '../i18n/index.js';
|
|
36
|
+
import { readJsonFile, readTextFile } from '../util/fsx.js';
|
|
37
|
+
import { makeLocalizedReporter } from '../util/out.js';
|
|
38
|
+
import { repoName } from './sync.js';
|
|
39
|
+
import { requirementsDir } from '../requirements.js';
|
|
40
|
+
/** The platform's answer. Validated, because a shape we trust is a shape we check. */
|
|
41
|
+
const requirementSchema = z.object({
|
|
42
|
+
id: z.string().regex(/^REQ-\d+$/),
|
|
43
|
+
file: z.string().min(1),
|
|
44
|
+
approvedAt: z.number().nullable().optional(),
|
|
45
|
+
approvedBy: z.string().nullable().optional(),
|
|
46
|
+
markdown: z.string().min(1),
|
|
47
|
+
});
|
|
48
|
+
const responseSchema = z.object({
|
|
49
|
+
repo: z.string(),
|
|
50
|
+
requirements: z.array(requirementSchema),
|
|
51
|
+
});
|
|
52
|
+
const defaultFetch = (url, init) => fetch(url, { ...init, signal: AbortSignal.timeout(20_000) });
|
|
53
|
+
export async function runReqPull(options = {}) {
|
|
54
|
+
const root = resolve(options.dir ?? process.cwd());
|
|
55
|
+
const t = translatorFor(root, options.lang);
|
|
56
|
+
const out = options.reporter ?? makeLocalizedReporter(options.json ?? false, t);
|
|
57
|
+
const env = options.env ?? process.env;
|
|
58
|
+
const pointer = readJsonFile(join(localDir(root), 'client.json'));
|
|
59
|
+
const clientId = env['INVICTUS_CLIENT_ID'] ?? repoClientId(root);
|
|
60
|
+
const stored = clientId === null ? null : readClientCredentials(clientId, env);
|
|
61
|
+
const platformUrl = (env['INVICTUS_PLATFORM_URL'] ??
|
|
62
|
+
(pointer && typeof pointer.platformUrl === 'string' ? pointer.platformUrl : null) ??
|
|
63
|
+
stored?.platformUrl ??
|
|
64
|
+
null)?.replace(/\/+$/, '');
|
|
65
|
+
const devId = resolveLocalDevId(root, env, options.gitEmail ?? gitUserEmail(root) ?? undefined, {
|
|
66
|
+
createSalt: false,
|
|
67
|
+
});
|
|
68
|
+
const legacyKey = readTextFile(join(localDir(root), 'dev.key'))?.trim() || null;
|
|
69
|
+
const fromStore = clientId !== null && devId !== null ? storedDevKey(clientId, devId, env) : null;
|
|
70
|
+
const devKey = env['INVICTUS_DEV_KEY'] ?? fromStore ?? legacyKey;
|
|
71
|
+
const repo = repoName(root);
|
|
72
|
+
const blank = { repo, clientId, requirements: [], written: 0, kept: 0, problem: null };
|
|
73
|
+
if (!clientId || !platformUrl || !devKey) {
|
|
74
|
+
// Offline-first, like `invi sync`: an unconfigured checkout is a normal
|
|
75
|
+
// state, not an error. Say what is missing and stop.
|
|
76
|
+
blank.problem = t('req.pull.notConfigured');
|
|
77
|
+
out.info(blank.problem);
|
|
78
|
+
return blank;
|
|
79
|
+
}
|
|
80
|
+
let response;
|
|
81
|
+
try {
|
|
82
|
+
response = await (options.fetchImpl ?? defaultFetch)(`${platformUrl}/v1/requirements?repo=${encodeURIComponent(repo)}`, {
|
|
83
|
+
headers: {
|
|
84
|
+
authorization: `Bearer ${devKey}`,
|
|
85
|
+
'x-invictus-client': clientId,
|
|
86
|
+
...(devId === null ? {} : { 'x-invictus-dev': devId }),
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
blank.problem = t('req.pull.unreachable', {
|
|
92
|
+
reason: error instanceof Error ? error.message : String(error),
|
|
93
|
+
});
|
|
94
|
+
out.error(blank.problem);
|
|
95
|
+
return blank;
|
|
96
|
+
}
|
|
97
|
+
if (response.status === 401) {
|
|
98
|
+
blank.problem = t('req.pull.unauthorized');
|
|
99
|
+
out.error(blank.problem);
|
|
100
|
+
return blank;
|
|
101
|
+
}
|
|
102
|
+
if (response.status === 403) {
|
|
103
|
+
// The same silent failure `invi keys status --check` exists to surface:
|
|
104
|
+
// the key is fine and this repository is not on the seat.
|
|
105
|
+
blank.problem = t('req.pull.repoNotOnSeat', { repo });
|
|
106
|
+
out.error(blank.problem);
|
|
107
|
+
return blank;
|
|
108
|
+
}
|
|
109
|
+
if (!response.ok) {
|
|
110
|
+
blank.problem = t('req.pull.unexpected', { status: String(response.status) });
|
|
111
|
+
out.error(blank.problem);
|
|
112
|
+
return blank;
|
|
113
|
+
}
|
|
114
|
+
const parsed = responseSchema.safeParse(await response.json().catch(() => null));
|
|
115
|
+
if (!parsed.success) {
|
|
116
|
+
blank.problem = t('req.pull.malformed');
|
|
117
|
+
out.error(blank.problem);
|
|
118
|
+
return blank;
|
|
119
|
+
}
|
|
120
|
+
const dir = requirementsDir(root);
|
|
121
|
+
const pulled = [];
|
|
122
|
+
for (const requirement of parsed.data.requirements) {
|
|
123
|
+
const path = join(dir, `${requirement.id}.md`);
|
|
124
|
+
const existing = readTextFile(path);
|
|
125
|
+
if (existing !== null && options.force !== true) {
|
|
126
|
+
pulled.push({ id: requirement.id, path, outcome: 'kept', approvedBy: requirement.approvedBy ?? null });
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
mkdirSync(dir, { recursive: true });
|
|
130
|
+
writeFileSync(path, requirement.markdown, 'utf8');
|
|
131
|
+
pulled.push({
|
|
132
|
+
id: requirement.id,
|
|
133
|
+
path,
|
|
134
|
+
outcome: existing === null ? 'written' : 'replaced',
|
|
135
|
+
approvedBy: requirement.approvedBy ?? null,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
const result = {
|
|
139
|
+
repo,
|
|
140
|
+
clientId,
|
|
141
|
+
requirements: pulled,
|
|
142
|
+
written: pulled.filter((r) => r.outcome !== 'kept').length,
|
|
143
|
+
kept: pulled.filter((r) => r.outcome === 'kept').length,
|
|
144
|
+
problem: null,
|
|
145
|
+
};
|
|
146
|
+
if (pulled.length === 0) {
|
|
147
|
+
out.info(t('req.pull.none', { repo }));
|
|
148
|
+
return result;
|
|
149
|
+
}
|
|
150
|
+
for (const requirement of pulled) {
|
|
151
|
+
if (requirement.outcome === 'kept') {
|
|
152
|
+
out.warn(t('req.pull.kept', { id: requirement.id }));
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
out.info(t('req.pull.wrote', {
|
|
156
|
+
id: requirement.id,
|
|
157
|
+
by: requirement.approvedBy ?? '—',
|
|
158
|
+
}));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
if (result.written > 0)
|
|
162
|
+
out.info(t('req.pull.next'));
|
|
163
|
+
return result;
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=reqPull.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reqPull.js","sourceRoot":"","sources":["../../src/commands/reqPull.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MA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AC,EAAE,CAAC;QACxB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACvC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,KAAK,MAAM,WAAW,IAAI,MAAM,EAAE,CAAC;QACjC,IAAI,WAAW,CAAC,OAAO,KAAK,MAAM,EAAE,CAAC;YACnC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,EAAE,EAAE,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACvD,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,IAAI,CACN,CAAC,CAAC,gBAAgB,EAAE;gBAClB,EAAE,EAAE,WAAW,CAAC,EAAE;gBAClB,EAAE,EAAE,WAAW,CAAC,UAAU,IAAI,GAAG;aAClC,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IACD,IAAI,MAAM,CAAC,OAAO,GAAG,CAAC;QAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;IACrD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `invi req share [on|off]` — decide whether this repository's PO layer is
|
|
3
|
+
* reported to the panel, and see exactly what that means.
|
|
4
|
+
*
|
|
5
|
+
* With no argument it changes nothing: it says whether sharing is on and
|
|
6
|
+
* prints the payload `invi sync` would send, byte for byte. That is the whole
|
|
7
|
+
* consent mechanism — the question "what leaves my machine?" is answered by
|
|
8
|
+
* the thing itself, before anyone turns anything on.
|
|
9
|
+
*
|
|
10
|
+
* `on` / `off` write one line in `.invictus/manifest.json`. The manifest is
|
|
11
|
+
* versioned, so the change travels in a commit and a pull request: sharing a
|
|
12
|
+
* project's constitution is the team's decision, not a side effect of one
|
|
13
|
+
* developer's flag. Nothing is sent by this command; the next `invi sync` does.
|
|
14
|
+
*/
|
|
15
|
+
import type { Reporter } from '../util/out.js';
|
|
16
|
+
import type { RepoContextReport } from './syncContext.js';
|
|
17
|
+
export interface ReqShareOptions {
|
|
18
|
+
dir?: string;
|
|
19
|
+
json?: boolean;
|
|
20
|
+
lang?: string;
|
|
21
|
+
/** Absent = report only. */
|
|
22
|
+
state?: 'on' | 'off';
|
|
23
|
+
reporter?: Reporter;
|
|
24
|
+
}
|
|
25
|
+
export interface ReqShareResult {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
/** True when this run flipped the manifest. */
|
|
28
|
+
changed: boolean;
|
|
29
|
+
/** What a sync would report with sharing on. */
|
|
30
|
+
payload: RepoContextReport | null;
|
|
31
|
+
}
|
|
32
|
+
export declare function runReqShare(options?: ReqShareOptions): ReqShareResult;
|
|
33
|
+
//# sourceMappingURL=reqShare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reqShare.d.ts","sourceRoot":"","sources":["../../src/commands/reqShare.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,KAAK,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC;IACrB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACnC;AAED,wBAAgB,WAAW,CAAC,OAAO,GAAE,eAAoB,GAAG,cAAc,CAiCzE"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `invi req share [on|off]` — decide whether this repository's PO layer is
|
|
3
|
+
* reported to the panel, and see exactly what that means.
|
|
4
|
+
*
|
|
5
|
+
* With no argument it changes nothing: it says whether sharing is on and
|
|
6
|
+
* prints the payload `invi sync` would send, byte for byte. That is the whole
|
|
7
|
+
* consent mechanism — the question "what leaves my machine?" is answered by
|
|
8
|
+
* the thing itself, before anyone turns anything on.
|
|
9
|
+
*
|
|
10
|
+
* `on` / `off` write one line in `.invictus/manifest.json`. The manifest is
|
|
11
|
+
* versioned, so the change travels in a commit and a pull request: sharing a
|
|
12
|
+
* project's constitution is the team's decision, not a side effect of one
|
|
13
|
+
* developer's flag. Nothing is sent by this command; the next `invi sync` does.
|
|
14
|
+
*/
|
|
15
|
+
import { resolve } from 'node:path';
|
|
16
|
+
import { readManifest, writeManifest } from '@invictus-group-ai/core';
|
|
17
|
+
import { translatorFor } from '../i18n/index.js';
|
|
18
|
+
import { makeLocalizedReporter, printJson } from '../util/out.js';
|
|
19
|
+
import { buildRepoContext } from './syncContext.js';
|
|
20
|
+
export function runReqShare(options = {}) {
|
|
21
|
+
const root = resolve(options.dir ?? process.cwd());
|
|
22
|
+
const t = translatorFor(root, options.lang);
|
|
23
|
+
const out = options.reporter ?? makeLocalizedReporter(options.json ?? false, t);
|
|
24
|
+
const manifest = readManifest(root);
|
|
25
|
+
const before = manifest.project.sharePoContext === true;
|
|
26
|
+
const after = options.state === undefined ? before : options.state === 'on';
|
|
27
|
+
if (after !== before) {
|
|
28
|
+
if (after)
|
|
29
|
+
manifest.project.sharePoContext = true;
|
|
30
|
+
else
|
|
31
|
+
delete manifest.project.sharePoContext;
|
|
32
|
+
writeManifest(root, manifest);
|
|
33
|
+
}
|
|
34
|
+
const payload = buildRepoContext(root);
|
|
35
|
+
out.info(t(after ? 'req.share.on' : 'req.share.off'));
|
|
36
|
+
if (after !== before)
|
|
37
|
+
out.info(t('req.share.changed'));
|
|
38
|
+
if (payload !== null) {
|
|
39
|
+
out.info(t('req.share.payload', {
|
|
40
|
+
risk: payload.catastrophicRisk === '' ? '—' : '1',
|
|
41
|
+
chars: String(payload.constitution.length),
|
|
42
|
+
terms: String(payload.glossary.length),
|
|
43
|
+
reqs: String(payload.requirements.length),
|
|
44
|
+
fragments: String(payload.fragments.length),
|
|
45
|
+
}));
|
|
46
|
+
// The bytes themselves, in human mode only: under --json the caller gets
|
|
47
|
+
// them inside the single result document the CLI prints.
|
|
48
|
+
if (!out.json)
|
|
49
|
+
printJson(payload);
|
|
50
|
+
}
|
|
51
|
+
return { enabled: after, changed: after !== before, payload };
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=reqShare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reqShare.js","sourceRoot":"","sources":["../../src/commands/reqShare.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAoBpD,MAAM,UAAU,WAAW,CAAC,UAA2B,EAAE;IACvD,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACnD,MAAM,CAAC,GAAG,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,IAAI,qBAAqB,CAAC,OAAO,CAAC,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;IAEhF,MAAM,QAAQ,GAAG,YAAY,C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E,yDAAyD;QACzD,IAAI,CAAC,GAAG,CAAC,IAAI;YAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,KAAK,MAAM,EAAE,OAAO,EAAE,CAAC;AAChE,CAAC"}
|
package/dist/commands/sync.d.ts
CHANGED
|
@@ -31,6 +31,13 @@ import type { Reporter } from '../util/out.js';
|
|
|
31
31
|
export declare const MAX_EVENTS_PER_BATCH = 500;
|
|
32
32
|
/** `https://github.com/acme/app.git` / `git@github.com:acme/app.git` → `github.com/acme/app`. */
|
|
33
33
|
export declare function normalizeRepoUrl(remote: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* The join key, exported because `invi keys status --check` must ask the
|
|
36
|
+
* platform about the SAME repo name this file would post under. A second,
|
|
37
|
+
* nearly-identical spelling of it is how a check passes while the work it
|
|
38
|
+
* vouches for lands under a repository nobody is looking at.
|
|
39
|
+
*/
|
|
40
|
+
export declare function repoName(root: string): string;
|
|
34
41
|
/** Minimal fetch-shaped seam so tests can capture the exact wire format. */
|
|
35
42
|
export type SyncFetch = (url: string, init: {
|
|
36
43
|
method: 'POST';
|
|
@@ -86,6 +93,12 @@ export interface SyncResult {
|
|
|
86
93
|
watermark: string | null;
|
|
87
94
|
/** Commits sent to /v1/ingest/trailers; null when none were sent. */
|
|
88
95
|
commits?: CommitSyncTotals | null;
|
|
96
|
+
/**
|
|
97
|
+
* The PO context report: `off` when the manifest has not turned it on,
|
|
98
|
+
* `unchanged` when the platform already has this exact content.
|
|
99
|
+
*/
|
|
100
|
+
context?: ContextOutcome;
|
|
89
101
|
}
|
|
102
|
+
export type ContextOutcome = 'off' | 'sent' | 'unchanged' | 'failed';
|
|
90
103
|
export declare function runSync(options?: SyncOptions): Promise<SyncResult>;
|
|
91
104
|
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAqBH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAkCxC,iGAAiG;AACjG,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CASvD;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa7C;AAMD,4EAA4E;AAC5E,MAAM,MAAM,SAAS,GAAG,CACtB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IACJ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,KACE,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;CAAE,CAAC,CAAC;AAExE,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iEAAiE;IACjE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACx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