@zaip-ai/cli 5.1.0 → 5.2.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/dist/services/adapters.d.ts +1 -1
- package/dist/services/adapters.js +1 -1
- package/dist/services/codex-native-tool-authority-template.d.ts.map +1 -1
- package/dist/services/codex-native-tool-authority-template.js +19 -12
- package/dist/services/codex-native-tool-authority-template.js.map +1 -1
- package/dist/services/codex-pre-tool-hook-template.js +6 -6
- package/dist/services/codex-pre-tool-host-context-template.d.ts.map +1 -1
- package/dist/services/codex-pre-tool-host-context-template.js +34 -3
- package/dist/services/codex-pre-tool-host-context-template.js.map +1 -1
- package/dist/services/codex-pre-tool-support-template.d.ts.map +1 -1
- package/dist/services/codex-pre-tool-support-template.js +24 -0
- package/dist/services/codex-pre-tool-support-template.js.map +1 -1
- package/dist/services/codex-windows-hook-command.d.ts.map +1 -1
- package/dist/services/codex-windows-hook-command.js +21 -2
- package/dist/services/codex-windows-hook-command.js.map +1 -1
- package/package.json +1 -1
- package/templates/.agents/README-ENG.md +10 -0
- package/templates/.agents/README.md +11 -0
- package/templates/.agents/config/agents/discovery.json +1 -1
- package/templates/.agents/dashboard/.zaip-managed.json +28 -28
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-CngnpoLL.js → DashboardHelpDialog-CDUKVlrH.js} +12 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-Bszw3ekd.js → PricingSettingsDialog-Czs55K79.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{ProjectSettingsPage-IJ1znG4w.js → ProjectSettingsPage-DhpaKwjC.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-CsBpHqq_.js → TraceabilityWorkspace-DPxfH469.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{dashboard-localization-D41g5rdo.js → dashboard-localization-BE_Zqtym.js} +10 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{index-Bedlm0f7.js → index-D5HmMZ27.js} +2 -2
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +1 -1
- package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
- package/templates/.agents/dashboard/modules/operations/package.json +1 -1
- package/templates/.agents/dashboard/modules/traceability/package.json +1 -1
- package/templates/.agents/dashboard/packages/branding/package.json +1 -1
- package/templates/.agents/dashboard/packages/contracts/package.json +1 -1
- package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +160 -160
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +110 -110
- package/templates/.agents/dashboard/packages/local-runtime/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +163 -163
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.test.mjs +0 -1
- package/templates/.agents/dashboard/packages/ui/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
- package/templates/.agents/design/.zaip-managed.json +3 -3
- package/templates/.agents/design/apps/catalog/package.json +1 -1
- package/templates/.agents/design/packages/local-runtime/package.json +1 -1
- package/templates/.agents/requirements/autonomous-assurance.md +1 -1
- package/templates/.agents/requirements/cloud-hostinger-autonomy.md +1 -1
- package/templates/.agents/requirements/comparative-audit.md +1 -1
- package/templates/.agents/requirements/context-engine.md +1 -1
- package/templates/.agents/requirements/cost-observability.md +1 -1
- package/templates/.agents/requirements/dashboard-launch.md +1 -1
- package/templates/.agents/requirements/data-export.md +1 -1
- package/templates/.agents/requirements/design-system.md +1 -1
- package/templates/.agents/requirements/execution-engine.md +1 -1
- package/templates/.agents/requirements/kanban-dashboard.md +1 -1
- package/templates/.agents/requirements/model-orchestration.md +1 -1
- package/templates/.agents/requirements/public-distribution.md +1 -1
- package/templates/.agents/requirements/software-architecture.md +1 -1
- package/templates/.agents/requirements/strategic-improvements.md +1 -1
- package/templates/.agents/requirements/work-lifecycle.md +1 -1
- package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
- package/templates/.agents/runtime/VERSION +1 -1
- package/templates/.agents/runtime/bin/zaip.mjs +116 -54
- package/templates/.agents/runtime/checksums.sha256 +5 -5
- package/templates/.agents/runtime/manifest.json +1 -1
- package/templates/.agents/runtime/provenance.json +4 -4
- package/templates/.agents/runtime/sbom.cdx.json +1 -1
- package/templates/.agents/zaip-aios/VERSION +1 -1
- package/templates/template-manifest.json +61 -61
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type PublicAgentCatalog } from "./agent-adapters.js";
|
|
2
2
|
export { isManagedAdapter } from "./managed-adapter.js";
|
|
3
|
-
export declare const ADAPTERS_VERSION = "5.
|
|
3
|
+
export declare const ADAPTERS_VERSION = "5.2.0";
|
|
4
4
|
export interface AdapterFile {
|
|
5
5
|
path: string;
|
|
6
6
|
content: string;
|
|
@@ -11,7 +11,7 @@ export { isManagedAdapter } from "./managed-adapter.js";
|
|
|
11
11
|
import { CODEX_GITHUB_DEPLOY_RULES, CODEX_SECURITY_RULES } from "./codex-rules.js";
|
|
12
12
|
import { codexWindowsHookCommand } from "./codex-windows-hook-command.js";
|
|
13
13
|
import { applyTransactionalChanges, assertSafeDestination } from "./transactional-files.js";
|
|
14
|
-
export const ADAPTERS_VERSION = "5.
|
|
14
|
+
export const ADAPTERS_VERSION = "5.2.0";
|
|
15
15
|
const ROOT_GUIDANCE = `# ZAIP-AIOS
|
|
16
16
|
|
|
17
17
|
Read \`.agents/config/project.yaml\` first. Apply ZAIP only for literal boolean \`zaip.enabled: true\`, except framework maintenance or \`zaip enable\`. \`AGENTS.md\` is a bootstrap; canonical guidance lives in \`.agents/\`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-native-tool-authority-template.d.ts","sourceRoot":"","sources":["../../src/services/codex-native-tool-authority-template.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gCAAgC,
|
|
1
|
+
{"version":3,"file":"codex-native-tool-authority-template.d.ts","sourceRoot":"","sources":["../../src/services/codex-native-tool-authority-template.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gCAAgC,QAiRT,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { CODEX_VALIDATION_RUNTIME_SUPPORT } from "./codex-validation-runtime-template.js";
|
|
2
|
-
export const CODEX_NATIVE_TOOL_AUTHORITY_HOOK = String.raw `import {
|
|
2
|
+
export const CODEX_NATIVE_TOOL_AUTHORITY_HOOK = String.raw `import { execFile } from "node:child_process";
|
|
3
|
+
import { promisify } from "node:util";
|
|
4
|
+
const executeGit = promisify(execFile);
|
|
3
5
|
import { createHash } from "node:crypto";
|
|
4
6
|
import { lstat, readFile, realpath } from "node:fs/promises";
|
|
5
7
|
import { dirname, isAbsolute, relative, resolve } from "node:path";
|
|
@@ -223,16 +225,21 @@ export async function hasCurrentTaskOrchestratorRun(event, installedRoot, bounde
|
|
|
223
225
|
}
|
|
224
226
|
|
|
225
227
|
/** A Task's product writer is claimed centrally before any edit. */
|
|
226
|
-
function isolatedGitMatchesClaim(repositoryRoot, authorityRoot, claim) {
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
228
|
+
async function isolatedGitMatchesClaim(repositoryRoot, authorityRoot, claim) {
|
|
229
|
+
const deadline = performance.now() + 3500;
|
|
230
|
+
const git = async (root, args) => {
|
|
231
|
+
const remaining = Math.floor(deadline - performance.now());
|
|
232
|
+
if (remaining <= 0) throw new Error("writer_validation_budget_exhausted");
|
|
233
|
+
return (await executeGit("git", ["-C", root, ...args], {
|
|
234
|
+
encoding: "utf8", windowsHide: true, timeout: Math.min(1500, remaining), maxBuffer: 1048576,
|
|
235
|
+
env: Object.fromEntries(Object.entries(process.env).filter(([key]) => !/^(GIT_|NODE_OPTIONS$)/i.test(key))),
|
|
236
|
+
})).stdout.trim();
|
|
237
|
+
};
|
|
238
|
+
if (resolve(await git(repositoryRoot, ["rev-parse", "--show-toplevel"])) !== resolve(repositoryRoot) ||
|
|
239
|
+
await git(repositoryRoot, ["branch", "--show-current"]) !== claim.branch) return false;
|
|
240
|
+
const head = await git(repositoryRoot, ["rev-parse", "HEAD"]);
|
|
241
|
+
if (head !== await git(authorityRoot, ["rev-parse", claim.branch])) return false;
|
|
242
|
+
return (await git(authorityRoot, ["worktree", "list", "--porcelain"])).split(/\r?\n\r?\n/).some(block => {
|
|
236
243
|
const lines = block.split(/\r?\n/);
|
|
237
244
|
return lines.some(line => line.startsWith("worktree ") && resolve(line.slice(9)) === resolve(repositoryRoot)) &&
|
|
238
245
|
lines.includes("HEAD " + head) && lines.includes("branch refs/heads/" + claim.branch);
|
|
@@ -261,7 +268,7 @@ export async function hasClaimedTaskWriter(event, repositoryRoot, boundedRead, d
|
|
|
261
268
|
typeof isolated.branch === "string" && isolated.branch.startsWith("codex/") &&
|
|
262
269
|
resolve(isolated.path) === resolve(repositoryRoot) &&
|
|
263
270
|
resolve(isolated.canonical_workspace) === resolve(authorityRoot) &&
|
|
264
|
-
isolatedGitMatchesClaim(repositoryRoot, authorityRoot, isolated);
|
|
271
|
+
await isolatedGitMatchesClaim(repositoryRoot, authorityRoot, isolated);
|
|
265
272
|
} catch { return false; }
|
|
266
273
|
}
|
|
267
274
|
` + CODEX_VALIDATION_RUNTIME_SUPPORT;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-native-tool-authority-template.js","sourceRoot":"","sources":["../../src/services/codex-native-tool-authority-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAC1F,MAAM,CAAC,MAAM,gCAAgC,GAC3C,MAAM,CAAC,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"codex-native-tool-authority-template.js","sourceRoot":"","sources":["../../src/services/codex-native-tool-authority-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAC1F,MAAM,CAAC,MAAM,gCAAgC,GAC3C,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgRX,GAAG,gCAAgC,CAAC"}
|
|
@@ -5,9 +5,9 @@ import { lstat, readFile, realpath } from "node:fs/promises";
|
|
|
5
5
|
import { dirname, isAbsolute, relative, resolve } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import { promisify } from "node:util";
|
|
8
|
-
import { captureCliTurn, checkDestructivePatterns, configuredDeploymentBranches, configuredPermissionProfile, gitInvocation, inside, isLiteralReadSequence,
|
|
8
|
+
import { captureCliTurn, createHookBudget, checkDestructivePatterns, configuredDeploymentBranches, configuredPermissionProfile, gitInvocation, inside, isLiteralReadSequence, readBoundedCanonicalText, requiresShellMutationRun, reviewedContextReadPaths, reviewedReleasePaths, rewriteCliInput, selectHookExecutionWorkspace, selectHookRepositoryRoot, shellSyntax, tokenizeLiteralCommand, validateInlineExecution } from "./zaip-pre-tool-support.mjs";
|
|
9
9
|
import { createCloudValidators } from "./zaip-pre-tool-cloud.mjs";
|
|
10
|
-
const execute = promisify(execFile);
|
|
10
|
+
const { execute, parseEvent } = createHookBudget(promisify(execFile));
|
|
11
11
|
const nativeAuthority = await import("./zaip-native-tool-authority.mjs").catch(() => null);
|
|
12
12
|
const activation = await import("./zaip-hook-activation.mjs").catch(() => null);
|
|
13
13
|
const installedRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
@@ -133,8 +133,8 @@ const destructivePatterns = [
|
|
|
133
133
|
},
|
|
134
134
|
];
|
|
135
135
|
|
|
136
|
-
function deny(reason) {
|
|
137
|
-
activation?.recordActivation(repositoryRoot, event, "denied");
|
|
136
|
+
function deny(reason, record = true) {
|
|
137
|
+
if (record) activation?.recordActivation(repositoryRoot, event, "denied");
|
|
138
138
|
writeSync(
|
|
139
139
|
1,
|
|
140
140
|
JSON.stringify({
|
|
@@ -195,7 +195,7 @@ async function validateExplicitFilesystemReferences(command, cwd, reviewedPaths
|
|
|
195
195
|
if (homeReferencePattern.test(checked)) {
|
|
196
196
|
deny("Direct user-profile path references are blocked; use repository-scoped paths.");
|
|
197
197
|
}
|
|
198
|
-
if (credentialReferencePattern.test(checked) || sensitiveEnvironmentPattern.test(checked)) {
|
|
198
|
+
if (credentialReferencePattern.test(checked.replace(/[;|&()]/g, " ")) || sensitiveEnvironmentPattern.test(checked)) {
|
|
199
199
|
deny("Direct credential and secret access is blocked.");
|
|
200
200
|
}
|
|
201
201
|
if (/\b(?:Get-ChildItem|gci|dir|Get-Item|gi)(?:\s+-(?:LiteralPath|Path))?\s+(?:Env|Variable|Function|Alias):|\b(?:printenv|set)\s*$/i.test(checked) || /GetEnvironmentVariables\s*\(/i.test(checked)) {
|
|
@@ -535,7 +535,7 @@ let raw = "";
|
|
|
535
535
|
for await (const chunk of process.stdin) raw += chunk;
|
|
536
536
|
|
|
537
537
|
let event;
|
|
538
|
-
event =
|
|
538
|
+
event = parseEvent(raw, deny);
|
|
539
539
|
|
|
540
540
|
const toolInput = event?.tool_input;
|
|
541
541
|
const candidateWorkdir = typeof toolInput?.workdir === "string" && isAbsolute(toolInput.workdir) ? toolInput.workdir : event.cwd;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-pre-tool-host-context-template.d.ts","sourceRoot":"","sources":["../../src/services/codex-pre-tool-host-context-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,
|
|
1
|
+
{"version":3,"file":"codex-pre-tool-host-context-template.d.ts","sourceRoot":"","sources":["../../src/services/codex-pre-tool-host-context-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,QAwK5C,CAAC"}
|
|
@@ -5,7 +5,28 @@ import { promisify } from "node:util";
|
|
|
5
5
|
const execute = promisify(execFile);
|
|
6
6
|
const pathIdentity = value => process.platform === "win32" ? toNamespacedPath(resolve(value)).toLowerCase() : resolve(value);
|
|
7
7
|
|
|
8
|
+
export function createHookBudget(executeFile) {
|
|
9
|
+
const deadline = performance.now() + 6500;
|
|
10
|
+
return {
|
|
11
|
+
execute(file, args, options = {}) {
|
|
12
|
+
const remaining = Math.floor(deadline - performance.now());
|
|
13
|
+
if (remaining <= 0) throw new Error("Hook validation budget exhausted; inspect the slow dependency before retrying.");
|
|
14
|
+
return executeFile(file, args, { ...options, timeout: Math.min(options.timeout ?? remaining, remaining) });
|
|
15
|
+
},
|
|
16
|
+
parseEvent(raw, deny) {
|
|
17
|
+
let event; try { event = JSON.parse(raw); } catch { deny("Malformed hook input was rejected."); }
|
|
18
|
+
// Headroom for the Windows launcher; a stalled dependency never grants authority.
|
|
19
|
+
const timer = setTimeout(() => deny("Hook validation budget exhausted. Inspect the slow Git/filesystem dependency before retrying; authorization was not granted.", false), Math.max(1, deadline - performance.now()));
|
|
20
|
+
timer.unref();
|
|
21
|
+
return event;
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
8
26
|
export function createHostContext({ inside, readBoundedCanonicalText }) {
|
|
27
|
+
// One hook invocation only: never reuse filesystem authority across tool calls.
|
|
28
|
+
const roots = new Map();
|
|
29
|
+
const deadline = performance.now() + 6000;
|
|
9
30
|
/** Project configuration selects ZAIP policy; the host still enforces effective ACLs. */
|
|
10
31
|
async function configuredPermissionProfile(installedRoot) {
|
|
11
32
|
const restricted = { filesystem: false, network: false };
|
|
@@ -82,6 +103,11 @@ async function configuredPermissionProfile(installedRoot) {
|
|
|
82
103
|
}
|
|
83
104
|
|
|
84
105
|
async function selectHookRepositoryRoot(installedRoot, cwd) {
|
|
106
|
+
const key = JSON.stringify([installedRoot, cwd]);
|
|
107
|
+
if (!roots.has(key)) roots.set(key, resolveHookRepositoryRoot(installedRoot, cwd));
|
|
108
|
+
return roots.get(key);
|
|
109
|
+
}
|
|
110
|
+
async function resolveHookRepositoryRoot(installedRoot, cwd) {
|
|
85
111
|
if (typeof cwd !== "string") throw new Error("Tool execution without a workspace is blocked.");
|
|
86
112
|
const physicalCwd = await realpath(cwd).catch(() => null);
|
|
87
113
|
if (!physicalCwd || pathIdentity(physicalCwd) !== pathIdentity(cwd)) {
|
|
@@ -95,13 +121,18 @@ async function selectHookRepositoryRoot(installedRoot, cwd) {
|
|
|
95
121
|
if (cursor.toLowerCase() === installedRoot.toLowerCase()) return installedRoot;
|
|
96
122
|
}
|
|
97
123
|
try {
|
|
98
|
-
const git = async (path, ...args) =>
|
|
99
|
-
|
|
100
|
-
|
|
124
|
+
const git = async (path, ...args) => {
|
|
125
|
+
const remaining = Math.floor(deadline - performance.now());
|
|
126
|
+
if (remaining <= 0) throw new Error("workspace_validation_budget_exhausted");
|
|
127
|
+
return (await execute("git", ["-C", path, ...args], {
|
|
128
|
+
encoding: "utf8", windowsHide: true, timeout: Math.min(2000, remaining), maxBuffer: 1048576,
|
|
129
|
+
})).stdout.trim();
|
|
130
|
+
};
|
|
101
131
|
const primary = await git(installedRoot, "rev-parse", "--show-toplevel");
|
|
102
132
|
if ((await realpath(primary)).toLowerCase() !== installedRoot.toLowerCase()) throw new Error("primary_not_root");
|
|
103
133
|
const worktrees = await git(installedRoot, "worktree", "list", "--porcelain", "-z");
|
|
104
134
|
const registered = worktrees.split("\0").filter(line => line.startsWith("worktree ")).map(line => line.slice(9));
|
|
135
|
+
if (!registered.some(path => inside(cwd, resolve(path)))) throw new Error("worktree_not_registered");
|
|
105
136
|
const candidate = await realpath(await git(cwd, "rev-parse", "--show-toplevel"));
|
|
106
137
|
if (!registered.some(path => resolve(path).toLowerCase() === candidate.toLowerCase()) || !inside(cwd, candidate)) {
|
|
107
138
|
throw new Error("worktree_not_registered");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-pre-tool-host-context-template.js","sourceRoot":"","sources":["../../src/services/codex-pre-tool-host-context-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gCAAgC,GAAG,MAAM,CAAC,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"codex-pre-tool-host-context-template.js","sourceRoot":"","sources":["../../src/services/codex-pre-tool-host-context-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gCAAgC,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwKzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-pre-tool-support-template.d.ts","sourceRoot":"","sources":["../../src/services/codex-pre-tool-support-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"codex-pre-tool-support-template.d.ts","sourceRoot":"","sources":["../../src/services/codex-pre-tool-support-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,QA6YvC,CAAC"}
|
|
@@ -24,6 +24,8 @@ export function parseHookEvent(raw, deny) {
|
|
|
24
24
|
catch { deny("Malformed hook input was rejected."); }
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
export { createHookBudget } from "./zaip-pre-tool-host-context.mjs";
|
|
28
|
+
|
|
27
29
|
export const { configuredPermissionProfile, selectHookRepositoryRoot, selectHookExecutionWorkspace } = createHostContext({ inside, readBoundedCanonicalText });
|
|
28
30
|
|
|
29
31
|
export function tokenizeLiteralCommand(command) {
|
|
@@ -99,6 +101,27 @@ export function requiresShellMutationRun(command, tokens, cwd, repositoryRoot) {
|
|
|
99
101
|
|
|
100
102
|
// Recognize only literal read-only pipelines/sequences. Quoted search text is data,
|
|
101
103
|
// not a PowerShell alias (for example the AC prefix in acceptance-criterion IDs).
|
|
104
|
+
function isLiteralGitRead(values) {
|
|
105
|
+
if (!/^(?:git|git\.exe)$/i.test(values[0])) return false;
|
|
106
|
+
// Deliberately narrow: only the fixed fsmonitor=false override, no aliases, routing, pagers, external diff,
|
|
107
|
+
// textconv, output files, or mutating subcommands in a read sequence.
|
|
108
|
+
const args = values.slice(1);
|
|
109
|
+
if (args.shift() !== "--no-pager" || args.shift() !== "-c" || args.shift() !== "core.fsmonitor=false") return false;
|
|
110
|
+
const subcommand = args.shift();
|
|
111
|
+
if (!["status", "log", "rev-parse", "diff"].includes(subcommand)) return false;
|
|
112
|
+
if (["diff", "log"].includes(subcommand) && !["--no-ext-diff", "--no-textconv"].every(flag => args.includes(flag))) return false;
|
|
113
|
+
if (subcommand === "log" && !["--no-patch", "--no-show-signature"].every(flag => args.includes(flag))) return false;
|
|
114
|
+
if (subcommand === "diff" && !["--name-only", "--name-status", "--stat", "--check"].some(flag => args.includes(flag))) return false;
|
|
115
|
+
const options = {
|
|
116
|
+
status: /^(?:-s|-b|--short|--branch|--porcelain(?:=v?[12])?|--untracked-files(?:=(?:no|normal|all))?|--ignored(?:=(?:traditional|matching|no))?)$/,
|
|
117
|
+
log: /^(?:--no-ext-diff|--no-textconv|--no-patch|--no-show-signature|--oneline|--all|--decorate(?:=(?:short|full|no))?|--no-decorate|--date-order|--topo-order|--reverse|--no-merges|--merges|--max-count=\d+|-\d+|--format=(?:%H|%h|%s|%H%x09%s))$/,
|
|
118
|
+
"rev-parse": /^(?:--show-toplevel|--git-common-dir|--absolute-git-dir|--is-inside-work-tree|--show-prefix|--verify|--short(?:=\d+)?|--symbolic-full-name|--abbrev-ref|--end-of-options)$/,
|
|
119
|
+
diff: /^(?:--name-only|--name-status|--stat|--check|--cached|--staged|--no-ext-diff|--no-textconv|--exit-code|--quiet)$/,
|
|
120
|
+
};
|
|
121
|
+
return args.every(value => value.startsWith("-") ? options[subcommand].test(value) :
|
|
122
|
+
// Plain revisions/pathspecs only; shell syntax was already parsed separately.
|
|
123
|
+
/^[A-Za-z0-9_./@~^:\\-]+$/.test(value));
|
|
124
|
+
}
|
|
102
125
|
export function isLiteralReadSequence(command) {
|
|
103
126
|
const syntax = shellSyntax(command);
|
|
104
127
|
if (syntax.interpolation || syntax.redirection || syntax.grouping) return false;
|
|
@@ -119,6 +142,7 @@ export function isLiteralReadSequence(command) {
|
|
|
119
142
|
return parts.every(part => {
|
|
120
143
|
const values = tokenizeLiteralCommand(part);
|
|
121
144
|
if (!values?.length) return false;
|
|
145
|
+
if (isLiteralGitRead(values)) return true;
|
|
122
146
|
if (/^Get-Item$/i.test(values[0])) {
|
|
123
147
|
const args = values.slice(1);
|
|
124
148
|
const path = args[0] === "-LiteralPath" ? args[1] : args[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-pre-tool-support-template.js","sourceRoot":"","sources":["../../src/services/codex-pre-tool-support-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"codex-pre-tool-support-template.js","sourceRoot":"","sources":["../../src/services/codex-pre-tool-support-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6YpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-windows-hook-command.d.ts","sourceRoot":"","sources":["../../src/services/codex-windows-hook-command.ts"],"names":[],"mappings":"AAEA,wEAAwE;AACxE,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"codex-windows-hook-command.d.ts","sourceRoot":"","sources":["../../src/services/codex-windows-hook-command.ts"],"names":[],"mappings":"AAEA,wEAAwE;AACxE,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CA2BpF"}
|
|
@@ -3,10 +3,29 @@ import { resolve } from "node:path";
|
|
|
3
3
|
export function codexWindowsHookCommand(hook, workspaceRoot) {
|
|
4
4
|
if (!/^zaip-[a-z-]+\.mjs$/.test(hook))
|
|
5
5
|
throw new Error(`Invalid ZAIP hook name: ${hook}`);
|
|
6
|
-
const
|
|
6
|
+
const search = workspaceRoot === undefined
|
|
7
7
|
? "(Get-Location)"
|
|
8
8
|
: `'${resolve(workspaceRoot).replaceAll("'", "''")}'`;
|
|
9
|
-
const script =
|
|
9
|
+
const script = [
|
|
10
|
+
"$ProgressPreference = 'SilentlyContinue'",
|
|
11
|
+
`$search = ${search}`,
|
|
12
|
+
"$git = $null",
|
|
13
|
+
"while ($search) { $candidate = Join-Path $search '.local/git/cmd/git.exe'; if (Test-Path -LiteralPath $candidate -PathType Leaf) { $git = $candidate; break }; $parent = Split-Path -Path $search -Parent; if (!$parent -or $parent -eq $search) { break }; $search = $parent }",
|
|
14
|
+
"if (!$git) { $git = (Get-Command git -ErrorAction SilentlyContinue).Source }",
|
|
15
|
+
"if (!$git) { exit 0 }",
|
|
16
|
+
"$probe = New-Object System.Diagnostics.Process",
|
|
17
|
+
"$probe.StartInfo.FileName = $git",
|
|
18
|
+
"$probe.StartInfo.Arguments = 'rev-parse --show-toplevel'",
|
|
19
|
+
"$probe.StartInfo.UseShellExecute = $false",
|
|
20
|
+
"$probe.StartInfo.CreateNoWindow = $true",
|
|
21
|
+
"$probe.StartInfo.RedirectStandardOutput = $true",
|
|
22
|
+
"$probe.StartInfo.RedirectStandardError = $true",
|
|
23
|
+
"try { if (!$probe.Start()) { throw 'git discovery failed' }; $output = $probe.StandardOutput.ReadToEndAsync(); $errors = $probe.StandardError.ReadToEndAsync(); if (!$probe.WaitForExit(1500)) { $probe.Kill(); [Console]::Error.WriteLine('ZAIP hook: Git discovery exceeded 1500ms; retry after checking Git availability.'); exit 2 }; $root = $output.GetAwaiter().GetResult().Trim(); if ($probe.ExitCode -ne 0 -or !$root) { exit 0 } } catch { [Console]::Error.WriteLine('ZAIP hook: Git discovery failed.'); exit 2 } finally { $probe.Dispose() }",
|
|
24
|
+
`$hook = Join-Path $root '.codex/hooks/${hook}'`,
|
|
25
|
+
"if (!(Test-Path -LiteralPath $hook -PathType Leaf)) { exit 0 }",
|
|
26
|
+
"& node $hook",
|
|
27
|
+
"exit $LASTEXITCODE",
|
|
28
|
+
].join("; ");
|
|
10
29
|
return `powershell -NoProfile -NonInteractive -EncodedCommand ${Buffer.from(script, "utf16le").toString("base64")}`;
|
|
11
30
|
}
|
|
12
31
|
//# sourceMappingURL=codex-windows-hook-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-windows-hook-command.js","sourceRoot":"","sources":["../../src/services/codex-windows-hook-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,wEAAwE;AACxE,MAAM,UAAU,uBAAuB,CAAC,IAAY,EAAE,aAAsB;IAC1E,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,EAAE,CAAC,CAAC;IAC1F,MAAM,
|
|
1
|
+
{"version":3,"file":"codex-windows-hook-command.js","sourceRoot":"","sources":["../../src/services/codex-windows-hook-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,wEAAwE;AACxE,MAAM,UAAU,uBAAuB,CAAC,IAAY,EAAE,aAAsB;IAC1E,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,EAAE,CAAC,CAAC;IAC1F,MAAM,MAAM,GACV,aAAa,KAAK,SAAS;QACzB,CAAC,CAAC,gBAAgB;QAClB,CAAC,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC;IAC1D,MAAM,MAAM,GAAG;QACb,0CAA0C;QAC1C,aAAa,MAAM,EAAE;QACrB,cAAc;QACd,iRAAiR;QACjR,8EAA8E;QAC9E,uBAAuB;QACvB,gDAAgD;QAChD,kCAAkC;QAClC,0DAA0D;QAC1D,2CAA2C;QAC3C,yCAAyC;QACzC,iDAAiD;QACjD,gDAAgD;QAChD,6hBAA6hB;QAC7hB,yCAAyC,IAAI,GAAG;QAChD,gEAAgE;QAChE,cAAc;QACd,oBAAoB;KACrB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACb,OAAO,yDAAyD,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;AACtH,CAAC"}
|
package/package.json
CHANGED
|
@@ -12,6 +12,16 @@ test reuse, content-based Dashboard builds and separate npm confirmation.
|
|
|
12
12
|
Authorized maintenance suspends governance while keeping telemetry active;
|
|
13
13
|
governance is restored and hooks are checked when maintenance ends.
|
|
14
14
|
|
|
15
|
+
The [hook repair guide](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/hooks-leitura-e-orcamento.md) describes
|
|
16
|
+
permitted Git read sequences, validation time budgets, and retained protections.
|
|
17
|
+
Git read sequences use `git --no-pager -c core.fsmonitor=false` and the documented
|
|
18
|
+
safe options; Git mutations still require separate commands.
|
|
19
|
+
|
|
20
|
+
The [v5.2 reliability plan](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/v52-confiabilidade-e-eficiencia.md)
|
|
21
|
+
records bounded Git discovery in the Windows launcher, observation recovery
|
|
22
|
+
after maintenance, thread-scoped Run queries, and validation cache measurements.
|
|
23
|
+
Evidence distinguishes local tests, independent review, and package publication.
|
|
24
|
+
|
|
15
25
|
> **Source, candidate, and publication:** this README describes the checkout's
|
|
16
26
|
> contracts and features. The [evolution matrix](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/v50-documentacao-editorial.md)
|
|
17
27
|
> identifies implementation and evidence. Local qualification, consumer hook
|
|
@@ -12,6 +12,17 @@ o reuso conservador de testes, o build do Dashboard por conteúdo e a confirmaç
|
|
|
12
12
|
separada do npm. Manutenção autorizada suspende a governança com telemetria ativa;
|
|
13
13
|
ao terminar, a governança é reativada e os hooks são verificados.
|
|
14
14
|
|
|
15
|
+
O [guia de correção dos hooks](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/hooks-leitura-e-orcamento.md) descreve
|
|
16
|
+
as sequências Git de leitura permitidas, os limites de tempo da validação e as
|
|
17
|
+
proteções preservadas. Sequências Git de leitura usam o prefixo
|
|
18
|
+
`git --no-pager -c core.fsmonitor=false` e as opções seguras documentadas;
|
|
19
|
+
alterações Git continuam exigindo comandos separados.
|
|
20
|
+
|
|
21
|
+
O [plano de confiabilidade da v5.2](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/v52-confiabilidade-e-eficiencia.md)
|
|
22
|
+
registra a descoberta Git limitada no launcher Windows, a retomada da observação
|
|
23
|
+
após manutenção, a consulta de Runs por chat e a medição do cache de validação.
|
|
24
|
+
As evidências distinguem testes locais, revisão e publicação do pacote.
|
|
25
|
+
|
|
15
26
|
> **Fonte, candidato e publicação:** este README descreve os contratos e recursos
|
|
16
27
|
> do checkout. A [matriz de evolução](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/v50-documentacao-editorial.md)
|
|
17
28
|
> identifica a implementação e suas provas. Qualificação local, ativação dos
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_zaip_managed": "zaip-managed generated-do-not-edit source=agent-discovery version=5.
|
|
2
|
+
"_zaip_managed": "zaip-managed generated-do-not-edit source=agent-discovery version=5.2.0 sha256=3def7a2b43c1a751f8e68754ef94cb107a80b5d26e11f065af2b4cc145fc8897",
|
|
3
3
|
"schema_version": 1,
|
|
4
4
|
"source": {
|
|
5
5
|
"path": ".agents/config/agents/catalog.yaml",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
6
|
"path": "DATA-DICTIONARY.md",
|
|
@@ -15,28 +15,28 @@
|
|
|
15
15
|
"sha256": "d0366ee0d847fe681de0971a14c80ee3a6af1430c0e9c5eb4f84f14a4b734b82"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"path": "apps/frontend/dist/assets/DashboardHelpDialog-
|
|
19
|
-
"sha256": "
|
|
18
|
+
"path": "apps/frontend/dist/assets/DashboardHelpDialog-CDUKVlrH.js",
|
|
19
|
+
"sha256": "bbf13f0ff0788e92a3497eebfbf55ba50d4d5049a232ce8a1bf76eddf5ce2f27"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"path": "apps/frontend/dist/assets/DashboardHelpDialog-DRI_XwUf.css",
|
|
23
23
|
"sha256": "95dbb5c26ad73831f36f2a51d5e08ef5eee7ca85190764a3e63bf1e700fbadf8"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
"path": "apps/frontend/dist/assets/PricingSettingsDialog-
|
|
27
|
-
"sha256": "
|
|
26
|
+
"path": "apps/frontend/dist/assets/PricingSettingsDialog-Czs55K79.js",
|
|
27
|
+
"sha256": "a7b033808de2f224ef57a25f54cd010248409aee921739d8d9aaf2c0350a3866"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"path": "apps/frontend/dist/assets/ProjectSettingsPage-CQMhvzvJ.css",
|
|
31
31
|
"sha256": "10e875c4e3ab6c252983822e25a85db3d707d903c0fcf39812909fdd1d013f48"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
"path": "apps/frontend/dist/assets/ProjectSettingsPage-
|
|
35
|
-
"sha256": "
|
|
34
|
+
"path": "apps/frontend/dist/assets/ProjectSettingsPage-DhpaKwjC.js",
|
|
35
|
+
"sha256": "1a5c8c57b23ab8348c5538644dbb3b7067e8c17db6207a3b8ab473d16abe458e"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
"path": "apps/frontend/dist/assets/TraceabilityWorkspace-
|
|
39
|
-
"sha256": "
|
|
38
|
+
"path": "apps/frontend/dist/assets/TraceabilityWorkspace-DPxfH469.js",
|
|
39
|
+
"sha256": "869219fb3134c6bedc64160bb34dd9ae3e08b10d5026b3e6744d423dd0967d44"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"path": "apps/frontend/dist/assets/TraceabilityWorkspace-DvvavDLY.css",
|
|
@@ -51,16 +51,16 @@
|
|
|
51
51
|
"sha256": "90be9550e3b6719ffc7a029ac35a93a4f14e95263b3996ad6c06dbfc0490f307"
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
"path": "apps/frontend/dist/assets/dashboard-localization-
|
|
55
|
-
"sha256": "
|
|
54
|
+
"path": "apps/frontend/dist/assets/dashboard-localization-BE_Zqtym.js",
|
|
55
|
+
"sha256": "ca81cef8daca1266f83cc5eaeb114418031b51b531c7ecc9725d29c508f713f1"
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"path": "apps/frontend/dist/assets/icons-vendor-CjGGux6h.js",
|
|
59
59
|
"sha256": "0f615bc6eaeb21d12fc0457867d6acbfe9434ebae0ebecea9444262e46b972e9"
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
|
-
"path": "apps/frontend/dist/assets/index-
|
|
63
|
-
"sha256": "
|
|
62
|
+
"path": "apps/frontend/dist/assets/index-D5HmMZ27.js",
|
|
63
|
+
"sha256": "116813c811425cbddd8daeaf10f685529bd39f1addf13ad0817e200eb92e4da4"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
"path": "apps/frontend/dist/assets/index-DZhppOIk.css",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
"path": "apps/frontend/dist/index.html",
|
|
95
|
-
"sha256": "
|
|
95
|
+
"sha256": "afa794b12e75a74533290aaacad53a7cedf0195915b59adf97c66614ab200df2"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"path": "apps/frontend/dist/logo_novo_azul.png",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
"path": "apps/frontend/package.json",
|
|
107
|
-
"sha256": "
|
|
107
|
+
"sha256": "4d7ac554045ecc7a746ca6ab08ba7e648937d287e63b7de3ce168c0f5ed5dd41"
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
"path": "apps/frontend/playwright.dom.config.ts",
|
|
@@ -600,7 +600,7 @@
|
|
|
600
600
|
},
|
|
601
601
|
{
|
|
602
602
|
"path": "modules/cost-monitor/package.json",
|
|
603
|
-
"sha256": "
|
|
603
|
+
"sha256": "cb6e9ea88e67bc2d995ab1f8e3e5b094cef307789767565ac8aaafd5863d3413"
|
|
604
604
|
},
|
|
605
605
|
{
|
|
606
606
|
"path": "modules/cost-monitor/src/agent-groups.test.ts",
|
|
@@ -1012,7 +1012,7 @@
|
|
|
1012
1012
|
},
|
|
1013
1013
|
{
|
|
1014
1014
|
"path": "modules/operations/package.json",
|
|
1015
|
-
"sha256": "
|
|
1015
|
+
"sha256": "1cdade9fcf22258e1d3a381cc44b296b85c0fa470ef735fdf013bf6b912f7783"
|
|
1016
1016
|
},
|
|
1017
1017
|
{
|
|
1018
1018
|
"path": "modules/operations/src/contracts.ts",
|
|
@@ -1752,7 +1752,7 @@
|
|
|
1752
1752
|
},
|
|
1753
1753
|
{
|
|
1754
1754
|
"path": "modules/traceability/package.json",
|
|
1755
|
-
"sha256": "
|
|
1755
|
+
"sha256": "a567d3b79ed93f40f32b8e869abae93b839588c3d376f985a41f8e070a17a032"
|
|
1756
1756
|
},
|
|
1757
1757
|
{
|
|
1758
1758
|
"path": "modules/traceability/src/contracts.ts",
|
|
@@ -1824,7 +1824,7 @@
|
|
|
1824
1824
|
},
|
|
1825
1825
|
{
|
|
1826
1826
|
"path": "packages/branding/package.json",
|
|
1827
|
-
"sha256": "
|
|
1827
|
+
"sha256": "c87a2648416f60079b50642a5eda2522b6166b2215e2bbfe0d3f204e2aa34828"
|
|
1828
1828
|
},
|
|
1829
1829
|
{
|
|
1830
1830
|
"path": "packages/branding/src/index.ts",
|
|
@@ -1836,7 +1836,7 @@
|
|
|
1836
1836
|
},
|
|
1837
1837
|
{
|
|
1838
1838
|
"path": "packages/contracts/package.json",
|
|
1839
|
-
"sha256": "
|
|
1839
|
+
"sha256": "e92b8965d8158388abb46266bab5dd8b9f3f9cffe1ea4fa11f0730b38fdf1c72"
|
|
1840
1840
|
},
|
|
1841
1841
|
{
|
|
1842
1842
|
"path": "packages/contracts/src/export.ts",
|
|
@@ -1856,7 +1856,7 @@
|
|
|
1856
1856
|
},
|
|
1857
1857
|
{
|
|
1858
1858
|
"path": "packages/data-export/package.json",
|
|
1859
|
-
"sha256": "
|
|
1859
|
+
"sha256": "5f964cfadd84f8b2acd652ef30fe9994eedb95c3d9882eb8f0fab4748c9ae161"
|
|
1860
1860
|
},
|
|
1861
1861
|
{
|
|
1862
1862
|
"path": "packages/data-export/src/index.test.ts",
|
|
@@ -1904,15 +1904,15 @@
|
|
|
1904
1904
|
},
|
|
1905
1905
|
{
|
|
1906
1906
|
"path": "packages/local-runtime/dist/server.cjs",
|
|
1907
|
-
"sha256": "
|
|
1907
|
+
"sha256": "b120e6413f119dbb495680c4656d794951049d6b4800f6df4d6be882778dafbe"
|
|
1908
1908
|
},
|
|
1909
1909
|
{
|
|
1910
1910
|
"path": "packages/local-runtime/dist/sqlite-read-model.cjs",
|
|
1911
|
-
"sha256": "
|
|
1911
|
+
"sha256": "3a39825058ef54ddf71b1d4c9234b25a97ae8135b58ca1467e20d9dbe6d4dab3"
|
|
1912
1912
|
},
|
|
1913
1913
|
{
|
|
1914
1914
|
"path": "packages/local-runtime/package.json",
|
|
1915
|
-
"sha256": "
|
|
1915
|
+
"sha256": "8da451715ec125a910f6982fde8f70ff001c0e91deeb97022dddcd373b5eb2c2"
|
|
1916
1916
|
},
|
|
1917
1917
|
{
|
|
1918
1918
|
"path": "packages/local-runtime/scripts/build-frontend.mjs",
|
|
@@ -1968,7 +1968,7 @@
|
|
|
1968
1968
|
},
|
|
1969
1969
|
{
|
|
1970
1970
|
"path": "packages/local-runtime/server.mjs",
|
|
1971
|
-
"sha256": "
|
|
1971
|
+
"sha256": "034097a697015e5c364f6f9714484e40797b5c407e36049c15b5f8950a0912c7"
|
|
1972
1972
|
},
|
|
1973
1973
|
{
|
|
1974
1974
|
"path": "packages/local-runtime/src/active-capture-failure.test.ts",
|
|
@@ -2836,7 +2836,7 @@
|
|
|
2836
2836
|
},
|
|
2837
2837
|
{
|
|
2838
2838
|
"path": "packages/local-runtime/start-dashboard.test.mjs",
|
|
2839
|
-
"sha256": "
|
|
2839
|
+
"sha256": "2bced928062f23b88e2aedc25b41ce5639a21ba05154261c2e0db192fead7875"
|
|
2840
2840
|
},
|
|
2841
2841
|
{
|
|
2842
2842
|
"path": "packages/local-runtime/tsconfig.json",
|
|
@@ -2848,7 +2848,7 @@
|
|
|
2848
2848
|
},
|
|
2849
2849
|
{
|
|
2850
2850
|
"path": "packages/ui/package.json",
|
|
2851
|
-
"sha256": "
|
|
2851
|
+
"sha256": "02b9926927d97b3c09b1676c42f83a938082dae5f46f2d5b02e6ecddce7e4935"
|
|
2852
2852
|
},
|
|
2853
2853
|
{
|
|
2854
2854
|
"path": "packages/ui/src/DashboardHeader.test.mjs",
|
|
@@ -2956,7 +2956,7 @@
|
|
|
2956
2956
|
},
|
|
2957
2957
|
{
|
|
2958
2958
|
"path": "tests/e2e/package.json",
|
|
2959
|
-
"sha256": "
|
|
2959
|
+
"sha256": "c0239143bafab4cafcae58d1224748fecd0ab4d6270b753bc6ab718b0b2b20d5"
|
|
2960
2960
|
},
|
|
2961
2961
|
{
|
|
2962
2962
|
"path": "tests/e2e/playwright.config.ts",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-Bh1tDfsg.js";import{E as t,w as n}from"./cost-monitor-B0Jwz_rk.js";import{t as r}from"./dashboard-localization-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-Bh1tDfsg.js";import{E as t,w as n}from"./cost-monitor-B0Jwz_rk.js";import{t as r}from"./dashboard-localization-BE_Zqtym.js";var i=`# Primeiros passos
|
|
2
2
|
|
|
3
3
|
1. Leia \`.agents/config/project.yaml\` e \`.agents/rules/core.md\`.
|
|
4
4
|
2. Consulte \`.agents/records/lifecycle/\` para descobrir o estado atual pelos manifests canônicos.
|
|
@@ -2349,6 +2349,17 @@ o reuso conservador de testes, o build do Dashboard por conteúdo e a confirmaç
|
|
|
2349
2349
|
separada do npm. Manutenção autorizada suspende a governança com telemetria ativa;
|
|
2350
2350
|
ao terminar, a governança é reativada e os hooks são verificados.
|
|
2351
2351
|
|
|
2352
|
+
O [guia de correção dos hooks](docs/quality/hooks-leitura-e-orcamento.md) descreve
|
|
2353
|
+
as sequências Git de leitura permitidas, os limites de tempo da validação e as
|
|
2354
|
+
proteções preservadas. Sequências Git de leitura usam o prefixo
|
|
2355
|
+
\`git --no-pager -c core.fsmonitor=false\` e as opções seguras documentadas;
|
|
2356
|
+
alterações Git continuam exigindo comandos separados.
|
|
2357
|
+
|
|
2358
|
+
O [plano de confiabilidade da v5.2](docs/quality/v52-confiabilidade-e-eficiencia.md)
|
|
2359
|
+
registra a descoberta Git limitada no launcher Windows, a retomada da observação
|
|
2360
|
+
após manutenção, a consulta de Runs por chat e a medição do cache de validação.
|
|
2361
|
+
As evidências distinguem testes locais, revisão e publicação do pacote.
|
|
2362
|
+
|
|
2352
2363
|
> **Fonte, candidato e publicação:** este README descreve os contratos e recursos
|
|
2353
2364
|
> do checkout. A [matriz de evolução](docs/quality/v50-documentacao-editorial.md)
|
|
2354
2365
|
> identifica a implementação e suas provas. Qualificação local, ativação dos
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-Bh1tDfsg.js";import{E as t,w as n}from"./cost-monitor-B0Jwz_rk.js";import{n as r}from"./dashboard-localization-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-Bh1tDfsg.js";import{E as t,w as n}from"./cost-monitor-B0Jwz_rk.js";import{n as r}from"./dashboard-localization-BE_Zqtym.js";var i=e(t(),1),a=n();function o({catalog:e,fxRate:t,locale:n,onClose:o,onSave:c,onSaveFxRate:l}){let u=r[n],[d,f]=(0,i.useState)(e),[p,m]=(0,i.useState)(t?.rate??0),[h,g]=(0,i.useState)(!1),_=(e,t)=>f(n=>({...n,models:n.models.map((n,r)=>r===e?{...n,...t}:n)})),v=e=>Math.max(0,Number(e)||0);return(0,a.jsx)(`main`,{className:`pricing-backdrop`,children:(0,a.jsxs)(`section`,{"aria-labelledby":`pricing-page-title`,className:`pricing-dialog`,children:[(0,a.jsxs)(`header`,{children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`small`,{children:u.eyebrow}),(0,a.jsx)(`h1`,{id:`pricing-page-title`,children:u.title}),(0,a.jsx)(`p`,{children:u.description})]}),(0,a.jsxs)(`button`,{className:`pricing-back-button`,onClick:o,type:`button`,children:[(0,a.jsx)(`span`,{"aria-hidden":`true`,children:`←`}),` `,u.back]})]}),(0,a.jsxs)(`div`,{className:`pricing-fx-settings`,children:[(0,a.jsxs)(`div`,{className:`pricing-fx-copy`,children:[(0,a.jsx)(`strong`,{children:u.fxTitle}),(0,a.jsx)(`p`,{children:u.fxDescription})]}),(0,a.jsxs)(`label`,{children:[(0,a.jsx)(`span`,{children:u.fxLabel}),(0,a.jsxs)(`div`,{className:`pricing-fx-input`,children:[(0,a.jsx)(`span`,{children:`R$`}),(0,a.jsx)(`input`,{"aria-label":u.fxAriaLabel,min:`0.0001`,onChange:e=>m(Math.max(1e-4,Number(e.target.value)||0)),step:`0.0001`,type:`number`,value:p})]})]})]}),(0,a.jsxs)(`div`,{className:`pricing-table-heading`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`strong`,{children:u.catalog}),(0,a.jsx)(`p`,{children:u.pricesPerMillion})]}),(0,a.jsxs)(`span`,{children:[d.models.length,` `,u.models]})]}),(0,a.jsx)(`div`,{className:`pricing-table-wrap`,children:(0,a.jsxs)(`table`,{children:[(0,a.jsx)(`thead`,{children:(0,a.jsxs)(`tr`,{children:[(0,a.jsx)(`th`,{children:u.model}),(0,a.jsx)(`th`,{children:u.provider}),(0,a.jsx)(`th`,{children:u.input}),(0,a.jsx)(`th`,{children:u.cache}),(0,a.jsx)(`th`,{children:u.output}),(0,a.jsx)(`th`,{children:u.reasoning}),(0,a.jsx)(`th`,{children:u.priorityInput}),(0,a.jsx)(`th`,{children:u.priorityCache}),(0,a.jsx)(`th`,{children:u.priorityOutput}),(0,a.jsx)(`th`,{children:u.priorityReasoning}),(0,a.jsx)(`th`,{children:u.contextLimit}),(0,a.jsx)(`th`,{children:u.inputMultiplier}),(0,a.jsx)(`th`,{children:u.outputMultiplier}),(0,a.jsx)(`th`,{})]})}),(0,a.jsx)(`tbody`,{children:d.models.map((e,t)=>(0,a.jsxs)(`tr`,{children:[(0,a.jsxs)(`td`,{children:[(0,a.jsx)(`input`,{"aria-label":u.model,onChange:e=>_(t,{id:e.target.value}),value:e.id}),(0,a.jsx)(`small`,{children:e.aliases.join(`, `)||u.noAliases})]}),(0,a.jsx)(`td`,{children:(0,a.jsxs)(`select`,{onChange:e=>_(t,{provider:e.target.value}),value:e.provider,children:[(0,a.jsx)(`option`,{value:`openai`,children:`OpenAI`}),(0,a.jsx)(`option`,{value:`anthropic`,children:`Anthropic`})]})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{input_per_million_usd:v(e.target.value)}),step:`0.001`,type:`number`,value:e.input_per_million_usd})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{cached_input_per_million_usd:v(e.target.value)}),step:`0.001`,type:`number`,value:e.cached_input_per_million_usd??0})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{output_per_million_usd:v(e.target.value)}),step:`0.001`,type:`number`,value:e.output_per_million_usd})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{reasoning_per_million_usd:v(e.target.value)}),step:`0.001`,type:`number`,value:e.reasoning_per_million_usd??0})}),[`priority_input_per_million_usd`,`priority_cached_input_per_million_usd`,`priority_output_per_million_usd`,`priority_reasoning_per_million_usd`].map(n=>(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{[n]:v(e.target.value)}),step:`0.001`,type:`number`,value:e[n]??0})},n)),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{long_context_threshold_tokens:v(e.target.value)||null}),step:`1`,type:`number`,value:e.long_context_threshold_tokens??0})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0.001`,onChange:e=>_(t,{long_context_input_multiplier:Math.max(.001,Number(e.target.value)||1)}),step:`0.1`,type:`number`,value:e.long_context_input_multiplier})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0.001`,onChange:e=>_(t,{long_context_output_multiplier:Math.max(.001,Number(e.target.value)||1)}),step:`0.1`,type:`number`,value:e.long_context_output_multiplier})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`button`,{"aria-label":u.removeModel,onClick:()=>f(e=>({...e,models:e.models.filter((e,n)=>n!==t)})),type:`button`,children:`×`})})]},e.id))})]})}),(0,a.jsxs)(`footer`,{children:[(0,a.jsxs)(`button`,{onClick:()=>f(e=>({...e,models:[...e.models,s(n)]})),type:`button`,children:[`+ `,u.addModel]}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`button`,{onClick:o,type:`button`,children:u.cancel}),(0,a.jsx)(`button`,{disabled:h,onClick:async()=>{g(!0);try{await c(d),await l(p),o()}finally{g(!1)}},type:`button`,children:h?u.saving:u.save})]})]})]})})}function s(e=`pt-BR`){let t=r[e];return{id:t.newModel,provider:`openai`,aliases:[],input_per_million_usd:0,cached_input_per_million_usd:0,output_per_million_usd:0,reasoning_per_million_usd:0,priority_input_per_million_usd:null,priority_cached_input_per_million_usd:null,priority_output_per_million_usd:null,priority_reasoning_per_million_usd:null,reasoning_billed_separately:!1,long_context_threshold_tokens:null,long_context_input_multiplier:1,long_context_output_multiplier:1,source_label:t.manualOverride,source_url:`https://developers.openai.com/api/docs/pricing`,notes:[t.editedNote]}}export{o as PricingSettingsPage};
|