@agent-profile/web 0.1.2
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/README.md +110 -0
- package/build/client/_app/immutable/assets/0.BG6jUcBX.css +1 -0
- package/build/client/_app/immutable/assets/0.BG6jUcBX.css.br +0 -0
- package/build/client/_app/immutable/assets/0.BG6jUcBX.css.gz +0 -0
- package/build/client/_app/immutable/chunks/B-io8J2C.js +1 -0
- package/build/client/_app/immutable/chunks/B-io8J2C.js.br +2 -0
- package/build/client/_app/immutable/chunks/B-io8J2C.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BFYQcBYR.js +1 -0
- package/build/client/_app/immutable/chunks/BFYQcBYR.js.br +0 -0
- package/build/client/_app/immutable/chunks/BFYQcBYR.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D5BQ10GJ.js +3 -0
- package/build/client/_app/immutable/chunks/D5BQ10GJ.js.br +0 -0
- package/build/client/_app/immutable/chunks/D5BQ10GJ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DAWBIq3g.js +2 -0
- package/build/client/_app/immutable/chunks/DAWBIq3g.js.br +0 -0
- package/build/client/_app/immutable/chunks/DAWBIq3g.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DCJP-V9E.js +3 -0
- package/build/client/_app/immutable/chunks/DCJP-V9E.js.br +0 -0
- package/build/client/_app/immutable/chunks/DCJP-V9E.js.gz +0 -0
- package/build/client/_app/immutable/chunks/I8rQr1kY.js +1 -0
- package/build/client/_app/immutable/chunks/I8rQr1kY.js.br +1 -0
- package/build/client/_app/immutable/chunks/I8rQr1kY.js.gz +0 -0
- package/build/client/_app/immutable/chunks/SOrpfga1.js +1 -0
- package/build/client/_app/immutable/chunks/SOrpfga1.js.br +0 -0
- package/build/client/_app/immutable/chunks/SOrpfga1.js.gz +0 -0
- package/build/client/_app/immutable/chunks/rbd2FHQ6.js +1 -0
- package/build/client/_app/immutable/chunks/rbd2FHQ6.js.br +2 -0
- package/build/client/_app/immutable/chunks/rbd2FHQ6.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.wvdb3njx.js +2 -0
- package/build/client/_app/immutable/entry/app.wvdb3njx.js.br +0 -0
- package/build/client/_app/immutable/entry/app.wvdb3njx.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.CYyClicm.js +1 -0
- package/build/client/_app/immutable/entry/start.CYyClicm.js.br +1 -0
- package/build/client/_app/immutable/entry/start.CYyClicm.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.DI161f18.js +1 -0
- package/build/client/_app/immutable/nodes/0.DI161f18.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.DI161f18.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.CZb1wh8q.js +1 -0
- package/build/client/_app/immutable/nodes/1.CZb1wh8q.js.br +3 -0
- package/build/client/_app/immutable/nodes/1.CZb1wh8q.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.BOQgahuX.js +2 -0
- package/build/client/_app/immutable/nodes/10.BOQgahuX.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.BOQgahuX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.BjwWla8T.js +1 -0
- package/build/client/_app/immutable/nodes/11.BjwWla8T.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.BjwWla8T.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.BmqkJNGt.js +9 -0
- package/build/client/_app/immutable/nodes/2.BmqkJNGt.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.BmqkJNGt.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.NnDkXnSG.js +2 -0
- package/build/client/_app/immutable/nodes/3.NnDkXnSG.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.NnDkXnSG.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.8sZ5zCiS.js +4 -0
- package/build/client/_app/immutable/nodes/4.8sZ5zCiS.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.8sZ5zCiS.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.CSOalQ9R.js +2 -0
- package/build/client/_app/immutable/nodes/5.CSOalQ9R.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.CSOalQ9R.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.BMBuGW7y.js +5 -0
- package/build/client/_app/immutable/nodes/6.BMBuGW7y.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.BMBuGW7y.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.CG2RK2bH.js +4 -0
- package/build/client/_app/immutable/nodes/7.CG2RK2bH.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.CG2RK2bH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.Dzq0LDIw.js +1 -0
- package/build/client/_app/immutable/nodes/8.Dzq0LDIw.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.Dzq0LDIw.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.CnkwRoxn.js +5 -0
- package/build/client/_app/immutable/nodes/9.CnkwRoxn.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.CnkwRoxn.js.gz +0 -0
- package/build/client/_app/version.json +1 -0
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/env.js +94 -0
- package/build/handler.js +1494 -0
- package/build/index.js +345 -0
- package/build/server/chunks/0-u7mEipCH.js +110 -0
- package/build/server/chunks/0-u7mEipCH.js.map +1 -0
- package/build/server/chunks/1-BBGjCHyQ.js +9 -0
- package/build/server/chunks/1-BBGjCHyQ.js.map +1 -0
- package/build/server/chunks/10-B1aX7ZZ8.js +9 -0
- package/build/server/chunks/10-B1aX7ZZ8.js.map +1 -0
- package/build/server/chunks/11-4z6b2WB8.js +83 -0
- package/build/server/chunks/11-4z6b2WB8.js.map +1 -0
- package/build/server/chunks/2-CZ6isW8Z.js +9 -0
- package/build/server/chunks/2-CZ6isW8Z.js.map +1 -0
- package/build/server/chunks/3-CLWhM7Et.js +9 -0
- package/build/server/chunks/3-CLWhM7Et.js.map +1 -0
- package/build/server/chunks/4-BehBrXcu.js +146 -0
- package/build/server/chunks/4-BehBrXcu.js.map +1 -0
- package/build/server/chunks/5-C1YtO2Ru.js +9 -0
- package/build/server/chunks/5-C1YtO2Ru.js.map +1 -0
- package/build/server/chunks/6-DJ03bQJy.js +9 -0
- package/build/server/chunks/6-DJ03bQJy.js.map +1 -0
- package/build/server/chunks/7-CI__yhaj.js +73 -0
- package/build/server/chunks/7-CI__yhaj.js.map +1 -0
- package/build/server/chunks/8-BGx10Z6s.js +9 -0
- package/build/server/chunks/8-BGx10Z6s.js.map +1 -0
- package/build/server/chunks/9-LeS-ldcl.js +57 -0
- package/build/server/chunks/9-LeS-ldcl.js.map +1 -0
- package/build/server/chunks/Badge-BrV_lIru.js +24 -0
- package/build/server/chunks/Badge-BrV_lIru.js.map +1 -0
- package/build/server/chunks/SafetyBadge-BSDbVVMY.js +13 -0
- package/build/server/chunks/SafetyBadge-BSDbVVMY.js.map +1 -0
- package/build/server/chunks/_layout.svelte-Cg7oqdVB.js +214 -0
- package/build/server/chunks/_layout.svelte-Cg7oqdVB.js.map +1 -0
- package/build/server/chunks/_page.svelte-B0_5f_5-.js +86 -0
- package/build/server/chunks/_page.svelte-B0_5f_5-.js.map +1 -0
- package/build/server/chunks/_page.svelte-BS9xpx67.js +204 -0
- package/build/server/chunks/_page.svelte-BS9xpx67.js.map +1 -0
- package/build/server/chunks/_page.svelte-Bv-w7cKm.js +106 -0
- package/build/server/chunks/_page.svelte-Bv-w7cKm.js.map +1 -0
- package/build/server/chunks/_page.svelte-C8HqSRYY.js +55 -0
- package/build/server/chunks/_page.svelte-C8HqSRYY.js.map +1 -0
- package/build/server/chunks/_page.svelte-DRj4L7XZ.js +104 -0
- package/build/server/chunks/_page.svelte-DRj4L7XZ.js.map +1 -0
- package/build/server/chunks/_page.svelte-DXeUSVlF.js +14 -0
- package/build/server/chunks/_page.svelte-DXeUSVlF.js.map +1 -0
- package/build/server/chunks/_page.svelte-DbsvERRq.js +424 -0
- package/build/server/chunks/_page.svelte-DbsvERRq.js.map +1 -0
- package/build/server/chunks/_page.svelte-DuJcNgye.js +172 -0
- package/build/server/chunks/_page.svelte-DuJcNgye.js.map +1 -0
- package/build/server/chunks/_page.svelte-DyYKrY-D.js +92 -0
- package/build/server/chunks/_page.svelte-DyYKrY-D.js.map +1 -0
- package/build/server/chunks/_page.svelte-r2AHAn4f.js +134 -0
- package/build/server/chunks/_page.svelte-r2AHAn4f.js.map +1 -0
- package/build/server/chunks/client-DRY1rofW.js +23 -0
- package/build/server/chunks/client-DRY1rofW.js.map +1 -0
- package/build/server/chunks/dev-CrqJ3ZR3.js +4558 -0
- package/build/server/chunks/dev-CrqJ3ZR3.js.map +1 -0
- package/build/server/chunks/dist--t-UlYlZ.js +532 -0
- package/build/server/chunks/dist--t-UlYlZ.js.map +1 -0
- package/build/server/chunks/doctorSummary-CGjSiyKU.js +85 -0
- package/build/server/chunks/doctorSummary-CGjSiyKU.js.map +1 -0
- package/build/server/chunks/error.svelte-CvT76GCP.js +66 -0
- package/build/server/chunks/error.svelte-CvT76GCP.js.map +1 -0
- package/build/server/chunks/hooks.server-BGib69tn.js +38 -0
- package/build/server/chunks/hooks.server-BGib69tn.js.map +1 -0
- package/build/server/chunks/index-XyMIhwom.js +4727 -0
- package/build/server/chunks/index-XyMIhwom.js.map +1 -0
- package/build/server/chunks/internal-DDD35M_S.js +2068 -0
- package/build/server/chunks/internal-DDD35M_S.js.map +1 -0
- package/build/server/chunks/projectContext-C4-xYqFg.js +17311 -0
- package/build/server/chunks/projectContext-C4-xYqFg.js.map +1 -0
- package/build/server/index.js +5 -0
- package/build/server/index.js.map +1 -0
- package/build/server/manifest.js +118 -0
- package/build/server/manifest.js.map +1 -0
- package/build/shims.js +32 -0
- package/package.json +34 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { l as loadProjectContext, c as compileProfile, v as validateLockfileText, r as redactIfSecretLike, t as truncatePreview, s as sha256Hex } from './projectContext-C4-xYqFg.js';
|
|
2
|
+
import { r as runDoctor } from './dist--t-UlYlZ.js';
|
|
3
|
+
import { readFile } from 'node:fs/promises';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import 'node:module';
|
|
6
|
+
import 'process';
|
|
7
|
+
import 'buffer';
|
|
8
|
+
import 'node:crypto';
|
|
9
|
+
|
|
10
|
+
//#region src/routes/artifacts/+page.server.ts
|
|
11
|
+
var DRIFT_CODES = new Set([
|
|
12
|
+
"LINT-LOCK-001",
|
|
13
|
+
"LINT-LOCK-002",
|
|
14
|
+
"LINT-LOCK-003",
|
|
15
|
+
"LINT-LOCK-004",
|
|
16
|
+
"LINT-LOCK-005",
|
|
17
|
+
"LINT-LOCK-006",
|
|
18
|
+
"LINT-LOCK-007"
|
|
19
|
+
]);
|
|
20
|
+
var LOCKFILE_PATH = "ai-profile.lock";
|
|
21
|
+
function safeRootPath(rootDir, relativePath) {
|
|
22
|
+
const resolvedRoot = path.resolve(rootDir);
|
|
23
|
+
const resolved = path.resolve(resolvedRoot, ...relativePath.split("/"));
|
|
24
|
+
if (resolved === resolvedRoot || resolved.startsWith(resolvedRoot + path.sep)) return resolved;
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
function artifactFromBytes(input, bytes) {
|
|
28
|
+
const text = new TextDecoder("utf-8").decode(bytes);
|
|
29
|
+
const redactedText = redactIfSecretLike(text);
|
|
30
|
+
const redacted = redactedText !== text;
|
|
31
|
+
const { text: previewText, truncated } = truncatePreview(redactedText);
|
|
32
|
+
return {
|
|
33
|
+
path: input.path,
|
|
34
|
+
target: input.target,
|
|
35
|
+
templateId: input.templateId,
|
|
36
|
+
hash: sha256Hex(bytes).slice(0, 8),
|
|
37
|
+
status: input.status,
|
|
38
|
+
preview: previewText,
|
|
39
|
+
redacted,
|
|
40
|
+
truncated,
|
|
41
|
+
byteSize: bytes.byteLength
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function generatedArtifact(file, driftedPaths) {
|
|
45
|
+
return artifactFromBytes({
|
|
46
|
+
path: file.path,
|
|
47
|
+
target: file.target,
|
|
48
|
+
templateId: file.templateId,
|
|
49
|
+
status: driftedPaths.has(file.path) ? "drifted" : "generated"
|
|
50
|
+
}, file.bytes);
|
|
51
|
+
}
|
|
52
|
+
async function loadManualArtifacts(rootDir, generatedPaths) {
|
|
53
|
+
const lockfilePath = safeRootPath(rootDir, LOCKFILE_PATH);
|
|
54
|
+
if (lockfilePath === null) return [];
|
|
55
|
+
let lockSource;
|
|
56
|
+
try {
|
|
57
|
+
lockSource = await readFile(lockfilePath, "utf8");
|
|
58
|
+
} catch {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
const lock = validateLockfileText(lockSource);
|
|
62
|
+
if (!lock.ok) return [];
|
|
63
|
+
const manual = [];
|
|
64
|
+
for (const output of lock.lockfile.outputs) {
|
|
65
|
+
if (generatedPaths.has(output.path)) continue;
|
|
66
|
+
const file = await readManualOutput(rootDir, output);
|
|
67
|
+
if (file !== null) manual.push(file);
|
|
68
|
+
}
|
|
69
|
+
return manual;
|
|
70
|
+
}
|
|
71
|
+
async function readManualOutput(rootDir, output) {
|
|
72
|
+
const outputPath = safeRootPath(rootDir, output.path);
|
|
73
|
+
if (outputPath === null) return null;
|
|
74
|
+
try {
|
|
75
|
+
const bytes = await readFile(outputPath);
|
|
76
|
+
return artifactFromBytes({
|
|
77
|
+
path: output.path,
|
|
78
|
+
target: output.target,
|
|
79
|
+
templateId: output.templateId,
|
|
80
|
+
status: "manual"
|
|
81
|
+
}, bytes);
|
|
82
|
+
} catch {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
async function load() {
|
|
87
|
+
const ctx = await loadProjectContext();
|
|
88
|
+
if (!ctx.profileFound || ctx.profileResult === null) return { view: {
|
|
89
|
+
ok: false,
|
|
90
|
+
reason: "missing"
|
|
91
|
+
} };
|
|
92
|
+
if (!ctx.profileResult.ok) return { view: {
|
|
93
|
+
ok: false,
|
|
94
|
+
reason: "invalid",
|
|
95
|
+
issues: ctx.profileResult.issues.map((i) => ({
|
|
96
|
+
code: i.code,
|
|
97
|
+
path: i.path,
|
|
98
|
+
message: i.message
|
|
99
|
+
}))
|
|
100
|
+
} };
|
|
101
|
+
const result = compileProfile({ profile: ctx.profileResult.profile });
|
|
102
|
+
if (!result.ok) return { view: {
|
|
103
|
+
ok: false,
|
|
104
|
+
reason: "compile_error",
|
|
105
|
+
issues: result.issues.map((i) => ({
|
|
106
|
+
code: i.code,
|
|
107
|
+
path: i.path,
|
|
108
|
+
message: i.message
|
|
109
|
+
}))
|
|
110
|
+
} };
|
|
111
|
+
let driftedPaths = /* @__PURE__ */ new Set();
|
|
112
|
+
try {
|
|
113
|
+
const doctorResult = await runDoctor({ rootDir: ctx.rootDir });
|
|
114
|
+
driftedPaths = new Set(doctorResult.issues.filter((i) => DRIFT_CODES.has(i.code)).map((i) => i.path));
|
|
115
|
+
} catch {
|
|
116
|
+
driftedPaths = /* @__PURE__ */ new Set();
|
|
117
|
+
}
|
|
118
|
+
const generatedPaths = new Set(result.files.map((file) => file.path));
|
|
119
|
+
const targetCount = [
|
|
120
|
+
ctx.profileResult.profile.clients.tabnine.enabled,
|
|
121
|
+
ctx.profileResult.profile.clients.codex.enabled,
|
|
122
|
+
ctx.profileResult.profile.clients.claude.enabled
|
|
123
|
+
].filter(Boolean).length;
|
|
124
|
+
const manualFiles = await loadManualArtifacts(ctx.rootDir, generatedPaths);
|
|
125
|
+
return { view: {
|
|
126
|
+
ok: true,
|
|
127
|
+
files: result.files.map((file) => generatedArtifact(file, driftedPaths)).concat(manualFiles).sort((a, b) => a.path.localeCompare(b.path)),
|
|
128
|
+
targetCount
|
|
129
|
+
} };
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
var _page_server_ts = /*#__PURE__*/Object.freeze({
|
|
133
|
+
__proto__: null,
|
|
134
|
+
load: load
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
const index = 4;
|
|
138
|
+
let component_cache;
|
|
139
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-r2AHAn4f.js')).default;
|
|
140
|
+
const server_id = "src/routes/artifacts/+page.server.ts";
|
|
141
|
+
const imports = ["_app/immutable/nodes/4.8sZ5zCiS.js","_app/immutable/chunks/DCJP-V9E.js","_app/immutable/chunks/SOrpfga1.js","_app/immutable/chunks/I8rQr1kY.js","_app/immutable/chunks/DAWBIq3g.js"];
|
|
142
|
+
const stylesheets = [];
|
|
143
|
+
const fonts = [];
|
|
144
|
+
|
|
145
|
+
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
|
146
|
+
//# sourceMappingURL=4-BehBrXcu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"4-BehBrXcu.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/artifacts/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/4.js"],"sourcesContent":["import { a as compileProfile, i as truncatePreview, l as sha256Hex, n as redactIfSecretLike, s as validateLockfileText, t as loadProjectContext } from \"../../../chunks/projectContext.js\";\nimport { t as runDoctor } from \"../../../chunks/dist.js\";\nimport { readFile } from \"node:fs/promises\";\nimport path from \"node:path\";\n//#region src/routes/artifacts/+page.server.ts\nvar DRIFT_CODES = new Set([\n\t\"LINT-LOCK-001\",\n\t\"LINT-LOCK-002\",\n\t\"LINT-LOCK-003\",\n\t\"LINT-LOCK-004\",\n\t\"LINT-LOCK-005\",\n\t\"LINT-LOCK-006\",\n\t\"LINT-LOCK-007\"\n]);\nvar LOCKFILE_PATH = \"ai-profile.lock\";\nfunction safeRootPath(rootDir, relativePath) {\n\tconst resolvedRoot = path.resolve(rootDir);\n\tconst resolved = path.resolve(resolvedRoot, ...relativePath.split(\"/\"));\n\tif (resolved === resolvedRoot || resolved.startsWith(resolvedRoot + path.sep)) return resolved;\n\treturn null;\n}\nfunction artifactFromBytes(input, bytes) {\n\tconst text = new TextDecoder(\"utf-8\").decode(bytes);\n\tconst redactedText = redactIfSecretLike(text);\n\tconst redacted = redactedText !== text;\n\tconst { text: previewText, truncated } = truncatePreview(redactedText);\n\treturn {\n\t\tpath: input.path,\n\t\ttarget: input.target,\n\t\ttemplateId: input.templateId,\n\t\thash: sha256Hex(bytes).slice(0, 8),\n\t\tstatus: input.status,\n\t\tpreview: previewText,\n\t\tredacted,\n\t\ttruncated,\n\t\tbyteSize: bytes.byteLength\n\t};\n}\nfunction generatedArtifact(file, driftedPaths) {\n\treturn artifactFromBytes({\n\t\tpath: file.path,\n\t\ttarget: file.target,\n\t\ttemplateId: file.templateId,\n\t\tstatus: driftedPaths.has(file.path) ? \"drifted\" : \"generated\"\n\t}, file.bytes);\n}\nasync function loadManualArtifacts(rootDir, generatedPaths) {\n\tconst lockfilePath = safeRootPath(rootDir, LOCKFILE_PATH);\n\tif (lockfilePath === null) return [];\n\tlet lockSource;\n\ttry {\n\t\tlockSource = await readFile(lockfilePath, \"utf8\");\n\t} catch {\n\t\treturn [];\n\t}\n\tconst lock = validateLockfileText(lockSource);\n\tif (!lock.ok) return [];\n\tconst manual = [];\n\tfor (const output of lock.lockfile.outputs) {\n\t\tif (generatedPaths.has(output.path)) continue;\n\t\tconst file = await readManualOutput(rootDir, output);\n\t\tif (file !== null) manual.push(file);\n\t}\n\treturn manual;\n}\nasync function readManualOutput(rootDir, output) {\n\tconst outputPath = safeRootPath(rootDir, output.path);\n\tif (outputPath === null) return null;\n\ttry {\n\t\tconst bytes = await readFile(outputPath);\n\t\treturn artifactFromBytes({\n\t\t\tpath: output.path,\n\t\t\ttarget: output.target,\n\t\t\ttemplateId: output.templateId,\n\t\t\tstatus: \"manual\"\n\t\t}, bytes);\n\t} catch {\n\t\treturn null;\n\t}\n}\nasync function load() {\n\tconst ctx = await loadProjectContext();\n\tif (!ctx.profileFound || ctx.profileResult === null) return { view: {\n\t\tok: false,\n\t\treason: \"missing\"\n\t} };\n\tif (!ctx.profileResult.ok) return { view: {\n\t\tok: false,\n\t\treason: \"invalid\",\n\t\tissues: ctx.profileResult.issues.map((i) => ({\n\t\t\tcode: i.code,\n\t\t\tpath: i.path,\n\t\t\tmessage: i.message\n\t\t}))\n\t} };\n\tconst result = compileProfile({ profile: ctx.profileResult.profile });\n\tif (!result.ok) return { view: {\n\t\tok: false,\n\t\treason: \"compile_error\",\n\t\tissues: result.issues.map((i) => ({\n\t\t\tcode: i.code,\n\t\t\tpath: i.path,\n\t\t\tmessage: i.message\n\t\t}))\n\t} };\n\tlet driftedPaths = /* @__PURE__ */ new Set();\n\ttry {\n\t\tconst doctorResult = await runDoctor({ rootDir: ctx.rootDir });\n\t\tdriftedPaths = new Set(doctorResult.issues.filter((i) => DRIFT_CODES.has(i.code)).map((i) => i.path));\n\t} catch {\n\t\tdriftedPaths = /* @__PURE__ */ new Set();\n\t}\n\tconst generatedPaths = new Set(result.files.map((file) => file.path));\n\tconst targetCount = [\n\t\tctx.profileResult.profile.clients.tabnine.enabled,\n\t\tctx.profileResult.profile.clients.codex.enabled,\n\t\tctx.profileResult.profile.clients.claude.enabled\n\t].filter(Boolean).length;\n\tconst manualFiles = await loadManualArtifacts(ctx.rootDir, generatedPaths);\n\treturn { view: {\n\t\tok: true,\n\t\tfiles: result.files.map((file) => generatedArtifact(file, driftedPaths)).concat(manualFiles).sort((a, b) => a.path.localeCompare(b.path)),\n\t\ttargetCount\n\t} };\n}\n//#endregion\nexport { load };\n","import * as server from '../entries/pages/artifacts/_page.server.ts.js';\n\nexport const index = 4;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/artifacts/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/artifacts/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/4.8sZ5zCiS.js\",\"_app/immutable/chunks/DCJP-V9E.js\",\"_app/immutable/chunks/SOrpfga1.js\",\"_app/immutable/chunks/I8rQr1kY.js\",\"_app/immutable/chunks/DAWBIq3g.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"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CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO;AACjD,EAAE,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;AAC3C,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM;AACzB,CAAC,MAAM,WAAW,GAAG,MAAM,mBAAmB,CAAC,GAAG,CAAC,OAAO,EAAE,cAAc,CAAC;AAC3E,CAAC,OAAO,EAAE,IAAI,EAAE;AAChB,EAAE,EAAE,EAAE,IAAI;AACV,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,iBAAiB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3I,EAAE;AACF,EAAE,EAAE;AACJ;;;;;;;AC1HY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA4C,CAAC,EAAE;AAE1G,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAChM,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const index = 5;
|
|
2
|
+
let component_cache;
|
|
3
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-DRj4L7XZ.js')).default;
|
|
4
|
+
const imports = ["_app/immutable/nodes/5.CSOalQ9R.js","_app/immutable/chunks/DCJP-V9E.js","_app/immutable/chunks/SOrpfga1.js","_app/immutable/chunks/I8rQr1kY.js","_app/immutable/chunks/B-io8J2C.js","_app/immutable/chunks/DAWBIq3g.js"];
|
|
5
|
+
const stylesheets = [];
|
|
6
|
+
const fonts = [];
|
|
7
|
+
|
|
8
|
+
export { component, fonts, imports, index, stylesheets };
|
|
9
|
+
//# sourceMappingURL=5-C1YtO2Ru.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"5-C1YtO2Ru.js","sources":["../../../.svelte-kit/adapter-node/nodes/5.js"],"sourcesContent":["\n\nexport const index = 5;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/dashboard/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/5.CSOalQ9R.js\",\"_app/immutable/chunks/DCJP-V9E.js\",\"_app/immutable/chunks/SOrpfga1.js\",\"_app/immutable/chunks/I8rQr1kY.js\",\"_app/immutable/chunks/B-io8J2C.js\",\"_app/immutable/chunks/DAWBIq3g.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA4C,CAAC,EAAE;AAC1G,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACpO,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const index = 6;
|
|
2
|
+
let component_cache;
|
|
3
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-C8HqSRYY.js')).default;
|
|
4
|
+
const imports = ["_app/immutable/nodes/6.BMBuGW7y.js","_app/immutable/chunks/DCJP-V9E.js","_app/immutable/chunks/DAWBIq3g.js","_app/immutable/chunks/I8rQr1kY.js"];
|
|
5
|
+
const stylesheets = [];
|
|
6
|
+
const fonts = [];
|
|
7
|
+
|
|
8
|
+
export { component, fonts, imports, index, stylesheets };
|
|
9
|
+
//# sourceMappingURL=6-DJ03bQJy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"6-DJ03bQJy.js","sources":["../../../.svelte-kit/adapter-node/nodes/6.js"],"sourcesContent":["\n\nexport const index = 6;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/diff/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/6.BMBuGW7y.js\",\"_app/immutable/chunks/DCJP-V9E.js\",\"_app/immutable/chunks/DAWBIq3g.js\",\"_app/immutable/chunks/I8rQr1kY.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAuC,CAAC,EAAE;AACrG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5J,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { l as loadProjectContext } from './projectContext-C4-xYqFg.js';
|
|
2
|
+
import { r as runDoctor } from './dist--t-UlYlZ.js';
|
|
3
|
+
import { b as bucketDoctorIssues } from './doctorSummary-CGjSiyKU.js';
|
|
4
|
+
import 'node:module';
|
|
5
|
+
import 'node:fs/promises';
|
|
6
|
+
import 'node:path';
|
|
7
|
+
import 'process';
|
|
8
|
+
import 'buffer';
|
|
9
|
+
import 'node:crypto';
|
|
10
|
+
|
|
11
|
+
//#region src/routes/doctor/+page.server.ts
|
|
12
|
+
var TITLE = {
|
|
13
|
+
error: "Errors",
|
|
14
|
+
warning: "Warnings",
|
|
15
|
+
info: "Info",
|
|
16
|
+
not_verifiable: "Not verifiable"
|
|
17
|
+
};
|
|
18
|
+
async function load() {
|
|
19
|
+
const ctx = await loadProjectContext();
|
|
20
|
+
if (!ctx.profileFound) return { view: {
|
|
21
|
+
ok: false,
|
|
22
|
+
reason: "missing",
|
|
23
|
+
message: "Doctor needs ai-profile.yaml before it can run useful project checks."
|
|
24
|
+
} };
|
|
25
|
+
const rootDir = ctx.rootDir;
|
|
26
|
+
const startedAt = process.hrtime.bigint();
|
|
27
|
+
let result;
|
|
28
|
+
try {
|
|
29
|
+
result = await runDoctor({ rootDir });
|
|
30
|
+
} catch (err) {
|
|
31
|
+
return { view: {
|
|
32
|
+
ok: false,
|
|
33
|
+
reason: "missing",
|
|
34
|
+
message: `Doctor could not run: ${err instanceof Error ? err.message : String(err)}`
|
|
35
|
+
} };
|
|
36
|
+
}
|
|
37
|
+
const elapsedMs = Number((process.hrtime.bigint() - startedAt) / 1000000n) || 0;
|
|
38
|
+
const buckets = bucketDoctorIssues(result.issues);
|
|
39
|
+
return { view: {
|
|
40
|
+
ok: true,
|
|
41
|
+
buckets: [
|
|
42
|
+
"error",
|
|
43
|
+
"warning",
|
|
44
|
+
"info",
|
|
45
|
+
"not_verifiable"
|
|
46
|
+
].map((key) => ({
|
|
47
|
+
key,
|
|
48
|
+
title: TITLE[key],
|
|
49
|
+
count: buckets[key].length,
|
|
50
|
+
issues: buckets[key]
|
|
51
|
+
})),
|
|
52
|
+
totalIssues: result.issues.length,
|
|
53
|
+
lastRunIso: (/* @__PURE__ */ new Date()).toISOString(),
|
|
54
|
+
elapsedMs,
|
|
55
|
+
status: result.status
|
|
56
|
+
} };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
var _page_server_ts = /*#__PURE__*/Object.freeze({
|
|
60
|
+
__proto__: null,
|
|
61
|
+
load: load
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const index = 7;
|
|
65
|
+
let component_cache;
|
|
66
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-B0_5f_5-.js')).default;
|
|
67
|
+
const server_id = "src/routes/doctor/+page.server.ts";
|
|
68
|
+
const imports = ["_app/immutable/nodes/7.CG2RK2bH.js","_app/immutable/chunks/DCJP-V9E.js","_app/immutable/chunks/D5BQ10GJ.js","_app/immutable/chunks/SOrpfga1.js","_app/immutable/chunks/I8rQr1kY.js","_app/immutable/chunks/DAWBIq3g.js","_app/immutable/chunks/rbd2FHQ6.js"];
|
|
69
|
+
const stylesheets = [];
|
|
70
|
+
const fonts = [];
|
|
71
|
+
|
|
72
|
+
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
|
73
|
+
//# sourceMappingURL=7-CI__yhaj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"7-CI__yhaj.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/doctor/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/7.js"],"sourcesContent":["import { t as loadProjectContext } from \"../../../chunks/projectContext.js\";\nimport { t as runDoctor } from \"../../../chunks/dist.js\";\nimport { t as bucketDoctorIssues } from \"../../../chunks/doctorSummary.js\";\n//#region src/routes/doctor/+page.server.ts\nvar TITLE = {\n\terror: \"Errors\",\n\twarning: \"Warnings\",\n\tinfo: \"Info\",\n\tnot_verifiable: \"Not verifiable\"\n};\nasync function load() {\n\tconst ctx = await loadProjectContext();\n\tif (!ctx.profileFound) return { view: {\n\t\tok: false,\n\t\treason: \"missing\",\n\t\tmessage: \"Doctor needs ai-profile.yaml before it can run useful project checks.\"\n\t} };\n\tconst rootDir = ctx.rootDir;\n\tconst startedAt = process.hrtime.bigint();\n\tlet result;\n\ttry {\n\t\tresult = await runDoctor({ rootDir });\n\t} catch (err) {\n\t\treturn { view: {\n\t\t\tok: false,\n\t\t\treason: \"missing\",\n\t\t\tmessage: `Doctor could not run: ${err instanceof Error ? err.message : String(err)}`\n\t\t} };\n\t}\n\tconst elapsedMs = Number((process.hrtime.bigint() - startedAt) / 1000000n) || 0;\n\tconst buckets = bucketDoctorIssues(result.issues);\n\treturn { view: {\n\t\tok: true,\n\t\tbuckets: [\n\t\t\t\"error\",\n\t\t\t\"warning\",\n\t\t\t\"info\",\n\t\t\t\"not_verifiable\"\n\t\t].map((key) => ({\n\t\t\tkey,\n\t\t\ttitle: TITLE[key],\n\t\t\tcount: buckets[key].length,\n\t\t\tissues: buckets[key]\n\t\t})),\n\t\ttotalIssues: result.issues.length,\n\t\tlastRunIso: (/* @__PURE__ */ new Date()).toISOString(),\n\t\telapsedMs,\n\t\tstatus: result.status\n\t} };\n}\n//#endregion\nexport { load };\n","import * as server from '../entries/pages/doctor/_page.server.ts.js';\n\nexport const index = 7;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/doctor/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/doctor/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/7.CG2RK2bH.js\",\"_app/immutable/chunks/DCJP-V9E.js\",\"_app/immutable/chunks/D5BQ10GJ.js\",\"_app/immutable/chunks/SOrpfga1.js\",\"_app/immutable/chunks/I8rQr1kY.js\",\"_app/immutable/chunks/DAWBIq3g.js\",\"_app/immutable/chunks/rbd2FHQ6.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;;;;;;;AAGA;AACA,IAAI,KAAK,GAAG;AACZ,CAAC,KAAK,EAAE,QAAQ;AAChB,CAAC,OAAO,EAAE,UAAU;AACpB,CAAC,IAAI,EAAE,MAAM;AACb,CAAC,cAAc,EAAE;AACjB,CAAC;AACD,eAAe,IAAI,GAAG;AACtB,CAAC,MAAM,GAAG,GAAG,MAAM,kBAAkB,EAAE;AACvC,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE;AACvC,EAAE,EAAE,EAAE,KAAK;AACX,EAAE,MAAM,EAAE,SAAS;AACnB,EAAE,OAAO,EAAE;AACX,EAAE,EAAE;AACJ,CAAC,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO;AAC5B,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE;AAC1C,CAAC,IAAI,MAAM;AACX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AAe,KAAK,CAAC,MAAM,OAAO,4BAAyC,CAAC,EAAE;AAEvG,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACxQ,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const index = 8;
|
|
2
|
+
let component_cache;
|
|
3
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-DXeUSVlF.js')).default;
|
|
4
|
+
const imports = ["_app/immutable/nodes/8.Dzq0LDIw.js","_app/immutable/chunks/DCJP-V9E.js","_app/immutable/chunks/D5BQ10GJ.js","_app/immutable/chunks/rbd2FHQ6.js","_app/immutable/chunks/I8rQr1kY.js"];
|
|
5
|
+
const stylesheets = [];
|
|
6
|
+
const fonts = [];
|
|
7
|
+
|
|
8
|
+
export { component, fonts, imports, index, stylesheets };
|
|
9
|
+
//# sourceMappingURL=8-BGx10Z6s.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"8-BGx10Z6s.js","sources":["../../../.svelte-kit/adapter-node/nodes/8.js"],"sourcesContent":["\n\nexport const index = 8;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/landing/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/8.Dzq0LDIw.js\",\"_app/immutable/chunks/DCJP-V9E.js\",\"_app/immutable/chunks/D5BQ10GJ.js\",\"_app/immutable/chunks/rbd2FHQ6.js\",\"_app/immutable/chunks/I8rQr1kY.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAA0C,CAAC,EAAE;AACxG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAChM,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { l as loadProjectContext, n as normalizeSafety, f as deriveEffectivePermissions, r as redactIfSecretLike } from './projectContext-C4-xYqFg.js';
|
|
2
|
+
import 'node:module';
|
|
3
|
+
import 'node:fs/promises';
|
|
4
|
+
import 'node:path';
|
|
5
|
+
import 'process';
|
|
6
|
+
import 'buffer';
|
|
7
|
+
import 'node:crypto';
|
|
8
|
+
|
|
9
|
+
//#region src/routes/profile/+page.server.ts
|
|
10
|
+
async function load() {
|
|
11
|
+
const ctx = await loadProjectContext();
|
|
12
|
+
if (!ctx.profileFound || ctx.profileResult === null) return { view: {
|
|
13
|
+
ok: false,
|
|
14
|
+
reason: "missing"
|
|
15
|
+
} };
|
|
16
|
+
if (!ctx.profileResult.ok) return { view: {
|
|
17
|
+
ok: false,
|
|
18
|
+
reason: "invalid",
|
|
19
|
+
issues: ctx.profileResult.issues.map((i) => ({
|
|
20
|
+
code: i.code,
|
|
21
|
+
path: i.path,
|
|
22
|
+
message: i.message
|
|
23
|
+
}))
|
|
24
|
+
} };
|
|
25
|
+
const profile = ctx.profileResult.profile;
|
|
26
|
+
const safety = normalizeSafety(profile);
|
|
27
|
+
const permissions = deriveEffectivePermissions(profile);
|
|
28
|
+
const yamlRedacted = redactIfSecretLike(ctx.profileSource ?? "");
|
|
29
|
+
return { view: {
|
|
30
|
+
ok: true,
|
|
31
|
+
name: profile.profile.name,
|
|
32
|
+
description: profile.profile.description,
|
|
33
|
+
stack: profile.stack,
|
|
34
|
+
clients: profile.clients,
|
|
35
|
+
safety,
|
|
36
|
+
workflow: profile.workflow,
|
|
37
|
+
permissions,
|
|
38
|
+
hasSecretLikeContent: yamlRedacted !== ctx.profileSource,
|
|
39
|
+
yaml: yamlRedacted
|
|
40
|
+
} };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
var _page_server_ts = /*#__PURE__*/Object.freeze({
|
|
44
|
+
__proto__: null,
|
|
45
|
+
load: load
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const index = 9;
|
|
49
|
+
let component_cache;
|
|
50
|
+
const component = async () => component_cache ??= (await import('./_page.svelte-BS9xpx67.js')).default;
|
|
51
|
+
const server_id = "src/routes/profile/+page.server.ts";
|
|
52
|
+
const imports = ["_app/immutable/nodes/9.CnkwRoxn.js","_app/immutable/chunks/DCJP-V9E.js","_app/immutable/chunks/SOrpfga1.js","_app/immutable/chunks/I8rQr1kY.js","_app/immutable/chunks/B-io8J2C.js","_app/immutable/chunks/DAWBIq3g.js"];
|
|
53
|
+
const stylesheets = [];
|
|
54
|
+
const fonts = [];
|
|
55
|
+
|
|
56
|
+
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
|
57
|
+
//# sourceMappingURL=9-LeS-ldcl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"9-LeS-ldcl.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/profile/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/9.js"],"sourcesContent":["import { d as deriveEffectivePermissions, f as normalizeSafety, n as redactIfSecretLike, t as loadProjectContext } from \"../../../chunks/projectContext.js\";\n//#region src/routes/profile/+page.server.ts\nasync function load() {\n\tconst ctx = await loadProjectContext();\n\tif (!ctx.profileFound || ctx.profileResult === null) return { view: {\n\t\tok: false,\n\t\treason: \"missing\"\n\t} };\n\tif (!ctx.profileResult.ok) return { view: {\n\t\tok: false,\n\t\treason: \"invalid\",\n\t\tissues: ctx.profileResult.issues.map((i) => ({\n\t\t\tcode: i.code,\n\t\t\tpath: i.path,\n\t\t\tmessage: i.message\n\t\t}))\n\t} };\n\tconst profile = ctx.profileResult.profile;\n\tconst safety = normalizeSafety(profile);\n\tconst permissions = deriveEffectivePermissions(profile);\n\tconst yamlRedacted = redactIfSecretLike(ctx.profileSource ?? \"\");\n\treturn { view: {\n\t\tok: true,\n\t\tname: profile.profile.name,\n\t\tdescription: profile.profile.description,\n\t\tstack: profile.stack,\n\t\tclients: profile.clients,\n\t\tsafety,\n\t\tworkflow: profile.workflow,\n\t\tpermissions,\n\t\thasSecretLikeContent: yamlRedacted !== ctx.profileSource,\n\t\tyaml: yamlRedacted\n\t} };\n}\n//#endregion\nexport { load };\n","import * as server from '../entries/pages/profile/_page.server.ts.js';\n\nexport const index = 9;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/profile/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/profile/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/9.CnkwRoxn.js\",\"_app/immutable/chunks/DCJP-V9E.js\",\"_app/immutable/chunks/SOrpfga1.js\",\"_app/immutable/chunks/I8rQr1kY.js\",\"_app/immutable/chunks/B-io8J2C.js\",\"_app/immutable/chunks/DAWBIq3g.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;;;;;AACA;AACA,eAAe,IAAI,GAAG;AACtB,CAAC,MAAM,GAAG,GAAG,MAAM,kBAAkB,EAAE;AACvC,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,IAAI,GAAG,CAAC,aAAa,KAAK,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;AACrE,EAAE,EAAE,EAAE,KAAK;AACX,EAAE,MAAM,EAAE;AACV,EAAE,EAAE;AACJ,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;AAC3C,EAAE,EAAE,EAAE,KAAK;AACX,EAAE,MAAM,EAAE,SAAS;AACnB,EAAE,MAAM,EAAE,GAAG,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM;AAC/C,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI;AACf,GAAG,IAAI,EAAE,CAAC,CA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
+
function TrustBanner($$renderer, $$props) {
|
|
5
|
+
let { compact = false } = $$props;
|
|
6
|
+
$$renderer.push(`<div class="trust"><div class="lock"></div> <div><b>Local-first.</b> No source upload. No secrets transmitted. All execution stays
|
|
7
|
+
on this machine.</div> `);
|
|
8
|
+
if (!compact) {
|
|
9
|
+
$$renderer.push("<!--[0-->");
|
|
10
|
+
$$renderer.push(`<div class="checks"><span>no network writes</span> <span>diff before write</span> <span>profile signed locally</span></div>`);
|
|
11
|
+
} else $$renderer.push("<!--[-1-->");
|
|
12
|
+
$$renderer.push(`<!--]--></div>`);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#region src/lib/components/Badge.svelte
|
|
16
|
+
function Badge($$renderer, $$props) {
|
|
17
|
+
let { tone = "muted", children } = $$props;
|
|
18
|
+
$$renderer.push(`<span${attr_class(`badge ${stringify(tone)}`)}><span class="dot"></span>`);
|
|
19
|
+
children?.($$renderer);
|
|
20
|
+
$$renderer.push(`<!----></span>`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { Badge as B, TrustBanner as T };
|
|
24
|
+
//# sourceMappingURL=Badge-BrV_lIru.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge-BrV_lIru.js","sources":["../../../.svelte-kit/adapter-node/chunks/TrustBanner.js","../../../.svelte-kit/adapter-node/chunks/Badge.js"],"sourcesContent":["import \"./dev.js\";\n//#region src/lib/components/TrustBanner.svelte\nfunction TrustBanner($$renderer, $$props) {\n\tlet { compact = false } = $$props;\n\t$$renderer.push(`<div class=\"trust\"><div class=\"lock\"></div> <div><b>Local-first.</b> No source upload. No secrets transmitted. All execution stays\n on this machine.</div> `);\n\tif (!compact) {\n\t\t$$renderer.push(\"<!--[0-->\");\n\t\t$$renderer.push(`<div class=\"checks\"><span>no network writes</span> <span>diff before write</span> <span>profile signed locally</span></div>`);\n\t} else $$renderer.push(\"<!--[-1-->\");\n\t$$renderer.push(`<!--]--></div>`);\n}\n//#endregion\nexport { TrustBanner as t };\n","import { n as attr_class, u as stringify } from \"./dev.js\";\n//#region src/lib/components/Badge.svelte\nfunction Badge($$renderer, $$props) {\n\tlet { tone = \"muted\", children } = $$props;\n\t$$renderer.push(`<span${attr_class(`badge ${stringify(tone)}`)}><span class=\"dot\"></span>`);\n\tchildren?.($$renderer);\n\t$$renderer.push(`<!----></span>`);\n}\n//#endregion\nexport { Badge as t };\n"],"names":[],"mappings":";;AACA;AACA,SAAS,WAAW,CAAC,UAAU,EAAE,OAAO,EAAE;AAC1C,CAAC,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,OAAO;AAClC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAClB,2BAA2B,CAAC,CAAC;AAC7B,CAAC,IAAI,CAAC,OAAO,EAAE;AACf,EAAE,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC;AAC9B,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,2HAA2H,CAAC,CAAC;AAChJ,CAAC,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC;AACrC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC;AAClC;;ACVA;AACA,SAAS,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE;AACpC,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO;AAC3C,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC;AAC5F,CAAC,QAAQ,GAAG,UAAU,CAAC;AACvB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC;AAClC;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { b as attr, k as attr_style, d as escape_html } from './dev-CrqJ3ZR3.js';
|
|
2
|
+
|
|
3
|
+
//#region src/lib/components/SafetyBadge.svelte
|
|
4
|
+
function SafetyBadge($$renderer, $$props) {
|
|
5
|
+
let { mode = "guarded", size = "md" } = $$props;
|
|
6
|
+
$$renderer.push(`<span class="safety-badge"${attr("data-mode", mode)}${attr_style("", {
|
|
7
|
+
"font-size": size === "sm" ? "9px" : null,
|
|
8
|
+
padding: size === "sm" ? "2px 6px" : null
|
|
9
|
+
})}>${escape_html(mode)}</span>`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { SafetyBadge as S };
|
|
13
|
+
//# sourceMappingURL=SafetyBadge-BSDbVVMY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SafetyBadge-BSDbVVMY.js","sources":["../../../.svelte-kit/adapter-node/chunks/SafetyBadge.js"],"sourcesContent":["import { H as attr, W as escape_html, r as attr_style } from \"./dev.js\";\n//#region src/lib/components/SafetyBadge.svelte\nfunction SafetyBadge($$renderer, $$props) {\n\tlet { mode = \"guarded\", size = \"md\" } = $$props;\n\t$$renderer.push(`<span class=\"safety-badge\"${attr(\"data-mode\", mode)}${attr_style(\"\", {\n\t\t\"font-size\": size === \"sm\" ? \"9px\" : null,\n\t\tpadding: size === \"sm\" ? \"2px 6px\" : null\n\t})}>${escape_html(mode)}</span>`);\n}\n//#endregion\nexport { SafetyBadge as t };\n"],"names":[],"mappings":";;AACA;AACA,SAAS,WAAW,CAAC,UAAU,EAAE,OAAO,EAAE;AAC1C,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,OAAO;AAChD,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,0BAA0B,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,EAAE;AACvF,EAAE,WAAW,EAAE,IAAI,KAAK,IAAI,GAAG,KAAK,GAAG,IAAI;AAC3C,EAAE,OAAO,EAAE,IAAI,KAAK,IAAI,GAAG,SAAS,GAAG;AACvC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;AAClC;;;;"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { a as attr_class, b as attr, e as ensure_array_like, c as clsx$1, d as escape_html, h as html, f as derived, s as store_get, g as unsubscribe_stores, i as getContext } from './dev-CrqJ3ZR3.js';
|
|
2
|
+
import 'node:module';
|
|
3
|
+
import { S as SafetyBadge } from './SafetyBadge-BSDbVVMY.js';
|
|
4
|
+
import './client-DRY1rofW.js';
|
|
5
|
+
import './internal-DDD35M_S.js';
|
|
6
|
+
|
|
7
|
+
//#region src/lib/components/ProfileDropdown.svelte
|
|
8
|
+
function ProfileDropdown($$renderer, $$props) {
|
|
9
|
+
$$renderer.component(($$renderer) => {
|
|
10
|
+
let { projectName, profileHash} = $$props;
|
|
11
|
+
let open = false;
|
|
12
|
+
const displayHash = derived(() => profileHash ? profileHash.slice(0, 8) : "--");
|
|
13
|
+
$$renderer.push(`<div class="profile-dd"><button class="profile-dd-trigger" aria-haspopup="menu"${attr("aria-expanded", open)}><span class="lbl">profile</span> <span class="nm">${escape_html(projectName)}</span> <span class="hash">${escape_html(displayHash())}</span> <svg class="ic-svg" viewBox="0 0 16 16" style="width:10px;height:10px"><path d="M4 6l4 4 4-4"></path></svg></button> `);
|
|
14
|
+
$$renderer.push("<!--[-1-->");
|
|
15
|
+
$$renderer.push(`<!--]--></div>`);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region ../../node_modules/@sveltejs/kit/src/runtime/app/stores.js
|
|
20
|
+
/**
|
|
21
|
+
* A function that returns all of the contextual stores. On the server, this must be called during component initialization.
|
|
22
|
+
* Only use this if you need to defer store subscription until after the component has mounted, for some reason.
|
|
23
|
+
*
|
|
24
|
+
* @deprecated Use `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated))
|
|
25
|
+
*/
|
|
26
|
+
var getStores = () => {
|
|
27
|
+
const stores$1 = getContext("__svelte__");
|
|
28
|
+
return {
|
|
29
|
+
/** @type {typeof page} */
|
|
30
|
+
page: { subscribe: stores$1.page.subscribe },
|
|
31
|
+
/** @type {typeof navigating} */
|
|
32
|
+
navigating: { subscribe: stores$1.navigating.subscribe },
|
|
33
|
+
/** @type {typeof updated} */
|
|
34
|
+
updated: stores$1.updated
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* A readable store whose value contains page data.
|
|
39
|
+
*
|
|
40
|
+
* On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time.
|
|
41
|
+
*
|
|
42
|
+
* @deprecated Use `page` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated))
|
|
43
|
+
* @type {import('svelte/store').Readable<import('@sveltejs/kit').Page>}
|
|
44
|
+
*/
|
|
45
|
+
var page = { subscribe(fn) {
|
|
46
|
+
return getStores().page.subscribe(fn);
|
|
47
|
+
} };
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/routes/+layout.svelte
|
|
50
|
+
function _layout($$renderer, $$props) {
|
|
51
|
+
$$renderer.component(($$renderer) => {
|
|
52
|
+
var $$store_subs;
|
|
53
|
+
let { data, children } = $$props;
|
|
54
|
+
let collapsed = false;
|
|
55
|
+
const CRUMB_MAP = [
|
|
56
|
+
{
|
|
57
|
+
href: "/dashboard",
|
|
58
|
+
crumbs: ["agent-profile", "overview"]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
href: "/profile",
|
|
62
|
+
crumbs: ["agent-profile", "profile editor"]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
href: "/artifacts",
|
|
66
|
+
crumbs: ["agent-profile", "artifacts"]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
href: "/diff",
|
|
70
|
+
crumbs: ["agent-profile", "diff"]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
href: "/doctor",
|
|
74
|
+
crumbs: ["agent-profile", "doctor"]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
href: "/targets",
|
|
78
|
+
crumbs: ["agent-profile", "targets"]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
href: "/activity",
|
|
82
|
+
crumbs: ["agent-profile", "activity"]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
href: "/settings",
|
|
86
|
+
crumbs: ["agent-profile", "settings"]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
href: "/",
|
|
90
|
+
crumbs: ["agent-profile", "landing"]
|
|
91
|
+
}
|
|
92
|
+
];
|
|
93
|
+
function getCrumbs(path) {
|
|
94
|
+
return CRUMB_MAP.find((e) => e.href === "/" ? path === "/" : path === e.href || path.startsWith(e.href + "/"))?.crumbs ?? ["agent-profile"];
|
|
95
|
+
}
|
|
96
|
+
let crumbs = derived(() => getCrumbs(store_get($$store_subs ??= {}, "$page", page).url.pathname));
|
|
97
|
+
const WORKSPACE_NAV = [
|
|
98
|
+
{
|
|
99
|
+
id: "dashboard",
|
|
100
|
+
href: "/dashboard",
|
|
101
|
+
label: "Overview",
|
|
102
|
+
icon: `<rect x="2" y="2.5" width="5" height="5" rx="0.6"/><rect x="9" y="2.5" width="5" height="5" rx="0.6"/><rect x="2" y="8.5" width="5" height="5" rx="0.6"/><rect x="9" y="8.5" width="5" height="5" rx="0.6"/>`
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: "profile",
|
|
106
|
+
href: "/profile",
|
|
107
|
+
label: "Profile",
|
|
108
|
+
icon: `<path d="M3 3h7l3 3v7H3z"/><path d="M10 3v3h3"/><path d="M5.5 8.5h5M5.5 11h3.5"/>`
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "artifacts",
|
|
112
|
+
href: "/artifacts",
|
|
113
|
+
label: "Artifacts",
|
|
114
|
+
icon: `<path d="M2.5 4.5l5.5-2.5 5.5 2.5-5.5 2.5z"/><path d="M2.5 4.5v5l5.5 2.5 5.5-2.5v-5"/><path d="M8 7v5"/>`
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: "diff",
|
|
118
|
+
href: "/diff",
|
|
119
|
+
label: "Diff",
|
|
120
|
+
icon: `<path d="M5 2v9.5a1.5 1.5 0 0 0 1.5 1.5H11"/><path d="M9 11.5l2 2 2-2"/><path d="M11 14v-9.5A1.5 1.5 0 0 0 9.5 3H5"/><path d="M7 4.5l-2-2-2 2"/>`
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "doctor",
|
|
124
|
+
href: "/doctor",
|
|
125
|
+
label: "Doctor",
|
|
126
|
+
icon: `<path d="M3 3h3l1 2 2-4 1.5 7 1.2-3 1.3 1.5h2"/>`
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "targets",
|
|
130
|
+
href: "/targets",
|
|
131
|
+
label: "Targets",
|
|
132
|
+
icon: `<circle cx="8" cy="8" r="6"/><circle cx="8" cy="8" r="3.5"/><circle cx="8" cy="8" r="1" fill="currentColor"/>`
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: "activity",
|
|
136
|
+
href: "/activity",
|
|
137
|
+
label: "Activity",
|
|
138
|
+
icon: `<path d="M2 8h2.5l1.5-4 2 8 1.5-5 1 3h3.5"/>`
|
|
139
|
+
}
|
|
140
|
+
];
|
|
141
|
+
const SYSTEM_NAV = [{
|
|
142
|
+
id: "settings",
|
|
143
|
+
href: "/settings",
|
|
144
|
+
label: "Settings",
|
|
145
|
+
icon: `<circle cx="8" cy="8" r="2.2"/><path d="M8 1.8v1.8M8 12.4v1.8M14.2 8h-1.8M3.6 8H1.8M12.4 3.6l-1.3 1.3M4.9 11.1l-1.3 1.3M12.4 12.4l-1.3-1.3M4.9 4.9L3.6 3.6"/>`
|
|
146
|
+
}];
|
|
147
|
+
let pathname = derived(() => store_get($$store_subs ??= {}, "$page", page).url.pathname);
|
|
148
|
+
let isStandaloneLanding = derived(() => pathname() === "/" || pathname() === "/landing");
|
|
149
|
+
function isActive(href) {
|
|
150
|
+
return pathname() === href || pathname().startsWith(href + "/");
|
|
151
|
+
}
|
|
152
|
+
if (isStandaloneLanding()) {
|
|
153
|
+
$$renderer.push("<!--[0-->");
|
|
154
|
+
children($$renderer);
|
|
155
|
+
$$renderer.push(`<!---->`);
|
|
156
|
+
} else {
|
|
157
|
+
$$renderer.push("<!--[-1-->");
|
|
158
|
+
$$renderer.push(`<div${attr_class("appv3", void 0, { "collapsed": collapsed })}><header class="appv3-header"><button class="toggle"${attr("title", "Collapse sidebar")} aria-label="Toggle sidebar"><svg class="ic-svg" viewBox="0 0 16 16"><rect x="2" y="3" width="12" height="10" rx="1"></rect><path d="M6 3v10"></path></svg></button> <a class="brand" href="/" style="text-decoration: none;"><div class="mk"></div> <span>agent-profile</span> <span class="ver">v0.6</span></a> <div class="header-crumbs"><!--[-->`);
|
|
159
|
+
const each_array = ensure_array_like(crumbs());
|
|
160
|
+
for (let i = 0, $$length = each_array.length; i < $$length; i++) {
|
|
161
|
+
let crumb = each_array[i];
|
|
162
|
+
if (i > 0) {
|
|
163
|
+
$$renderer.push("<!--[0-->");
|
|
164
|
+
$$renderer.push(`<span class="sep">/</span>`);
|
|
165
|
+
} else $$renderer.push("<!--[-1-->");
|
|
166
|
+
$$renderer.push(`<!--]--> <span${attr_class(clsx$1(i === crumbs().length - 1 ? "here" : ""))}>${escape_html(crumb)}</span>`);
|
|
167
|
+
}
|
|
168
|
+
$$renderer.push(`<!--]--></div> <div class="grow"></div> `);
|
|
169
|
+
ProfileDropdown($$renderer, {
|
|
170
|
+
projectName: data.project.rootName,
|
|
171
|
+
profilePath: data.project.profilePath,
|
|
172
|
+
profileFound: data.project.profileFound,
|
|
173
|
+
profileHash: data.project.profileHash,
|
|
174
|
+
safetyMode: data.project.safetyMode
|
|
175
|
+
});
|
|
176
|
+
$$renderer.push(`<!----> <a class="header-btn" href="/activity" title="Activity" aria-label="Activity"><svg class="ic-svg" viewBox="0 0 16 16"><path d="M3.5 11h9l-1.2-2v-3a3.3 3.3 0 0 0-6.6 0v3z"></path><path d="M6.5 13a1.5 1.5 0 0 0 3 0"></path></svg></a> <a class="header-btn" href="/doctor" title="Doctor report" aria-label="Doctor report"><svg class="ic-svg" viewBox="0 0 16 16"><circle cx="8" cy="8" r="6"></circle><path d="M6.3 6.3a1.7 1.7 0 0 1 3.4 0c0 1.1-1.7 1.4-1.7 2.5"></path><circle cx="8" cy="11.5" r="0.4" fill="currentColor"></circle></svg></a></header> <aside class="appv3-side">`);
|
|
177
|
+
$$renderer.push("<!--[0-->");
|
|
178
|
+
$$renderer.push(`<div class="nav-section">workspace</div>`);
|
|
179
|
+
$$renderer.push(`<!--]--> <!--[-->`);
|
|
180
|
+
const each_array_1 = ensure_array_like(WORKSPACE_NAV);
|
|
181
|
+
for (let $$index_1 = 0, $$length = each_array_1.length; $$index_1 < $$length; $$index_1++) {
|
|
182
|
+
let n = each_array_1[$$index_1];
|
|
183
|
+
$$renderer.push(`<a${attr_class("appv3-nav", void 0, { "active": isActive(n.href) })}${attr("href", n.href)}${attr("data-label", n.label)}${attr("title", void 0)}><svg class="ic-svg" viewBox="0 0 16 16">${html(n.icon)}</svg> <span class="nav-label">${escape_html(n.label)}</span></a>`);
|
|
184
|
+
}
|
|
185
|
+
$$renderer.push(`<!--]--> `);
|
|
186
|
+
$$renderer.push("<!--[0-->");
|
|
187
|
+
$$renderer.push(`<div class="nav-section">system</div>`);
|
|
188
|
+
$$renderer.push(`<!--]--> <!--[-->`);
|
|
189
|
+
const each_array_2 = ensure_array_like(SYSTEM_NAV);
|
|
190
|
+
for (let $$index_2 = 0, $$length = each_array_2.length; $$index_2 < $$length; $$index_2++) {
|
|
191
|
+
let n = each_array_2[$$index_2];
|
|
192
|
+
$$renderer.push(`<a${attr_class("appv3-nav", void 0, { "active": isActive(n.href) })}${attr("href", n.href)}${attr("data-label", n.label)}${attr("title", void 0)}><svg class="ic-svg" viewBox="0 0 16 16">${html(n.icon)}</svg> <span class="nav-label">${escape_html(n.label)}</span></a>`);
|
|
193
|
+
}
|
|
194
|
+
$$renderer.push(`<!--]--> <div class="appv3-side-foot"><div class="safety-line">`);
|
|
195
|
+
SafetyBadge($$renderer, {
|
|
196
|
+
mode: data.project.safetyMode,
|
|
197
|
+
size: "sm"
|
|
198
|
+
});
|
|
199
|
+
$$renderer.push(`<!----></div></div></aside> <main class="appv3-work">`);
|
|
200
|
+
children($$renderer);
|
|
201
|
+
$$renderer.push(`<!----></main> <footer class="appv3-foot"><div${attr_class(`foot-status ${data.doctor.status}`)}><span class="dot"></span> <span class="flbl">local</span> <span class="sep">·</span> <a href="/doctor">doctor ${escape_html(data.doctor.label)}</a> <span class="sep">·</span> <span>${escape_html(data.doctor.errorCount)} errors</span> <span class="sep">·</span> <span>${escape_html(data.doctor.warningCount)} warnings</span> `);
|
|
202
|
+
if (data.doctor.notVerifiableCount > 0) {
|
|
203
|
+
$$renderer.push("<!--[0-->");
|
|
204
|
+
$$renderer.push(`<span class="sep">·</span> <span>${escape_html(data.doctor.notVerifiableCount)} not verifiable</span>`);
|
|
205
|
+
} else $$renderer.push("<!--[-1-->");
|
|
206
|
+
$$renderer.push(`<!--]--> <span class="sep">·</span> <span>doctor ${escape_html(data.doctor.elapsedMs)}ms</span></div> <div class="foot-grow"></div> <div class="foot-links"><a href="/targets">targets</a> <a href="/activity">activity</a> <a href="/doctor">status</a> <a href="/settings">settings</a></div> <div class="foot-end"><span>agent-profile</span> <span class="ver">v0.6.0</span> <span class="lic">MIT</span></div></footer></div>`);
|
|
207
|
+
}
|
|
208
|
+
$$renderer.push(`<!--]-->`);
|
|
209
|
+
if ($$store_subs) unsubscribe_stores($$store_subs);
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export { _layout as default };
|
|
214
|
+
//# sourceMappingURL=_layout.svelte-Cg7oqdVB.js.map
|