@kl-c/matrixos 0.1.12 → 0.1.13
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/cli/index.js +1 -1
- package/dist/cli-node/index.js +1 -1
- package/dist/index.js +117 -97
- package/dist/plugin/auto-adoption.d.ts +3 -0
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -2145,7 +2145,7 @@ var package_default;
|
|
|
2145
2145
|
var init_package = __esm(() => {
|
|
2146
2146
|
package_default = {
|
|
2147
2147
|
name: "@kl-c/matrixos",
|
|
2148
|
-
version: "0.1.
|
|
2148
|
+
version: "0.1.13",
|
|
2149
2149
|
description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
|
|
2150
2150
|
main: "./dist/index.js",
|
|
2151
2151
|
types: "dist/index.d.ts",
|
package/dist/cli-node/index.js
CHANGED
|
@@ -2145,7 +2145,7 @@ var package_default;
|
|
|
2145
2145
|
var init_package = __esm(() => {
|
|
2146
2146
|
package_default = {
|
|
2147
2147
|
name: "@kl-c/matrixos",
|
|
2148
|
-
version: "0.1.
|
|
2148
|
+
version: "0.1.13",
|
|
2149
2149
|
description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
|
|
2150
2150
|
main: "./dist/index.js",
|
|
2151
2151
|
types: "dist/index.d.ts",
|
package/dist/index.js
CHANGED
|
@@ -57285,7 +57285,7 @@ var require_dist10 = __commonJS((exports, module) => {
|
|
|
57285
57285
|
var import_node_worker_threads2 = __require("worker_threads");
|
|
57286
57286
|
var import_collection2 = require_dist3();
|
|
57287
57287
|
var import_node_events = __require("events");
|
|
57288
|
-
var
|
|
57288
|
+
var import_node_path129 = __require("path");
|
|
57289
57289
|
var import_node_worker_threads = __require("worker_threads");
|
|
57290
57290
|
var import_collection = require_dist3();
|
|
57291
57291
|
var WorkerSendPayloadOp = /* @__PURE__ */ ((WorkerSendPayloadOp2) => {
|
|
@@ -57420,18 +57420,18 @@ var require_dist10 = __commonJS((exports, module) => {
|
|
|
57420
57420
|
resolveWorkerPath() {
|
|
57421
57421
|
const path28 = this.options.workerPath;
|
|
57422
57422
|
if (!path28) {
|
|
57423
|
-
return (0,
|
|
57423
|
+
return (0, import_node_path129.join)(__dirname, "defaultWorker.js");
|
|
57424
57424
|
}
|
|
57425
|
-
if ((0,
|
|
57425
|
+
if ((0, import_node_path129.isAbsolute)(path28)) {
|
|
57426
57426
|
return path28;
|
|
57427
57427
|
}
|
|
57428
57428
|
if (/^\.\.?[/\\]/.test(path28)) {
|
|
57429
|
-
return (0,
|
|
57429
|
+
return (0, import_node_path129.resolve)(path28);
|
|
57430
57430
|
}
|
|
57431
57431
|
try {
|
|
57432
57432
|
return __require.resolve(path28);
|
|
57433
57433
|
} catch {
|
|
57434
|
-
return (0,
|
|
57434
|
+
return (0, import_node_path129.resolve)(path28);
|
|
57435
57435
|
}
|
|
57436
57436
|
}
|
|
57437
57437
|
async waitForWorkerReady(worker) {
|
|
@@ -233073,7 +233073,7 @@ import * as Crypto from "crypto";
|
|
|
233073
233073
|
import { once } from "events";
|
|
233074
233074
|
import { createReadStream, createWriteStream, promises as fs26, WriteStream } from "fs";
|
|
233075
233075
|
import { tmpdir as tmpdir8 } from "os";
|
|
233076
|
-
import { join as
|
|
233076
|
+
import { join as join137 } from "path";
|
|
233077
233077
|
import { Readable as Readable2, Transform } from "stream";
|
|
233078
233078
|
import { URL as URL2 } from "url";
|
|
233079
233079
|
async function getMediaKeys(buffer2, mediaType) {
|
|
@@ -233151,7 +233151,7 @@ async function generateThumbnail(file2, mediaType, options) {
|
|
|
233151
233151
|
};
|
|
233152
233152
|
}
|
|
233153
233153
|
} else if (mediaType === "video") {
|
|
233154
|
-
const imgFilename =
|
|
233154
|
+
const imgFilename = join137(getTmpFilesDirectory(), generateMessageIDV2() + ".jpg");
|
|
233155
233155
|
try {
|
|
233156
233156
|
await extractVideoThumb(file2, imgFilename, "00:00:00", { width: 32, height: 32 });
|
|
233157
233157
|
const buff = await fs26.readFile(imgFilename);
|
|
@@ -233194,7 +233194,7 @@ var import_boom5, getTmpFilesDirectory = () => tmpdir8(), getImageProcessingLibr
|
|
|
233194
233194
|
const { stream: stream3 } = await getStream(media);
|
|
233195
233195
|
logger7?.debug("got stream for raw upload");
|
|
233196
233196
|
const hasher = Crypto.createHash("sha256");
|
|
233197
|
-
const filePath =
|
|
233197
|
+
const filePath = join137(tmpdir8(), mediaType + generateMessageIDV2());
|
|
233198
233198
|
const fileWriteStream = createWriteStream(filePath);
|
|
233199
233199
|
let fileLength = 0;
|
|
233200
233200
|
try {
|
|
@@ -233334,12 +233334,12 @@ var import_boom5, getTmpFilesDirectory = () => tmpdir8(), getImageProcessingLibr
|
|
|
233334
233334
|
logger7?.debug("fetched media stream");
|
|
233335
233335
|
const mediaKey = Crypto.randomBytes(32);
|
|
233336
233336
|
const { cipherKey, iv, macKey } = await getMediaKeys(mediaKey, mediaType);
|
|
233337
|
-
const encFilePath =
|
|
233337
|
+
const encFilePath = join137(getTmpFilesDirectory(), mediaType + generateMessageIDV2() + "-enc");
|
|
233338
233338
|
const encFileWriteStream = createWriteStream(encFilePath);
|
|
233339
233339
|
let originalFileStream;
|
|
233340
233340
|
let originalFilePath;
|
|
233341
233341
|
if (saveOriginalFileIfRequired) {
|
|
233342
|
-
originalFilePath =
|
|
233342
|
+
originalFilePath = join137(getTmpFilesDirectory(), mediaType + generateMessageIDV2() + "-original");
|
|
233343
233343
|
originalFileStream = createWriteStream(originalFilePath);
|
|
233344
233344
|
}
|
|
233345
233345
|
let fileLength = 0;
|
|
@@ -242744,7 +242744,7 @@ var init_auth_utils = __esm(() => {
|
|
|
242744
242744
|
|
|
242745
242745
|
// node_modules/.bun/@whiskeysockets+baileys@7.0.0-rc13+13d21a63c79191a3/node_modules/@whiskeysockets/baileys/lib/Utils/use-multi-file-auth-state.js
|
|
242746
242746
|
import { mkdir as mkdir11, readFile as readFile14, stat as stat8, unlink as unlink3, writeFile as writeFile4 } from "fs/promises";
|
|
242747
|
-
import { join as
|
|
242747
|
+
import { join as join138 } from "path";
|
|
242748
242748
|
var fileLocks, getFileLock = (path28) => {
|
|
242749
242749
|
let mutex = fileLocks.get(path28);
|
|
242750
242750
|
if (!mutex) {
|
|
@@ -242754,7 +242754,7 @@ var fileLocks, getFileLock = (path28) => {
|
|
|
242754
242754
|
return mutex;
|
|
242755
242755
|
}, useMultiFileAuthState = async (folder) => {
|
|
242756
242756
|
const writeData = async (data3, file2) => {
|
|
242757
|
-
const filePath =
|
|
242757
|
+
const filePath = join138(folder, fixFileName(file2));
|
|
242758
242758
|
const mutex = getFileLock(filePath);
|
|
242759
242759
|
return mutex.acquire().then(async (release2) => {
|
|
242760
242760
|
try {
|
|
@@ -242766,7 +242766,7 @@ var fileLocks, getFileLock = (path28) => {
|
|
|
242766
242766
|
};
|
|
242767
242767
|
const readData = async (file2) => {
|
|
242768
242768
|
try {
|
|
242769
|
-
const filePath =
|
|
242769
|
+
const filePath = join138(folder, fixFileName(file2));
|
|
242770
242770
|
const mutex = getFileLock(filePath);
|
|
242771
242771
|
return await mutex.acquire().then(async (release2) => {
|
|
242772
242772
|
try {
|
|
@@ -242782,7 +242782,7 @@ var fileLocks, getFileLock = (path28) => {
|
|
|
242782
242782
|
};
|
|
242783
242783
|
const removeData = async (file2) => {
|
|
242784
242784
|
try {
|
|
242785
|
-
const filePath =
|
|
242785
|
+
const filePath = join138(folder, fixFileName(file2));
|
|
242786
242786
|
const mutex = getFileLock(filePath);
|
|
242787
242787
|
return mutex.acquire().then(async (release2) => {
|
|
242788
242788
|
try {
|
|
@@ -263753,7 +263753,7 @@ var require_thread_stream = __commonJS((exports, module) => {
|
|
|
263753
263753
|
var { version: version2 } = require_package3();
|
|
263754
263754
|
var { EventEmitter: EventEmitter4 } = __require("events");
|
|
263755
263755
|
var { Worker } = __require("worker_threads");
|
|
263756
|
-
var { join:
|
|
263756
|
+
var { join: join139 } = __require("path");
|
|
263757
263757
|
var { pathToFileURL: pathToFileURL2 } = __require("url");
|
|
263758
263758
|
var { wait: wait2 } = require_wait2();
|
|
263759
263759
|
var {
|
|
@@ -263796,7 +263796,7 @@ var require_thread_stream = __commonJS((exports, module) => {
|
|
|
263796
263796
|
function createWorker(stream3, opts) {
|
|
263797
263797
|
const { filename, workerData } = opts;
|
|
263798
263798
|
const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {};
|
|
263799
|
-
const toExecute = bundlerOverrides["thread-stream-worker"] ||
|
|
263799
|
+
const toExecute = bundlerOverrides["thread-stream-worker"] || join139(__dirname, "lib", "worker.js");
|
|
263800
263800
|
const worker = new Worker(toExecute, {
|
|
263801
263801
|
...opts.workerOpts,
|
|
263802
263802
|
trackUnmanagedFds: false,
|
|
@@ -264197,7 +264197,7 @@ var require_transport = __commonJS((exports, module) => {
|
|
|
264197
264197
|
var __dirname = "/home/shiro/MaTrixOS/node_modules/.bun/pino@9.14.0/node_modules/pino/lib";
|
|
264198
264198
|
var { createRequire: createRequire4 } = __require("module");
|
|
264199
264199
|
var getCallers = require_caller();
|
|
264200
|
-
var { join:
|
|
264200
|
+
var { join: join139, isAbsolute: isAbsolute21, sep: sep3 } = __require("path");
|
|
264201
264201
|
var sleep3 = require_atomic_sleep();
|
|
264202
264202
|
var onExit = require_on_exit_leak_free();
|
|
264203
264203
|
var ThreadStream = require_thread_stream();
|
|
@@ -264260,7 +264260,7 @@ var require_transport = __commonJS((exports, module) => {
|
|
|
264260
264260
|
throw new Error("only one of target or targets can be specified");
|
|
264261
264261
|
}
|
|
264262
264262
|
if (targets) {
|
|
264263
|
-
target = bundlerOverrides["pino-worker"] ||
|
|
264263
|
+
target = bundlerOverrides["pino-worker"] || join139(__dirname, "worker.js");
|
|
264264
264264
|
options.targets = targets.filter((dest) => dest.target).map((dest) => {
|
|
264265
264265
|
return {
|
|
264266
264266
|
...dest,
|
|
@@ -264277,7 +264277,7 @@ var require_transport = __commonJS((exports, module) => {
|
|
|
264277
264277
|
});
|
|
264278
264278
|
});
|
|
264279
264279
|
} else if (pipeline3) {
|
|
264280
|
-
target = bundlerOverrides["pino-worker"] ||
|
|
264280
|
+
target = bundlerOverrides["pino-worker"] || join139(__dirname, "worker.js");
|
|
264281
264281
|
options.pipelines = [pipeline3.map((dest) => {
|
|
264282
264282
|
return {
|
|
264283
264283
|
...dest,
|
|
@@ -264299,7 +264299,7 @@ var require_transport = __commonJS((exports, module) => {
|
|
|
264299
264299
|
return origin;
|
|
264300
264300
|
}
|
|
264301
264301
|
if (origin === "pino/file") {
|
|
264302
|
-
return
|
|
264302
|
+
return join139(__dirname, "..", "file.js");
|
|
264303
264303
|
}
|
|
264304
264304
|
let fixTarget2;
|
|
264305
264305
|
for (const filePath of callers) {
|
|
@@ -265237,7 +265237,7 @@ var require_safe_stable_stringify = __commonJS((exports, module) => {
|
|
|
265237
265237
|
return circularValue;
|
|
265238
265238
|
}
|
|
265239
265239
|
let res = "";
|
|
265240
|
-
let
|
|
265240
|
+
let join139 = ",";
|
|
265241
265241
|
const originalIndentation = indentation;
|
|
265242
265242
|
if (Array.isArray(value)) {
|
|
265243
265243
|
if (value.length === 0) {
|
|
@@ -265251,7 +265251,7 @@ var require_safe_stable_stringify = __commonJS((exports, module) => {
|
|
|
265251
265251
|
indentation += spacer;
|
|
265252
265252
|
res += `
|
|
265253
265253
|
${indentation}`;
|
|
265254
|
-
|
|
265254
|
+
join139 = `,
|
|
265255
265255
|
${indentation}`;
|
|
265256
265256
|
}
|
|
265257
265257
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
@@ -265259,13 +265259,13 @@ ${indentation}`;
|
|
|
265259
265259
|
for (;i < maximumValuesToStringify - 1; i++) {
|
|
265260
265260
|
const tmp2 = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
|
|
265261
265261
|
res += tmp2 !== undefined ? tmp2 : "null";
|
|
265262
|
-
res +=
|
|
265262
|
+
res += join139;
|
|
265263
265263
|
}
|
|
265264
265264
|
const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
|
|
265265
265265
|
res += tmp !== undefined ? tmp : "null";
|
|
265266
265266
|
if (value.length - 1 > maximumBreadth) {
|
|
265267
265267
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
265268
|
-
res += `${
|
|
265268
|
+
res += `${join139}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
265269
265269
|
}
|
|
265270
265270
|
if (spacer !== "") {
|
|
265271
265271
|
res += `
|
|
@@ -265286,7 +265286,7 @@ ${originalIndentation}`;
|
|
|
265286
265286
|
let separator = "";
|
|
265287
265287
|
if (spacer !== "") {
|
|
265288
265288
|
indentation += spacer;
|
|
265289
|
-
|
|
265289
|
+
join139 = `,
|
|
265290
265290
|
${indentation}`;
|
|
265291
265291
|
whitespace = " ";
|
|
265292
265292
|
}
|
|
@@ -265300,13 +265300,13 @@ ${indentation}`;
|
|
|
265300
265300
|
const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
|
|
265301
265301
|
if (tmp !== undefined) {
|
|
265302
265302
|
res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
|
|
265303
|
-
separator =
|
|
265303
|
+
separator = join139;
|
|
265304
265304
|
}
|
|
265305
265305
|
}
|
|
265306
265306
|
if (keyLength > maximumBreadth) {
|
|
265307
265307
|
const removedKeys = keyLength - maximumBreadth;
|
|
265308
265308
|
res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
|
|
265309
|
-
separator =
|
|
265309
|
+
separator = join139;
|
|
265310
265310
|
}
|
|
265311
265311
|
if (spacer !== "" && separator.length > 1) {
|
|
265312
265312
|
res = `
|
|
@@ -265346,7 +265346,7 @@ ${originalIndentation}`;
|
|
|
265346
265346
|
}
|
|
265347
265347
|
const originalIndentation = indentation;
|
|
265348
265348
|
let res = "";
|
|
265349
|
-
let
|
|
265349
|
+
let join139 = ",";
|
|
265350
265350
|
if (Array.isArray(value)) {
|
|
265351
265351
|
if (value.length === 0) {
|
|
265352
265352
|
return "[]";
|
|
@@ -265359,7 +265359,7 @@ ${originalIndentation}`;
|
|
|
265359
265359
|
indentation += spacer;
|
|
265360
265360
|
res += `
|
|
265361
265361
|
${indentation}`;
|
|
265362
|
-
|
|
265362
|
+
join139 = `,
|
|
265363
265363
|
${indentation}`;
|
|
265364
265364
|
}
|
|
265365
265365
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
@@ -265367,13 +265367,13 @@ ${indentation}`;
|
|
|
265367
265367
|
for (;i < maximumValuesToStringify - 1; i++) {
|
|
265368
265368
|
const tmp2 = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
|
|
265369
265369
|
res += tmp2 !== undefined ? tmp2 : "null";
|
|
265370
|
-
res +=
|
|
265370
|
+
res += join139;
|
|
265371
265371
|
}
|
|
265372
265372
|
const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
|
|
265373
265373
|
res += tmp !== undefined ? tmp : "null";
|
|
265374
265374
|
if (value.length - 1 > maximumBreadth) {
|
|
265375
265375
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
265376
|
-
res += `${
|
|
265376
|
+
res += `${join139}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
265377
265377
|
}
|
|
265378
265378
|
if (spacer !== "") {
|
|
265379
265379
|
res += `
|
|
@@ -265386,7 +265386,7 @@ ${originalIndentation}`;
|
|
|
265386
265386
|
let whitespace = "";
|
|
265387
265387
|
if (spacer !== "") {
|
|
265388
265388
|
indentation += spacer;
|
|
265389
|
-
|
|
265389
|
+
join139 = `,
|
|
265390
265390
|
${indentation}`;
|
|
265391
265391
|
whitespace = " ";
|
|
265392
265392
|
}
|
|
@@ -265395,7 +265395,7 @@ ${indentation}`;
|
|
|
265395
265395
|
const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation);
|
|
265396
265396
|
if (tmp !== undefined) {
|
|
265397
265397
|
res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
|
|
265398
|
-
separator =
|
|
265398
|
+
separator = join139;
|
|
265399
265399
|
}
|
|
265400
265400
|
}
|
|
265401
265401
|
if (spacer !== "" && separator.length > 1) {
|
|
@@ -265452,20 +265452,20 @@ ${originalIndentation}`;
|
|
|
265452
265452
|
indentation += spacer;
|
|
265453
265453
|
let res2 = `
|
|
265454
265454
|
${indentation}`;
|
|
265455
|
-
const
|
|
265455
|
+
const join140 = `,
|
|
265456
265456
|
${indentation}`;
|
|
265457
265457
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
265458
265458
|
let i = 0;
|
|
265459
265459
|
for (;i < maximumValuesToStringify - 1; i++) {
|
|
265460
265460
|
const tmp2 = stringifyIndent(String(i), value[i], stack, spacer, indentation);
|
|
265461
265461
|
res2 += tmp2 !== undefined ? tmp2 : "null";
|
|
265462
|
-
res2 +=
|
|
265462
|
+
res2 += join140;
|
|
265463
265463
|
}
|
|
265464
265464
|
const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation);
|
|
265465
265465
|
res2 += tmp !== undefined ? tmp : "null";
|
|
265466
265466
|
if (value.length - 1 > maximumBreadth) {
|
|
265467
265467
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
265468
|
-
res2 += `${
|
|
265468
|
+
res2 += `${join140}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
265469
265469
|
}
|
|
265470
265470
|
res2 += `
|
|
265471
265471
|
${originalIndentation}`;
|
|
@@ -265481,16 +265481,16 @@ ${originalIndentation}`;
|
|
|
265481
265481
|
return '"[Object]"';
|
|
265482
265482
|
}
|
|
265483
265483
|
indentation += spacer;
|
|
265484
|
-
const
|
|
265484
|
+
const join139 = `,
|
|
265485
265485
|
${indentation}`;
|
|
265486
265486
|
let res = "";
|
|
265487
265487
|
let separator = "";
|
|
265488
265488
|
let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
|
|
265489
265489
|
if (isTypedArrayWithEntries(value)) {
|
|
265490
|
-
res += stringifyTypedArray(value,
|
|
265490
|
+
res += stringifyTypedArray(value, join139, maximumBreadth);
|
|
265491
265491
|
keys = keys.slice(value.length);
|
|
265492
265492
|
maximumPropertiesToStringify -= value.length;
|
|
265493
|
-
separator =
|
|
265493
|
+
separator = join139;
|
|
265494
265494
|
}
|
|
265495
265495
|
if (deterministic) {
|
|
265496
265496
|
keys = sort(keys, comparator);
|
|
@@ -265501,13 +265501,13 @@ ${indentation}`;
|
|
|
265501
265501
|
const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
|
|
265502
265502
|
if (tmp !== undefined) {
|
|
265503
265503
|
res += `${separator}${strEscape(key2)}: ${tmp}`;
|
|
265504
|
-
separator =
|
|
265504
|
+
separator = join139;
|
|
265505
265505
|
}
|
|
265506
265506
|
}
|
|
265507
265507
|
if (keyLength > maximumBreadth) {
|
|
265508
265508
|
const removedKeys = keyLength - maximumBreadth;
|
|
265509
265509
|
res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
|
|
265510
|
-
separator =
|
|
265510
|
+
separator = join139;
|
|
265511
265511
|
}
|
|
265512
265512
|
if (separator !== "") {
|
|
265513
265513
|
res = `
|
|
@@ -266157,7 +266157,7 @@ var init_Defaults = __esm(() => {
|
|
|
266157
266157
|
import { createHash as createHash13 } from "crypto";
|
|
266158
266158
|
import { createWriteStream as createWriteStream2, promises as fs28 } from "fs";
|
|
266159
266159
|
import { tmpdir as tmpdir9 } from "os";
|
|
266160
|
-
import { join as
|
|
266160
|
+
import { join as join139 } from "path";
|
|
266161
266161
|
async function uploadingNecessaryImagesOfProduct(product, waUploadToServer, timeoutMs = 30000) {
|
|
266162
266162
|
product = {
|
|
266163
266163
|
...product,
|
|
@@ -266335,7 +266335,7 @@ var import_boom12, parseCatalogNode = (node) => {
|
|
|
266335
266335
|
}
|
|
266336
266336
|
const { stream: stream3 } = await getStream(img);
|
|
266337
266337
|
const hasher = createHash13("sha256");
|
|
266338
|
-
const filePath =
|
|
266338
|
+
const filePath = join139(tmpdir9(), "img" + generateMessageIDV2());
|
|
266339
266339
|
const encFileWriteStream = createWriteStream2(filePath);
|
|
266340
266340
|
for await (const block2 of stream3) {
|
|
266341
266341
|
hasher.update(block2);
|
|
@@ -297183,18 +297183,18 @@ var init_merge = __esm(() => {
|
|
|
297183
297183
|
});
|
|
297184
297184
|
|
|
297185
297185
|
// packages/omo-config-core/src/loader/types.ts
|
|
297186
|
-
import { existsSync as
|
|
297186
|
+
import { existsSync as existsSync115, lstatSync as lstatSync5, readFileSync as readFileSync77 } from "fs";
|
|
297187
297187
|
var DEFAULT_READ_FILE_SYSTEM;
|
|
297188
297188
|
var init_types7 = __esm(() => {
|
|
297189
297189
|
DEFAULT_READ_FILE_SYSTEM = {
|
|
297190
|
-
existsSync:
|
|
297190
|
+
existsSync: existsSync115,
|
|
297191
297191
|
lstatSync: lstatSync5,
|
|
297192
297192
|
readFileSync: readFileSync77
|
|
297193
297193
|
};
|
|
297194
297194
|
});
|
|
297195
297195
|
|
|
297196
297196
|
// packages/omo-config-core/src/loader/paths.ts
|
|
297197
|
-
import { dirname as dirname45, isAbsolute as isAbsolute21, join as
|
|
297197
|
+
import { dirname as dirname45, isAbsolute as isAbsolute21, join as join140, relative as relative15, resolve as resolve42 } from "path";
|
|
297198
297198
|
function containsPath2(parent, child) {
|
|
297199
297199
|
const pathToChild = relative15(parent, child);
|
|
297200
297200
|
return pathToChild === "" || !pathToChild.startsWith("..") && !isAbsolute21(pathToChild);
|
|
@@ -297203,23 +297203,23 @@ function resolveHomeDir(env2 = process.env) {
|
|
|
297203
297203
|
return resolve42(env2.HOME ?? env2.USERPROFILE ?? process.cwd());
|
|
297204
297204
|
}
|
|
297205
297205
|
function resolveUserMatrixosConfigPath(env2 = process.env, platform4 = process.platform) {
|
|
297206
|
-
return
|
|
297206
|
+
return join140(resolveUserMatrixosConfigDirectory(env2, platform4), "omo.jsonc");
|
|
297207
297207
|
}
|
|
297208
297208
|
function resolveUserMatrixosConfigDirectory(env2 = process.env, platform4 = process.platform) {
|
|
297209
297209
|
if (platform4 === "win32" && env2.APPDATA !== undefined && env2.APPDATA.length > 0) {
|
|
297210
|
-
return
|
|
297210
|
+
return join140(env2.APPDATA, "omo");
|
|
297211
297211
|
}
|
|
297212
297212
|
if (env2.XDG_CONFIG_HOME !== undefined && env2.XDG_CONFIG_HOME.length > 0) {
|
|
297213
|
-
return
|
|
297213
|
+
return join140(env2.XDG_CONFIG_HOME, "omo");
|
|
297214
297214
|
}
|
|
297215
|
-
return
|
|
297215
|
+
return join140(resolveHomeDir(env2), ".config", "omo");
|
|
297216
297216
|
}
|
|
297217
297217
|
function detectUserOmoJsonPath(env2, platform4, fileSystem) {
|
|
297218
297218
|
const configDir = resolveUserMatrixosConfigDirectory(env2, platform4);
|
|
297219
|
-
const jsoncPath =
|
|
297219
|
+
const jsoncPath = join140(configDir, "omo.jsonc");
|
|
297220
297220
|
if (fileSystem.existsSync(jsoncPath))
|
|
297221
297221
|
return jsoncPath;
|
|
297222
|
-
const jsonPath =
|
|
297222
|
+
const jsonPath = join140(configDir, "omo.json");
|
|
297223
297223
|
return fileSystem.existsSync(jsonPath) ? jsonPath : jsoncPath;
|
|
297224
297224
|
}
|
|
297225
297225
|
function isSymlinkedProjectPath(path28, fileSystem) {
|
|
@@ -297237,13 +297237,13 @@ function isLoadableProjectConfigFile(path28, fileSystem) {
|
|
|
297237
297237
|
return fileSystem.existsSync(path28) && !isSymlinkedProjectPath(path28, fileSystem);
|
|
297238
297238
|
}
|
|
297239
297239
|
function detectOmoJsonPath(dir2, fileSystem) {
|
|
297240
|
-
const omoDir =
|
|
297240
|
+
const omoDir = join140(dir2, ".omo");
|
|
297241
297241
|
if (isSymlinkedProjectPath(omoDir, fileSystem))
|
|
297242
297242
|
return null;
|
|
297243
|
-
const jsoncPath =
|
|
297243
|
+
const jsoncPath = join140(omoDir, "omo.jsonc");
|
|
297244
297244
|
if (isLoadableProjectConfigFile(jsoncPath, fileSystem))
|
|
297245
297245
|
return jsoncPath;
|
|
297246
|
-
const jsonPath =
|
|
297246
|
+
const jsonPath = join140(omoDir, "omo.json");
|
|
297247
297247
|
return isLoadableProjectConfigFile(jsonPath, fileSystem) ? jsonPath : null;
|
|
297248
297248
|
}
|
|
297249
297249
|
function findProjectConfigPathsFarthestFirst(cwd, homeDir, fileSystem) {
|
|
@@ -297504,7 +297504,7 @@ var init_loader3 = __esm(() => {
|
|
|
297504
297504
|
// packages/omo-config-core/src/writer/types.ts
|
|
297505
297505
|
import {
|
|
297506
297506
|
copyFileSync as copyFileSync3,
|
|
297507
|
-
existsSync as
|
|
297507
|
+
existsSync as existsSync116,
|
|
297508
297508
|
lstatSync as lstatSync6,
|
|
297509
297509
|
mkdirSync as mkdirSync25,
|
|
297510
297510
|
readFileSync as readFileSync78,
|
|
@@ -297517,7 +297517,7 @@ var DEFAULT_WRITE_FILE_SYSTEM, MatrixosConfigWriteError;
|
|
|
297517
297517
|
var init_types8 = __esm(() => {
|
|
297518
297518
|
DEFAULT_WRITE_FILE_SYSTEM = {
|
|
297519
297519
|
copyFileSync: copyFileSync3,
|
|
297520
|
-
existsSync:
|
|
297520
|
+
existsSync: existsSync116,
|
|
297521
297521
|
lstatSync: lstatSync6,
|
|
297522
297522
|
mkdirSync: mkdirSync25,
|
|
297523
297523
|
readFileSync: readFileSync78,
|
|
@@ -297544,7 +297544,7 @@ var init_types8 = __esm(() => {
|
|
|
297544
297544
|
|
|
297545
297545
|
// packages/omo-config-core/src/writer/writer.ts
|
|
297546
297546
|
import { randomUUID as randomUUID13 } from "crypto";
|
|
297547
|
-
import { dirname as dirname46, join as
|
|
297547
|
+
import { dirname as dirname46, join as join141 } from "path";
|
|
297548
297548
|
function backupSuffix() {
|
|
297549
297549
|
return new Date().toISOString().replace(/[:.]/g, "-");
|
|
297550
297550
|
}
|
|
@@ -297575,13 +297575,13 @@ function resolveWritePath(options) {
|
|
|
297575
297575
|
const jsoncPath2 = resolveUserMatrixosConfigPath(options.env, options.platform ?? process.platform);
|
|
297576
297576
|
if (fileSystem.existsSync(jsoncPath2))
|
|
297577
297577
|
return jsoncPath2;
|
|
297578
|
-
const jsonPath2 =
|
|
297578
|
+
const jsonPath2 = join141(dirname46(jsoncPath2), "omo.json");
|
|
297579
297579
|
return fileSystem.existsSync(jsonPath2) ? jsonPath2 : jsoncPath2;
|
|
297580
297580
|
}
|
|
297581
|
-
const jsoncPath =
|
|
297581
|
+
const jsoncPath = join141(options.projectDir ?? process.cwd(), ".omo", "omo.jsonc");
|
|
297582
297582
|
if (fileSystem.existsSync(jsoncPath))
|
|
297583
297583
|
return jsoncPath;
|
|
297584
|
-
const jsonPath =
|
|
297584
|
+
const jsonPath = join141(dirname46(jsoncPath), "omo.json");
|
|
297585
297585
|
return fileSystem.existsSync(jsonPath) ? jsonPath : jsoncPath;
|
|
297586
297586
|
}
|
|
297587
297587
|
function writeAtomically(path28, content, fileSystem) {
|
|
@@ -297693,8 +297693,8 @@ var init_writer2 = __esm(() => {
|
|
|
297693
297693
|
});
|
|
297694
297694
|
|
|
297695
297695
|
// packages/omo-config-core/src/generator/mini-os-generator.ts
|
|
297696
|
-
import { existsSync as
|
|
297697
|
-
import { dirname as dirname47, join as
|
|
297696
|
+
import { existsSync as existsSync117, mkdirSync as mkdirSync26, writeFileSync as writeFileSync26 } from "fs";
|
|
297697
|
+
import { dirname as dirname47, join as join142 } from "path";
|
|
297698
297698
|
function generateMiniOS(options) {
|
|
297699
297699
|
const fs29 = options.fs ?? defaultFS;
|
|
297700
297700
|
const profile3 = options.profile;
|
|
@@ -297705,29 +297705,29 @@ function generateMiniOS(options) {
|
|
|
297705
297705
|
if (!fs29.existsSync(targetDir)) {
|
|
297706
297706
|
fs29.mkdirSync(targetDir, { recursive: true });
|
|
297707
297707
|
}
|
|
297708
|
-
const pkgPath =
|
|
297708
|
+
const pkgPath = join142(targetDir, "package.json");
|
|
297709
297709
|
writeIfMissing(fs29, pkgPath, TPL_PACKAGE_JSON(packageName, displayName, profile3.version, profile3.description, profile3.extends, profile3.baseAgent));
|
|
297710
297710
|
filesWritten.push(pkgPath);
|
|
297711
|
-
const srcDir =
|
|
297711
|
+
const srcDir = join142(targetDir, "src");
|
|
297712
297712
|
fs29.mkdirSync(srcDir, { recursive: true });
|
|
297713
|
-
const indexPath =
|
|
297713
|
+
const indexPath = join142(srcDir, "index.ts");
|
|
297714
297714
|
writeIfMissing(fs29, indexPath, TPL_INDEX_TS(profile3.name, displayName, profile3.description));
|
|
297715
297715
|
filesWritten.push(indexPath);
|
|
297716
|
-
const binDir =
|
|
297716
|
+
const binDir = join142(targetDir, "bin");
|
|
297717
297717
|
fs29.mkdirSync(binDir, { recursive: true });
|
|
297718
|
-
const binPath =
|
|
297718
|
+
const binPath = join142(binDir, "matrixos-mini.js");
|
|
297719
297719
|
writeIfMissing(fs29, binPath, TPL_BIN);
|
|
297720
297720
|
filesWritten.push(binPath);
|
|
297721
|
-
const scriptDir =
|
|
297721
|
+
const scriptDir = join142(targetDir, "script");
|
|
297722
297722
|
fs29.mkdirSync(scriptDir, { recursive: true });
|
|
297723
|
-
const buildPath =
|
|
297723
|
+
const buildPath = join142(scriptDir, "build.ts");
|
|
297724
297724
|
writeIfMissing(fs29, buildPath, TPL_BUILD_TS);
|
|
297725
297725
|
filesWritten.push(buildPath);
|
|
297726
297726
|
if (Object.keys(profile3.agents).length > 0) {
|
|
297727
|
-
const agentsDir =
|
|
297727
|
+
const agentsDir = join142(targetDir, "agents");
|
|
297728
297728
|
fs29.mkdirSync(agentsDir, { recursive: true });
|
|
297729
297729
|
for (const [agentName, agentDef] of Object.entries(profile3.agents)) {
|
|
297730
|
-
const agentFile =
|
|
297730
|
+
const agentFile = join142(agentsDir, `${agentName}.ts`);
|
|
297731
297731
|
const description2 = agentDef.description ?? `Custom ${displayName} agent: ${agentName}`;
|
|
297732
297732
|
writeIfMissing(fs29, agentFile, `// ${description2}
|
|
297733
297733
|
// Generated by MaTrixOS Mini-OS Profile Generator.
|
|
@@ -297738,10 +297738,10 @@ export const description = ${JSON.stringify(description2)}
|
|
|
297738
297738
|
}
|
|
297739
297739
|
}
|
|
297740
297740
|
if (profile3.skills.length > 0) {
|
|
297741
|
-
const skillsDir =
|
|
297741
|
+
const skillsDir = join142(targetDir, "skills");
|
|
297742
297742
|
fs29.mkdirSync(skillsDir, { recursive: true });
|
|
297743
297743
|
for (const skill2 of profile3.skills) {
|
|
297744
|
-
const skillFile =
|
|
297744
|
+
const skillFile = join142(skillsDir, `${skill2}.md`);
|
|
297745
297745
|
writeIfMissing(fs29, skillFile, `# ${skill2}
|
|
297746
297746
|
|
|
297747
297747
|
_Skill required by the ${displayName} profile. Implementation goes here._
|
|
@@ -297749,12 +297749,12 @@ _Skill required by the ${displayName} profile. Implementation goes here._
|
|
|
297749
297749
|
filesWritten.push(skillFile);
|
|
297750
297750
|
}
|
|
297751
297751
|
}
|
|
297752
|
-
const readmePath =
|
|
297752
|
+
const readmePath = join142(targetDir, "README.md");
|
|
297753
297753
|
const agentsList = Object.keys(profile3.agents);
|
|
297754
297754
|
const skillsList = profile3.skills;
|
|
297755
297755
|
writeIfMissing(fs29, readmePath, TPL_README(packageName, displayName, profile3.description, profile3.version, profile3.baseAgent, profile3.extends, agentsList, skillsList));
|
|
297756
297756
|
filesWritten.push(readmePath);
|
|
297757
|
-
const agentsMdPath =
|
|
297757
|
+
const agentsMdPath = join142(targetDir, "AGENTS.md");
|
|
297758
297758
|
writeIfMissing(fs29, agentsMdPath, TPL_AGENT_MD(displayName, profile3.description));
|
|
297759
297759
|
filesWritten.push(agentsMdPath);
|
|
297760
297760
|
return { packageName, packageDir: targetDir, filesWritten };
|
|
@@ -297906,7 +297906,7 @@ This profile is activated when the user mentions the profile name in their reque
|
|
|
297906
297906
|
- Profiles can be composed: multiple profiles in \`profiles: [...]\` are merged in order.
|
|
297907
297907
|
`;
|
|
297908
297908
|
var init_mini_os_generator = __esm(() => {
|
|
297909
|
-
defaultFS = { existsSync:
|
|
297909
|
+
defaultFS = { existsSync: existsSync117, mkdirSync: mkdirSync26, writeFileSync: writeFileSync26 };
|
|
297910
297910
|
});
|
|
297911
297911
|
|
|
297912
297912
|
// packages/omo-config-core/src/generator/index.ts
|
|
@@ -367932,7 +367932,7 @@ function getCachedVersion(options = {}) {
|
|
|
367932
367932
|
// package.json
|
|
367933
367933
|
var package_default = {
|
|
367934
367934
|
name: "@kl-c/matrixos",
|
|
367935
|
-
version: "0.1.
|
|
367935
|
+
version: "0.1.13",
|
|
367936
367936
|
description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
|
|
367937
367937
|
main: "./dist/index.js",
|
|
367938
367938
|
types: "dist/index.d.ts",
|
|
@@ -438536,9 +438536,23 @@ function createChatHeadersHandler(args) {
|
|
|
438536
438536
|
};
|
|
438537
438537
|
}
|
|
438538
438538
|
|
|
438539
|
-
// packages/omo-opencode/src/plugin/
|
|
438540
|
-
import { join as join133 } from "path";
|
|
438539
|
+
// packages/omo-opencode/src/plugin/auto-adoption.ts
|
|
438541
438540
|
import { existsSync as existsSync111 } from "fs";
|
|
438541
|
+
import { join as join133 } from "path";
|
|
438542
|
+
import { homedir as homedir35 } from "os";
|
|
438543
|
+
var ADOPTION_CONTEXT_RELATIVE = join133("MOS_Vault", "04-Areas", "user-context.md");
|
|
438544
|
+
function resolveUserContextPath() {
|
|
438545
|
+
const base = process.env.MOS_VAULT_DIR ?? join133(homedir35(), "MOS_Vault");
|
|
438546
|
+
return join133(base, "04-Areas", "user-context.md");
|
|
438547
|
+
}
|
|
438548
|
+
function isAdoptionNeeded() {
|
|
438549
|
+
return !existsSync111(resolveUserContextPath());
|
|
438550
|
+
}
|
|
438551
|
+
var ADOPTION_TRIGGER_INSTRUCTION = `SYST\xC8ME \u2014 Rituel d'adoption automatique : aucun contexte utilisateur (user-context.md) n'est configur\xE9. Lance imm\xE9diatement le rituel d'adoption comme si l'utilisateur avait tap\xE9 /adopt : pose les 5 questions (identit\xE9, projet, contraintes, style de collaboration, reporting), puis propose les fonctionnalit\xE9s opt-in (\u5C24\u5176 Dashboard Mission Control sur 127.0.0.1:9123). Utilise l'outil question pour les questions. Ne r\xE9ponds pas encore \xE0 la demande de l'utilisateur \u2014 l'adoption prime.`;
|
|
438552
|
+
|
|
438553
|
+
// packages/omo-opencode/src/plugin/ultrawork-db-model-override.ts
|
|
438554
|
+
import { join as join134 } from "path";
|
|
438555
|
+
import { existsSync as existsSync112 } from "fs";
|
|
438542
438556
|
async function importBunSqlite() {
|
|
438543
438557
|
if (typeof globalThis.Bun === "undefined") {
|
|
438544
438558
|
return null;
|
|
@@ -438554,7 +438568,7 @@ async function importBunSqlite() {
|
|
|
438554
438568
|
}
|
|
438555
438569
|
}
|
|
438556
438570
|
function getDbPath() {
|
|
438557
|
-
return
|
|
438571
|
+
return join134(getDataDir(), "opencode", "opencode.db");
|
|
438558
438572
|
}
|
|
438559
438573
|
var MAX_MICROTASK_RETRIES = 10;
|
|
438560
438574
|
function logCaughtDbError(message, metadata, error) {
|
|
@@ -438657,7 +438671,7 @@ async function scheduleDeferredModelOverride(messageId, targetModel, variant) {
|
|
|
438657
438671
|
return;
|
|
438658
438672
|
}
|
|
438659
438673
|
const dbPath = getDbPath();
|
|
438660
|
-
if (!
|
|
438674
|
+
if (!existsSync112(dbPath)) {
|
|
438661
438675
|
log2("[ultrawork-db-override] DB not found, skipping deferred override");
|
|
438662
438676
|
return;
|
|
438663
438677
|
}
|
|
@@ -439136,6 +439150,12 @@ function createChatMessageHandler3(args) {
|
|
|
439136
439150
|
const isFirstMessage = firstMessageVariantGate.shouldOverride(input.sessionID);
|
|
439137
439151
|
if (isFirstMessage) {
|
|
439138
439152
|
firstMessageVariantGate.markApplied(input.sessionID);
|
|
439153
|
+
if (isAdoptionNeeded()) {
|
|
439154
|
+
output.parts.push({ type: "text", text: ADOPTION_TRIGGER_INSTRUCTION });
|
|
439155
|
+
log2("[chat-message] Auto-adoption triggered \u2014 no user-context.md found", {
|
|
439156
|
+
sessionID: input.sessionID
|
|
439157
|
+
});
|
|
439158
|
+
}
|
|
439139
439159
|
}
|
|
439140
439160
|
const storedMainSessionModel = getStoredMainSessionModel(input, pluginConfig, isFirstMessage);
|
|
439141
439161
|
if (storedMainSessionModel) {
|
|
@@ -441430,12 +441450,12 @@ function createAgentAntiLoopHooks(config) {
|
|
|
441430
441450
|
}
|
|
441431
441451
|
|
|
441432
441452
|
// packages/omo-opencode/src/features/anti-loop/logger.ts
|
|
441433
|
-
import { existsSync as
|
|
441434
|
-
import { join as
|
|
441453
|
+
import { existsSync as existsSync113, mkdirSync as mkdirSync24, appendFileSync as appendFileSync8 } from "fs";
|
|
441454
|
+
import { join as join135 } from "path";
|
|
441435
441455
|
function createAntiLoopLogger(logsDir) {
|
|
441436
|
-
const logFile =
|
|
441437
|
-
const parentDir =
|
|
441438
|
-
if (!
|
|
441456
|
+
const logFile = join135(logsDir, "anti-loop.jsonl");
|
|
441457
|
+
const parentDir = join135(logsDir, "..");
|
|
441458
|
+
if (!existsSync113(logsDir)) {
|
|
441439
441459
|
mkdirSync24(logsDir, { recursive: true });
|
|
441440
441460
|
}
|
|
441441
441461
|
return {
|
|
@@ -441459,10 +441479,10 @@ function getRunningTasks() {
|
|
|
441459
441479
|
}
|
|
441460
441480
|
|
|
441461
441481
|
// packages/omo-opencode/src/plugin/agent-anti-loop.ts
|
|
441462
|
-
import { join as
|
|
441482
|
+
import { join as join136 } from "path";
|
|
441463
441483
|
function createAgentAntiLoopWiring(config, deps) {
|
|
441464
441484
|
const hooks = createAgentAntiLoopHooks(config);
|
|
441465
|
-
const logDir = deps.projectDir ?
|
|
441485
|
+
const logDir = deps.projectDir ? join136(deps.projectDir, ".matrixos", "logs") : process.cwd();
|
|
441466
441486
|
const antiLoopLog = createAntiLoopLogger(logDir);
|
|
441467
441487
|
return {
|
|
441468
441488
|
toolExecuteAfter(input) {
|
|
@@ -441955,7 +441975,7 @@ function createRealProcessInfoProvider() {
|
|
|
441955
441975
|
|
|
441956
441976
|
// packages/omo-opencode/src/plugin-config/layered-config-loader.ts
|
|
441957
441977
|
import * as fs30 from "fs";
|
|
441958
|
-
import { homedir as
|
|
441978
|
+
import { homedir as homedir36 } from "os";
|
|
441959
441979
|
import * as path28 from "path";
|
|
441960
441980
|
|
|
441961
441981
|
// packages/omo-opencode/src/config/schema/agent-names.ts
|
|
@@ -443875,7 +443895,7 @@ function loadConfigFromPath2(configPath, _ctx) {
|
|
|
443875
443895
|
|
|
443876
443896
|
// packages/omo-opencode/src/plugin-config/layered-config-loader.ts
|
|
443877
443897
|
function resolveHomeDirectory() {
|
|
443878
|
-
return process.env.HOME ?? process.env.USERPROFILE ??
|
|
443898
|
+
return process.env.HOME ?? process.env.USERPROFILE ?? homedir36();
|
|
443879
443899
|
}
|
|
443880
443900
|
function resolveConfigPathAfterLegacyMigration(detectedPath) {
|
|
443881
443901
|
if (!path28.basename(detectedPath).startsWith(LEGACY_CONFIG_BASENAME)) {
|
|
@@ -444340,22 +444360,22 @@ init_plugin_identity();
|
|
|
444340
444360
|
// packages/telemetry-core/src/activity-state.ts
|
|
444341
444361
|
init_atomic_write();
|
|
444342
444362
|
init_xdg_data_dir();
|
|
444343
|
-
import { existsSync as
|
|
444344
|
-
import { basename as basename26, join as
|
|
444363
|
+
import { existsSync as existsSync120, mkdirSync as mkdirSync27, readFileSync as readFileSync80 } from "fs";
|
|
444364
|
+
import { basename as basename26, join as join144 } from "path";
|
|
444345
444365
|
var POSTHOG_ACTIVITY_STATE_FILE = "posthog-activity.json";
|
|
444346
444366
|
function resolveTelemetryStateDir(product, options = {}) {
|
|
444347
444367
|
const dataDir = resolveXdgDataDir(product.cacheDirName, {
|
|
444348
444368
|
env: options.env,
|
|
444349
444369
|
osProvider: options.osProvider
|
|
444350
444370
|
});
|
|
444351
|
-
const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined :
|
|
444371
|
+
const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join144(options.env.XDG_DATA_HOME, product.cacheDirName);
|
|
444352
444372
|
if (dataDir === xdgStateDir || xdgStateDir === undefined && basename26(dataDir) === product.cacheDirName) {
|
|
444353
444373
|
return dataDir;
|
|
444354
444374
|
}
|
|
444355
|
-
return
|
|
444375
|
+
return join144(dataDir, product.cacheDirName);
|
|
444356
444376
|
}
|
|
444357
444377
|
function getTelemetryActivityStateFilePath(stateDir) {
|
|
444358
|
-
return
|
|
444378
|
+
return join144(stateDir, POSTHOG_ACTIVITY_STATE_FILE);
|
|
444359
444379
|
}
|
|
444360
444380
|
function getDailyActiveCaptureState(input2) {
|
|
444361
444381
|
const state3 = readPostHogActivityState(input2.stateDir, input2.diagnostics);
|
|
@@ -444380,7 +444400,7 @@ function isPostHogActivityState(value) {
|
|
|
444380
444400
|
}
|
|
444381
444401
|
function readPostHogActivityState(stateDir, diagnostics) {
|
|
444382
444402
|
const stateFilePath = getTelemetryActivityStateFilePath(stateDir);
|
|
444383
|
-
if (!
|
|
444403
|
+
if (!existsSync120(stateFilePath)) {
|
|
444384
444404
|
return {};
|
|
444385
444405
|
}
|
|
444386
444406
|
try {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** True when adoption context is missing (no user-context.md yet). */
|
|
2
|
+
export declare function isAdoptionNeeded(): boolean;
|
|
3
|
+
export declare const ADOPTION_TRIGGER_INSTRUCTION = "SYST\u00C8ME \u2014 Rituel d'adoption automatique : aucun contexte utilisateur (user-context.md) n'est configur\u00E9. Lance imm\u00E9diatement le rituel d'adoption comme si l'utilisateur avait tap\u00E9 /adopt : pose les 5 questions (identit\u00E9, projet, contraintes, style de collaboration, reporting), puis propose les fonctionnalit\u00E9s opt-in (\u5C24\u5176 Dashboard Mission Control sur 127.0.0.1:9123). Utilise l'outil question pour les questions. Ne r\u00E9ponds pas encore \u00E0 la demande de l'utilisateur \u2014 l'adoption prime.";
|
package/package.json
CHANGED