jioogen 0.2.10 → 0.2.11
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/index.js +253 -48
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9579,7 +9579,7 @@ Urutan otoritas: keamanan/a11y inti > PRD/specs > file di sini > default generik
|
|
|
9579
9579
|
var EXECUTION_SIDECAR_PATH = "tasks/.execution/state.json";
|
|
9580
9580
|
var EXECUTION_SIDECAR_VERSION = 1;
|
|
9581
9581
|
var EXECUTION_SIDECAR_VERSION_V2 = 2;
|
|
9582
|
-
var HANDOFF_PROMPT_VERSION =
|
|
9582
|
+
var HANDOFF_PROMPT_VERSION = 22;
|
|
9583
9583
|
var HANDOFF_AGENT_TOKEN_TTL_SECONDS = 30 * 24 * 3600;
|
|
9584
9584
|
var HandoffPayloadSchema = external_exports.object({
|
|
9585
9585
|
promptVersion: external_exports.literal(HANDOFF_PROMPT_VERSION),
|
|
@@ -10118,6 +10118,12 @@ function formatBundleCheck(check) {
|
|
|
10118
10118
|
import { chmod, mkdir as mkdir2, readFile as readFile3, rm as rm2, writeFile as writeFile2 } from "node:fs/promises";
|
|
10119
10119
|
import { homedir } from "node:os";
|
|
10120
10120
|
import { dirname as dirname2, join as join3, resolve as resolve2 } from "node:path";
|
|
10121
|
+
|
|
10122
|
+
// src/types.ts
|
|
10123
|
+
var UI_QUALITY_MODES = ["auto", "on", "off"];
|
|
10124
|
+
|
|
10125
|
+
// src/config.ts
|
|
10126
|
+
var DEFAULT_UI_QUALITY = "auto";
|
|
10121
10127
|
var CONFIG_DIR_ENV = "JIOOGEN_CONFIG_DIR";
|
|
10122
10128
|
var LEGACY_CONFIG_DIR_ENV = "JIOOCODE_CONFIG_DIR";
|
|
10123
10129
|
var CREDENTIALS_FILE = "credentials.json";
|
|
@@ -10209,7 +10215,24 @@ function parseProjectLink(value, bundleDir) {
|
|
|
10209
10215
|
const { projectId, apiUrl } = value;
|
|
10210
10216
|
if (typeof projectId !== "string" || projectId.length === 0) return null;
|
|
10211
10217
|
if (typeof apiUrl !== "string" || apiUrl.length === 0) return null;
|
|
10212
|
-
|
|
10218
|
+
const execution = isRecord(value.execution) ? value.execution : {};
|
|
10219
|
+
return {
|
|
10220
|
+
projectId,
|
|
10221
|
+
apiUrl,
|
|
10222
|
+
bundleDir,
|
|
10223
|
+
taskMode: parseTaskMode(value.taskMode),
|
|
10224
|
+
execution: {
|
|
10225
|
+
// Legacy links may store the flag at the top level; prefer the nested form.
|
|
10226
|
+
uiQuality: parseUiQuality(execution.uiQuality ?? value.uiQuality)
|
|
10227
|
+
}
|
|
10228
|
+
};
|
|
10229
|
+
}
|
|
10230
|
+
function parseUiQuality(value) {
|
|
10231
|
+
if (value === void 0) return DEFAULT_UI_QUALITY;
|
|
10232
|
+
if (typeof value === "string" && UI_QUALITY_MODES.includes(value)) {
|
|
10233
|
+
return value;
|
|
10234
|
+
}
|
|
10235
|
+
throw new Error(`Project link execution.uiQuality tidak valid: ${String(value)}`);
|
|
10213
10236
|
}
|
|
10214
10237
|
function parseTaskMode(value) {
|
|
10215
10238
|
if (value === void 0) return DEFAULT_TASK_MODE;
|
|
@@ -10260,7 +10283,8 @@ async function writeProjectLink(bundleDir, link) {
|
|
|
10260
10283
|
{
|
|
10261
10284
|
projectId: link.projectId,
|
|
10262
10285
|
apiUrl: link.apiUrl,
|
|
10263
|
-
taskMode: link.taskMode ?? DEFAULT_TASK_MODE
|
|
10286
|
+
taskMode: link.taskMode ?? DEFAULT_TASK_MODE,
|
|
10287
|
+
execution: { uiQuality: link.execution?.uiQuality ?? DEFAULT_UI_QUALITY }
|
|
10264
10288
|
},
|
|
10265
10289
|
null,
|
|
10266
10290
|
2
|
|
@@ -10269,6 +10293,10 @@ async function writeProjectLink(bundleDir, link) {
|
|
|
10269
10293
|
"utf8"
|
|
10270
10294
|
);
|
|
10271
10295
|
}
|
|
10296
|
+
async function readUiQuality(bundleDir) {
|
|
10297
|
+
const link = await readProjectLink(resolve2(bundleDir));
|
|
10298
|
+
return link?.execution.uiQuality ?? DEFAULT_UI_QUALITY;
|
|
10299
|
+
}
|
|
10272
10300
|
async function readTaskMode(bundleDir) {
|
|
10273
10301
|
const link = await readProjectLink(resolve2(bundleDir));
|
|
10274
10302
|
return link?.taskMode ?? DEFAULT_TASK_MODE;
|
|
@@ -11282,6 +11310,7 @@ var SKILL_PACKS = {
|
|
|
11282
11310
|
"backend-rules": []
|
|
11283
11311
|
};
|
|
11284
11312
|
var HARNESS_MANIFEST_PATH = ".jioogen/harness.json";
|
|
11313
|
+
var CUSTOM_SKILLS_DIR = ".jioogen/custom/skills";
|
|
11285
11314
|
var HARNESS_SCHEMA_VERSION = 1;
|
|
11286
11315
|
var FRONTEND_MOCK_LAYER_RE = /^[ \t]*(?:[-*][ \t]+)?layer[ \t]*[:=][ \t]*[`"']?frontend_mock\b/im;
|
|
11287
11316
|
var MARKER_PREFIX = "<!-- jioogen-execution-skill:";
|
|
@@ -11418,13 +11447,19 @@ diturunkan dari AC, subfeature, flow/step, lifecycle, engine, UI states,
|
|
|
11418
11447
|
- Kalau test belum ada, task belum selesai.
|
|
11419
11448
|
- Bukti verifikasi dicatat CLI lewat \`npx jioogen task verify <ref>\`; \`task complete\` menolak tanpa bukti exit 0.
|
|
11420
11449
|
|
|
11421
|
-
## 5.
|
|
11422
|
-
Berhenti
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
11427
|
-
|
|
11450
|
+
## 5. Berhenti sebentar untuk konfirmasi
|
|
11451
|
+
Berhenti setelah satu bagian besar selesai, sebelum beralih ke bagian berikutnya,
|
|
11452
|
+
atau sebelum pekerjaan sensitif (data, akses, integrasi eksternal, rahasia,
|
|
11453
|
+
deploy/infra). Jangan pakai istilah teknis saat bertanya. Tanyakan dengan bahasa
|
|
11454
|
+
sehari-hari: "Bagian ini selesai. Silakan cek hasilnya. Mau lanjut, perbaiki dulu,
|
|
11455
|
+
atau batalkan dulu?"
|
|
11456
|
+
- **Lanjut** \u2014 kerjakan bagian berikutnya.
|
|
11457
|
+
- **Perbaiki dulu** \u2014 dengarkan bagian yang salah, perbaiki, lalu tanya lagi.
|
|
11458
|
+
- **Batalkan dulu** \u2014 jangan lanjut; laporkan kondisi saat ini.
|
|
11459
|
+
|
|
11460
|
+
Setelah user memilih, catat di sistem dengan \`npx jioogen review --approve\`,
|
|
11461
|
+
\`--request-changes "<teks>"\`, atau \`--stop\`, lalu \`npx jioogen sync\`. Jangan
|
|
11462
|
+
menampilkan perintah itu sebagai pertanyaan ke user.
|
|
11428
11463
|
|
|
11429
11464
|
## 6. Skill eksekusi
|
|
11430
11465
|
Baca skill \`${EXECUTION_SKILL_NAME}\` di awal prompt
|
|
@@ -11584,18 +11619,21 @@ Tanya: "Apakah senior engineer bilang ini overcomplicated?" Bila ya, sederhanaka
|
|
|
11584
11619
|
- Task \`layer: verification\` menjalankan semua \`verificationCommand\`, smoke test
|
|
11585
11620
|
route/navigasi, cek UI states + responsive, dan verifikasi AC.
|
|
11586
11621
|
|
|
11587
|
-
## 5.
|
|
11622
|
+
## 5. Berhenti sebentar untuk konfirmasi
|
|
11588
11623
|
|
|
11589
|
-
Berhenti
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
-
|
|
11593
|
-
|
|
11624
|
+
Berhenti setelah satu bagian besar selesai, sebelum beralih ke bagian berikutnya,
|
|
11625
|
+
atau sebelum pekerjaan sensitif (data, akses, integrasi eksternal, rahasia,
|
|
11626
|
+
deploy/infra). Jangan pakai istilah teknis saat bertanya. Tanyakan dengan bahasa
|
|
11627
|
+
sehari-hari: "Bagian ini selesai. Silakan cek hasilnya. Mau lanjut, perbaiki dulu,
|
|
11628
|
+
atau batalkan dulu?"
|
|
11629
|
+
- **Lanjut** \u2014 kerjakan bagian berikutnya.
|
|
11630
|
+
- **Perbaiki dulu** \u2014 dengarkan bagian yang salah, perbaiki, lalu tanya lagi.
|
|
11631
|
+
- **Batalkan dulu** \u2014 jangan lanjut; laporkan kondisi saat ini.
|
|
11594
11632
|
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11633
|
+
Set \`current.awaitingCheckpoint = true\` di sidecar saat berhenti. Setelah user
|
|
11634
|
+
memilih, catat di sistem dengan \`npx jioogen review --approve\`,
|
|
11635
|
+
\`--request-changes "<teks>"\`, atau \`--stop\`, lalu \`npx jioogen sync\`. Jangan
|
|
11636
|
+
menampilkan perintah itu sebagai pertanyaan ke user.
|
|
11599
11637
|
|
|
11600
11638
|
## 6. Larangan ringkas
|
|
11601
11639
|
|
|
@@ -11687,7 +11725,7 @@ function parsePack(value) {
|
|
|
11687
11725
|
}
|
|
11688
11726
|
function parseHarnessManifest(value) {
|
|
11689
11727
|
if (!isRecord2(value)) return null;
|
|
11690
|
-
const { schemaVersion, productKind, packs, updatedAt } = value;
|
|
11728
|
+
const { schemaVersion, productKind, packs, custom: custom2, updatedAt } = value;
|
|
11691
11729
|
if (schemaVersion !== HARNESS_SCHEMA_VERSION) return null;
|
|
11692
11730
|
if (!isProductKind(productKind)) return null;
|
|
11693
11731
|
if (!Array.isArray(packs)) return null;
|
|
@@ -11697,8 +11735,22 @@ function parseHarnessManifest(value) {
|
|
|
11697
11735
|
if (parsed === null) return null;
|
|
11698
11736
|
parsedPacks.push(parsed);
|
|
11699
11737
|
}
|
|
11738
|
+
const parsedCustom = [];
|
|
11739
|
+
if (Array.isArray(custom2)) {
|
|
11740
|
+
for (const entry of custom2) {
|
|
11741
|
+
const parsed = parseSkillEntry(entry);
|
|
11742
|
+
if (parsed === null) return null;
|
|
11743
|
+
parsedCustom.push(parsed);
|
|
11744
|
+
}
|
|
11745
|
+
}
|
|
11700
11746
|
if (typeof updatedAt !== "string" || updatedAt.length === 0) return null;
|
|
11701
|
-
return {
|
|
11747
|
+
return {
|
|
11748
|
+
schemaVersion: HARNESS_SCHEMA_VERSION,
|
|
11749
|
+
productKind,
|
|
11750
|
+
packs: parsedPacks,
|
|
11751
|
+
custom: parsedCustom,
|
|
11752
|
+
updatedAt
|
|
11753
|
+
};
|
|
11702
11754
|
}
|
|
11703
11755
|
async function readHarnessManifest(bundleDir) {
|
|
11704
11756
|
const path = join7(resolve3(bundleDir), HARNESS_MANIFEST_PATH);
|
|
@@ -11738,8 +11790,15 @@ async function detectProductKind(bundleDir) {
|
|
|
11738
11790
|
}
|
|
11739
11791
|
return "non-ui";
|
|
11740
11792
|
}
|
|
11741
|
-
function packsForProduct(productKind) {
|
|
11742
|
-
|
|
11793
|
+
function packsForProduct(productKind, uiQuality = "auto") {
|
|
11794
|
+
const packs = productKind === "ui" ? ["baseline", "ui-quality", "backend-rules"] : ["baseline", "backend-rules"];
|
|
11795
|
+
if (uiQuality === "on" && !packs.includes("ui-quality")) {
|
|
11796
|
+
return [...packs, "ui-quality"];
|
|
11797
|
+
}
|
|
11798
|
+
if (uiQuality === "off") {
|
|
11799
|
+
return packs.filter((pack) => pack !== "ui-quality");
|
|
11800
|
+
}
|
|
11801
|
+
return packs;
|
|
11743
11802
|
}
|
|
11744
11803
|
function cliPackageRoot2() {
|
|
11745
11804
|
return resolve3(dirname5(fileURLToPath2(import.meta.url)), "..");
|
|
@@ -11836,8 +11895,85 @@ async function provisionPack(root, pack, prior, written, preserved) {
|
|
|
11836
11895
|
}
|
|
11837
11896
|
return { name: pack, skills, missing };
|
|
11838
11897
|
}
|
|
11839
|
-
function
|
|
11840
|
-
|
|
11898
|
+
async function provisionCustomSkills(root, prior) {
|
|
11899
|
+
const written = [];
|
|
11900
|
+
const preserved = [];
|
|
11901
|
+
const custom2 = [];
|
|
11902
|
+
const conflicts = [];
|
|
11903
|
+
const removed = [];
|
|
11904
|
+
const sources = /* @__PURE__ */ new Set();
|
|
11905
|
+
const base = join7(root, CUSTOM_SKILLS_DIR);
|
|
11906
|
+
const reserved = /* @__PURE__ */ new Set([EXECUTION_SKILL_NAME, ...Object.values(SKILL_PACKS).flat()]);
|
|
11907
|
+
let entries = [];
|
|
11908
|
+
try {
|
|
11909
|
+
entries = await readdir5(base, { withFileTypes: true });
|
|
11910
|
+
} catch (error) {
|
|
11911
|
+
if (!isMissingFile4(error)) throw error;
|
|
11912
|
+
}
|
|
11913
|
+
const names = entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort();
|
|
11914
|
+
for (const name of names) {
|
|
11915
|
+
const source = join7(base, name);
|
|
11916
|
+
if (!await isFile(join7(source, "SKILL.md"))) continue;
|
|
11917
|
+
sources.add(name);
|
|
11918
|
+
if (reserved.has(name)) {
|
|
11919
|
+
conflicts.push(name);
|
|
11920
|
+
continue;
|
|
11921
|
+
}
|
|
11922
|
+
const sha256 = await hashSkillDirectory(source);
|
|
11923
|
+
const previous = prior.find((entry) => entry.name === name);
|
|
11924
|
+
let owned = previous !== void 0;
|
|
11925
|
+
for (const dir of AGENT_SKILL_DIRS) {
|
|
11926
|
+
const targetDir = join7(root, dir, name);
|
|
11927
|
+
const skillMd = join7(targetDir, "SKILL.md");
|
|
11928
|
+
if (await isFile(skillMd)) {
|
|
11929
|
+
const targetHash = await hashSkillDirectory(targetDir);
|
|
11930
|
+
if (previous === void 0) {
|
|
11931
|
+
preserved.push(`${dir}/${name}/SKILL.md`);
|
|
11932
|
+
continue;
|
|
11933
|
+
}
|
|
11934
|
+
if (targetHash === sha256) {
|
|
11935
|
+
owned = true;
|
|
11936
|
+
continue;
|
|
11937
|
+
}
|
|
11938
|
+
if (targetHash === previous.sha256) {
|
|
11939
|
+
await replaceDirectory(source, targetDir);
|
|
11940
|
+
written.push(`${dir}/${name}/SKILL.md`);
|
|
11941
|
+
owned = true;
|
|
11942
|
+
continue;
|
|
11943
|
+
}
|
|
11944
|
+
preserved.push(`${dir}/${name}/SKILL.md`);
|
|
11945
|
+
continue;
|
|
11946
|
+
}
|
|
11947
|
+
await replaceDirectory(source, targetDir);
|
|
11948
|
+
written.push(`${dir}/${name}/SKILL.md`);
|
|
11949
|
+
owned = true;
|
|
11950
|
+
}
|
|
11951
|
+
if (owned) {
|
|
11952
|
+
custom2.push({ name, source: `custom/${name}`, sha256 });
|
|
11953
|
+
} else if (previous !== void 0) {
|
|
11954
|
+
custom2.push(previous);
|
|
11955
|
+
}
|
|
11956
|
+
}
|
|
11957
|
+
for (const entry of prior) {
|
|
11958
|
+
if (sources.has(entry.name) && !reserved.has(entry.name)) continue;
|
|
11959
|
+
if (reserved.has(entry.name)) continue;
|
|
11960
|
+
for (const dir of AGENT_SKILL_DIRS) {
|
|
11961
|
+
const targetDir = join7(root, dir, entry.name);
|
|
11962
|
+
const skillMd = join7(targetDir, "SKILL.md");
|
|
11963
|
+
if (!await isFile(skillMd)) continue;
|
|
11964
|
+
const targetHash = await hashSkillDirectory(targetDir);
|
|
11965
|
+
if (targetHash !== entry.sha256) {
|
|
11966
|
+
preserved.push(`${dir}/${entry.name}/SKILL.md`);
|
|
11967
|
+
continue;
|
|
11968
|
+
}
|
|
11969
|
+
await rm5(targetDir, { recursive: true, force: true });
|
|
11970
|
+
removed.push(`${dir}/${entry.name}/SKILL.md`);
|
|
11971
|
+
}
|
|
11972
|
+
}
|
|
11973
|
+
return { custom: custom2, conflicts, removed, written, preserved };
|
|
11974
|
+
}
|
|
11975
|
+
function sameManifestBody(manifest, productKind, packs, custom2) {
|
|
11976
|
+
return manifest.productKind === productKind && JSON.stringify(manifest.packs) === JSON.stringify(packs) && JSON.stringify(manifest.custom) === JSON.stringify(custom2);
|
|
11841
11977
|
}
|
|
11842
11978
|
async function provisionSkillPacks(bundleDir, packNames, productKind) {
|
|
11843
11979
|
const root = resolve3(bundleDir);
|
|
@@ -11849,20 +11985,27 @@ async function provisionSkillPacks(bundleDir, packNames, productKind) {
|
|
|
11849
11985
|
const prior = existing?.packs.find((entry) => entry.name === pack);
|
|
11850
11986
|
packs.push(await provisionPack(root, pack, prior, written, preserved));
|
|
11851
11987
|
}
|
|
11852
|
-
const
|
|
11988
|
+
const custom2 = await provisionCustomSkills(root, existing?.custom ?? []);
|
|
11989
|
+
written.push(...custom2.written);
|
|
11990
|
+
preserved.push(...custom2.preserved);
|
|
11991
|
+
const changed = existing === null || !sameManifestBody(existing, productKind, packs, custom2.custom);
|
|
11853
11992
|
const manifest = {
|
|
11854
11993
|
schemaVersion: HARNESS_SCHEMA_VERSION,
|
|
11855
11994
|
productKind,
|
|
11856
11995
|
packs,
|
|
11996
|
+
custom: custom2.custom,
|
|
11857
11997
|
updatedAt: changed ? (/* @__PURE__ */ new Date()).toISOString() : existing?.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
11858
11998
|
};
|
|
11859
11999
|
const harnessPath = await writeHarnessManifest(root, manifest);
|
|
11860
12000
|
return {
|
|
11861
12001
|
written,
|
|
11862
12002
|
preserved,
|
|
12003
|
+
removed: custom2.removed,
|
|
11863
12004
|
productKind,
|
|
11864
12005
|
packs,
|
|
12006
|
+
custom: custom2.custom,
|
|
11865
12007
|
missing: packs.flatMap((pack) => pack.missing),
|
|
12008
|
+
conflicts: custom2.conflicts,
|
|
11866
12009
|
harnessPath
|
|
11867
12010
|
};
|
|
11868
12011
|
}
|
|
@@ -11906,20 +12049,35 @@ async function installAgentSkills(bundleDir, options = {}) {
|
|
|
11906
12049
|
if (gitignore !== null) written.push(gitignore);
|
|
11907
12050
|
written.push(...await ensureCustomScaffold(root));
|
|
11908
12051
|
if (options.noSkills === true) {
|
|
11909
|
-
return {
|
|
12052
|
+
return {
|
|
12053
|
+
written,
|
|
12054
|
+
preserved,
|
|
12055
|
+
removed: [],
|
|
12056
|
+
productKind,
|
|
12057
|
+
packs: [],
|
|
12058
|
+
custom: [],
|
|
12059
|
+
missing: [],
|
|
12060
|
+
conflicts: [],
|
|
12061
|
+
harnessPath
|
|
12062
|
+
};
|
|
11910
12063
|
}
|
|
12064
|
+
const uiQuality = options.uiQuality ?? await readUiQuality(root);
|
|
11911
12065
|
const current = await readHarnessManifest(root);
|
|
12066
|
+
const priorPacks = current?.packs.map((pack) => pack.name) ?? [];
|
|
11912
12067
|
const requested = options.packs ?? packNamesInCanonicalOrder([
|
|
11913
|
-
...packsForProduct(productKind),
|
|
11914
|
-
...
|
|
12068
|
+
...packsForProduct(productKind, uiQuality),
|
|
12069
|
+
...priorPacks.filter((pack) => !(uiQuality === "off" && pack === "ui-quality"))
|
|
11915
12070
|
]);
|
|
11916
12071
|
const provision = await provisionSkillPacks(root, requested, productKind);
|
|
11917
12072
|
return {
|
|
11918
12073
|
written: [...written, ...provision.written],
|
|
11919
12074
|
preserved: [...preserved, ...provision.preserved],
|
|
12075
|
+
removed: provision.removed,
|
|
11920
12076
|
productKind,
|
|
11921
12077
|
packs: provision.packs,
|
|
12078
|
+
custom: provision.custom,
|
|
11922
12079
|
missing: provision.missing,
|
|
12080
|
+
conflicts: provision.conflicts,
|
|
11923
12081
|
harnessPath: provision.harnessPath
|
|
11924
12082
|
};
|
|
11925
12083
|
}
|
|
@@ -13062,8 +13220,17 @@ async function pullCommand(projectId, options) {
|
|
|
13062
13220
|
const written = await extractBundle(bytes, target);
|
|
13063
13221
|
await clearBaseline(target).catch(() => {
|
|
13064
13222
|
});
|
|
13065
|
-
const
|
|
13066
|
-
await
|
|
13223
|
+
const uiQuality = options.uiQuality ?? await readUiQuality(target);
|
|
13224
|
+
const skills = await installAgentSkills(target, {
|
|
13225
|
+
noSkills: skillsDisabled(options),
|
|
13226
|
+
uiQuality
|
|
13227
|
+
});
|
|
13228
|
+
await writeProjectLink(target, {
|
|
13229
|
+
projectId,
|
|
13230
|
+
apiUrl,
|
|
13231
|
+
taskMode: options.taskMode,
|
|
13232
|
+
execution: { uiQuality }
|
|
13233
|
+
});
|
|
13067
13234
|
if (options.json === true) {
|
|
13068
13235
|
console.log(JSON.stringify({ projectId, target, files: written, skills }, null, 2));
|
|
13069
13236
|
return;
|
|
@@ -13071,7 +13238,7 @@ async function pullCommand(projectId, options) {
|
|
|
13071
13238
|
console.log(`Pulled ${written.length} file ke ${target}`);
|
|
13072
13239
|
console.log("Project ter-bind lewat .jioogen/project.json.");
|
|
13073
13240
|
console.log(`Skills eksekusi terpasang: ${skills.written.length} file.`);
|
|
13074
|
-
printSkillPacks(skills.packs, skills.missing);
|
|
13241
|
+
printSkillPacks(skills.packs, skills.missing, skills.custom, skills.conflicts);
|
|
13075
13242
|
}
|
|
13076
13243
|
async function linkCommand(projectId, options) {
|
|
13077
13244
|
const { apiUrl, client } = await resolveApi(options);
|
|
@@ -13079,8 +13246,17 @@ async function linkCommand(projectId, options) {
|
|
|
13079
13246
|
await assertLinkTarget(target, projectId);
|
|
13080
13247
|
await verifyProjectAccess(client, projectId);
|
|
13081
13248
|
const taskMode = options.taskMode ?? await readTaskMode(target);
|
|
13082
|
-
|
|
13083
|
-
|
|
13249
|
+
const uiQuality = options.uiQuality ?? await readUiQuality(target);
|
|
13250
|
+
await writeProjectLink(target, {
|
|
13251
|
+
projectId,
|
|
13252
|
+
apiUrl,
|
|
13253
|
+
taskMode,
|
|
13254
|
+
execution: { uiQuality }
|
|
13255
|
+
});
|
|
13256
|
+
const skills = await installAgentSkills(target, {
|
|
13257
|
+
noSkills: skillsDisabled(options),
|
|
13258
|
+
uiQuality
|
|
13259
|
+
});
|
|
13084
13260
|
const linkedFile = join10(target, ".jioogen", "project.json");
|
|
13085
13261
|
if (options.json === true) {
|
|
13086
13262
|
console.log(JSON.stringify({ projectId, target, apiUrl, linkedFile, skills }, null, 2));
|
|
@@ -13089,7 +13265,7 @@ async function linkCommand(projectId, options) {
|
|
|
13089
13265
|
console.log(`Project ${projectId} ter-bind ke ${target}.`);
|
|
13090
13266
|
console.log(`File link: ${linkedFile} (API ${apiUrl}).`);
|
|
13091
13267
|
console.log(`Skills eksekusi terpasang: ${skills.written.length} file.`);
|
|
13092
|
-
printSkillPacks(skills.packs, skills.missing);
|
|
13268
|
+
printSkillPacks(skills.packs, skills.missing, skills.custom, skills.conflicts);
|
|
13093
13269
|
await printPreExistingScope(target, projectId);
|
|
13094
13270
|
}
|
|
13095
13271
|
async function printPreExistingScope(bundleDir, projectId) {
|
|
@@ -13110,7 +13286,11 @@ async function printPreExistingScope(bundleDir, projectId) {
|
|
|
13110
13286
|
}
|
|
13111
13287
|
async function skillsInstallCommand(options) {
|
|
13112
13288
|
const bundleDir = await resolveSkillsBundleDir(options);
|
|
13113
|
-
const
|
|
13289
|
+
const uiQuality = options.uiQuality ?? await readUiQuality(bundleDir);
|
|
13290
|
+
const skills = await installAgentSkills(bundleDir, {
|
|
13291
|
+
noSkills: skillsDisabled(options),
|
|
13292
|
+
uiQuality
|
|
13293
|
+
});
|
|
13114
13294
|
if (options.json === true) {
|
|
13115
13295
|
console.log(JSON.stringify({ bundleDir, ...skills }, null, 2));
|
|
13116
13296
|
return;
|
|
@@ -13118,15 +13298,17 @@ async function skillsInstallCommand(options) {
|
|
|
13118
13298
|
console.log(`Skills eksekusi terpasang di ${bundleDir}:`);
|
|
13119
13299
|
for (const file of skills.written) console.log(`- ${file}`);
|
|
13120
13300
|
for (const file of skills.preserved) console.log(`- ${file} (dilewati: milik user)`);
|
|
13121
|
-
printSkillPacks(skills.packs, skills.missing);
|
|
13301
|
+
printSkillPacks(skills.packs, skills.missing, skills.custom, skills.conflicts);
|
|
13122
13302
|
}
|
|
13123
13303
|
async function skillsListCommand(options) {
|
|
13124
13304
|
const bundleDir = await resolveSkillsBundleDir(options);
|
|
13125
13305
|
const manifest = await readHarnessManifest(bundleDir);
|
|
13306
|
+
const uiQuality = await readUiQuality(bundleDir);
|
|
13126
13307
|
if (options.json === true) {
|
|
13127
|
-
console.log(JSON.stringify({ bundleDir, harness: manifest }, null, 2));
|
|
13308
|
+
console.log(JSON.stringify({ bundleDir, uiQuality, harness: manifest }, null, 2));
|
|
13128
13309
|
return;
|
|
13129
13310
|
}
|
|
13311
|
+
console.log(`UI/UX quality: ${uiQuality}`);
|
|
13130
13312
|
if (manifest === null) {
|
|
13131
13313
|
console.log(`Belum ada skill pack terpasang di ${bundleDir}.`);
|
|
13132
13314
|
return;
|
|
@@ -13141,6 +13323,12 @@ async function skillsListCommand(options) {
|
|
|
13141
13323
|
for (const name of pack.missing) console.log(`- ${name} (missing)`);
|
|
13142
13324
|
if (pack.skills.length === 0 && pack.missing.length === 0) console.log("- (tidak ada skill)");
|
|
13143
13325
|
}
|
|
13326
|
+
if (manifest.custom.length > 0) {
|
|
13327
|
+
console.log("custom:");
|
|
13328
|
+
for (const skill of manifest.custom) {
|
|
13329
|
+
console.log(`- ${skill.name} (installed, ${skill.sha256.slice(0, 12)})`);
|
|
13330
|
+
}
|
|
13331
|
+
}
|
|
13144
13332
|
}
|
|
13145
13333
|
async function skillsAddCommand(packArgument, options) {
|
|
13146
13334
|
const packNames = parseSkillPackArgument(packArgument);
|
|
@@ -13154,7 +13342,7 @@ async function skillsAddCommand(packArgument, options) {
|
|
|
13154
13342
|
return;
|
|
13155
13343
|
}
|
|
13156
13344
|
console.log(`Skill pack ditambahkan ke ${bundleDir}: ${result.added.join(", ")}`);
|
|
13157
|
-
printSkillPacks(result.packs, result.missing);
|
|
13345
|
+
printSkillPacks(result.packs, result.missing, result.custom, result.conflicts);
|
|
13158
13346
|
}
|
|
13159
13347
|
async function skillsUpdateCommand(options) {
|
|
13160
13348
|
const bundleDir = await resolveSkillsBundleDir(options);
|
|
@@ -13172,7 +13360,7 @@ async function skillsUpdateCommand(options) {
|
|
|
13172
13360
|
return;
|
|
13173
13361
|
}
|
|
13174
13362
|
console.log(`Skill pack diperbarui di ${bundleDir}.`);
|
|
13175
|
-
printSkillPacks(result.packs, result.missing);
|
|
13363
|
+
printSkillPacks(result.packs, result.missing, result.custom, result.conflicts);
|
|
13176
13364
|
}
|
|
13177
13365
|
async function skillsRemoveCommand(packArgument, options) {
|
|
13178
13366
|
const packNames = parseSkillPackArgument(packArgument);
|
|
@@ -13195,13 +13383,21 @@ async function resolveSkillsBundleDir(options) {
|
|
|
13195
13383
|
const link = await findProjectLink(options.dir ?? process.cwd());
|
|
13196
13384
|
return resolve6(link?.bundleDir ?? options.dir ?? process.cwd());
|
|
13197
13385
|
}
|
|
13198
|
-
function printSkillPacks(packs, missing) {
|
|
13199
|
-
if (packs.length === 0 && missing.length === 0) return;
|
|
13386
|
+
function printSkillPacks(packs, missing, custom2 = [], conflicts = []) {
|
|
13387
|
+
if (packs.length === 0 && missing.length === 0 && custom2.length === 0) return;
|
|
13200
13388
|
const installed = packs.filter((pack) => pack.skills.length > 0).map((pack) => `${pack.name} (${pack.skills.map((skill) => skill.name).join(", ")})`);
|
|
13201
13389
|
if (installed.length > 0) console.log(`Skill pack: ${installed.join("; ")}.`);
|
|
13390
|
+
if (custom2.length > 0) {
|
|
13391
|
+
console.log(`Skill custom: ${custom2.map((entry) => entry.name).join(", ")}.`);
|
|
13392
|
+
}
|
|
13202
13393
|
if (missing.length > 0) {
|
|
13203
13394
|
console.warn(`Peringatan: skill tidak ditemukan (dilewati): ${missing.join(", ")}.`);
|
|
13204
13395
|
}
|
|
13396
|
+
if (conflicts.length > 0) {
|
|
13397
|
+
console.warn(
|
|
13398
|
+
`Peringatan: skill custom bentrok dengan skill bawaan (dilewati): ${conflicts.join(", ")}.`
|
|
13399
|
+
);
|
|
13400
|
+
}
|
|
13205
13401
|
}
|
|
13206
13402
|
async function checkCommand(options) {
|
|
13207
13403
|
const link = await findProjectLink(options.dir ?? process.cwd());
|
|
@@ -14228,7 +14424,7 @@ async function authoringRemoveCommand(options) {
|
|
|
14228
14424
|
}
|
|
14229
14425
|
|
|
14230
14426
|
// src/index.ts
|
|
14231
|
-
var VERSION = "0.2.
|
|
14427
|
+
var VERSION = "0.2.11";
|
|
14232
14428
|
function parseTaskModeOption(value) {
|
|
14233
14429
|
if (value === void 0) return void 0;
|
|
14234
14430
|
const parsed = TaskModeSchema.safeParse(value);
|
|
@@ -14237,6 +14433,11 @@ function parseTaskModeOption(value) {
|
|
|
14237
14433
|
}
|
|
14238
14434
|
return parsed.data;
|
|
14239
14435
|
}
|
|
14436
|
+
function parseUiQualityOption(value) {
|
|
14437
|
+
if (value === void 0) return void 0;
|
|
14438
|
+
if (UI_QUALITY_MODES.includes(value)) return value;
|
|
14439
|
+
throw new UsageError(`--ui-quality harus salah satu: ${UI_QUALITY_MODES.join(", ")}`);
|
|
14440
|
+
}
|
|
14240
14441
|
var USAGE = `jioogen \u2014 CLI JiooGen (task selection lokal, server read-only)
|
|
14241
14442
|
|
|
14242
14443
|
Usage:
|
|
@@ -14245,9 +14446,9 @@ Usage:
|
|
|
14245
14446
|
jioogen logout
|
|
14246
14447
|
jioogen whoami
|
|
14247
14448
|
jioogen projects
|
|
14248
|
-
jioogen pull <projectId> [--dir <dir>] [--force] [--no-skills] [--mode <mode>]
|
|
14249
|
-
jioogen link <projectId> [--dir <dir>] [--no-skills] [--mode <mode>]
|
|
14250
|
-
jioogen skills install [--dir <dir>] [--no-skills]
|
|
14449
|
+
jioogen pull <projectId> [--dir <dir>] [--force] [--no-skills] [--mode <mode>] [--ui-quality <auto|on|off>]
|
|
14450
|
+
jioogen link <projectId> [--dir <dir>] [--no-skills] [--mode <mode>] [--ui-quality <auto|on|off>]
|
|
14451
|
+
jioogen skills install [--dir <dir>] [--no-skills] [--ui-quality <auto|on|off>]
|
|
14251
14452
|
jioogen skills list [--dir <dir>] [--json]
|
|
14252
14453
|
jioogen skills add <baseline|ui-quality|backend-rules|all> [--dir <dir>]
|
|
14253
14454
|
jioogen skills update [--dir <dir>]
|
|
@@ -14287,6 +14488,7 @@ async function main() {
|
|
|
14287
14488
|
let raw = {};
|
|
14288
14489
|
let positionals = [];
|
|
14289
14490
|
let taskMode;
|
|
14491
|
+
let uiQuality;
|
|
14290
14492
|
try {
|
|
14291
14493
|
const parsed = parseArgs({
|
|
14292
14494
|
args: process.argv.slice(2),
|
|
@@ -14303,6 +14505,7 @@ async function main() {
|
|
|
14303
14505
|
force: { type: "boolean" },
|
|
14304
14506
|
"no-skills": { type: "boolean" },
|
|
14305
14507
|
mode: { type: "string" },
|
|
14508
|
+
"ui-quality": { type: "string" },
|
|
14306
14509
|
"no-sync": { type: "boolean" },
|
|
14307
14510
|
files: { type: "string" },
|
|
14308
14511
|
note: { type: "string" },
|
|
@@ -14321,6 +14524,7 @@ async function main() {
|
|
|
14321
14524
|
raw = parsed.values;
|
|
14322
14525
|
positionals = parsed.positionals;
|
|
14323
14526
|
taskMode = parseTaskModeOption(text(raw.mode));
|
|
14527
|
+
uiQuality = parseUiQualityOption(text(raw["ui-quality"]));
|
|
14324
14528
|
} catch (error) {
|
|
14325
14529
|
console.error(`Error: ${error instanceof Error ? error.message : String(error)}
|
|
14326
14530
|
`);
|
|
@@ -14350,7 +14554,8 @@ async function main() {
|
|
|
14350
14554
|
json: flag(raw.json),
|
|
14351
14555
|
write: flag(raw.write),
|
|
14352
14556
|
visual: text(raw.visual),
|
|
14353
|
-
taskMode
|
|
14557
|
+
taskMode,
|
|
14558
|
+
uiQuality
|
|
14354
14559
|
};
|
|
14355
14560
|
if (flag(raw.version)) {
|
|
14356
14561
|
console.log(`jioogen ${VERSION}`);
|