@agimon-ai/doompi-profile 0.0.1-alpha.53 → 0.0.1-alpha.54
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/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/api-contracts.cjs +7 -0
- package/dist/api-contracts.d.cts +2 -0
- package/dist/api-contracts.d.mts +2 -0
- package/dist/api-contracts.mjs +2 -0
- package/dist/extensions/persona.cjs +13 -0
- package/dist/extensions/persona.cjs.map +1 -0
- package/dist/extensions/persona.d.cts +6 -0
- package/dist/extensions/persona.d.cts.map +1 -0
- package/dist/extensions/persona.d.mts +6 -0
- package/dist/extensions/persona.d.mts.map +1 -0
- package/dist/extensions/persona.mjs +9 -0
- package/dist/extensions/persona.mjs.map +1 -0
- package/dist/extensions/pi.cjs +35 -0
- package/dist/extensions/pi.cjs.map +1 -0
- package/dist/extensions/pi.d.cts +7 -0
- package/dist/extensions/pi.d.cts.map +1 -0
- package/dist/extensions/pi.d.mts +7 -0
- package/dist/extensions/pi.d.mts.map +1 -0
- package/dist/extensions/pi.mjs +30 -0
- package/dist/extensions/pi.mjs.map +1 -0
- package/dist/extensions/server.cjs +36 -0
- package/dist/extensions/server.cjs.map +1 -0
- package/dist/extensions/server.d.cts +5 -0
- package/dist/extensions/server.d.cts.map +1 -0
- package/dist/extensions/server.d.mts +5 -0
- package/dist/extensions/server.d.mts.map +1 -0
- package/dist/extensions/server.mjs +31 -0
- package/dist/extensions/server.mjs.map +1 -0
- package/dist/extensions/web.mjs +25 -0
- package/dist/extensions/web.mjs.map +1 -0
- package/dist/index.cjs +12 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +4 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/identityEntry.cjs +31 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/identityEntry.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/identityEntry.mjs +31 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/identityEntry.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/profileCommand.cjs +141 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/profileCommand.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/profileCommand.mjs +141 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/profileCommand.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/profileRuntime.cjs +76 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/profileRuntime.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/profileRuntime.mjs +76 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/profileRuntime.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/profileServer.cjs +59 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/profileServer.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/profileServer.mjs +57 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/profileServer.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/voiceTool.cjs +89 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/voiceTool.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/voiceTool.mjs +89 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/_lib/voiceTool.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/profile.cli.cjs +6 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/profile.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/profile.cli.mjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/profile.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/profile.server.cjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/profile.server.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/profile.server.mjs +8 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/command/profile.server.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.cjs +6 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.mjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server.cjs +7 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server.mjs +8 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.cli.cjs +12 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.cli.mjs +13 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.cli.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.server.cjs +12 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.server.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.server.mjs +12 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.server.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server.cjs +11 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server.mjs +12 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server.mjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.cjs +19 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.cjs.map +1 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.mjs +20 -0
- package/dist/src/extensions/workspaces/sessions/(backend)/root.cli.mjs.map +1 -0
- package/dist/src/schemas/apiContracts.cjs +13 -0
- package/dist/src/schemas/apiContracts.cjs.map +1 -0
- package/dist/src/schemas/apiContracts.d.cts +53 -0
- package/dist/src/schemas/apiContracts.d.cts.map +1 -0
- package/dist/src/schemas/apiContracts.d.mts +53 -0
- package/dist/src/schemas/apiContracts.d.mts.map +1 -0
- package/dist/src/schemas/apiContracts.mjs +13 -0
- package/dist/src/schemas/apiContracts.mjs.map +1 -0
- package/dist/src/schemas/profileVoiceTools.cjs +45 -0
- package/dist/src/schemas/profileVoiceTools.cjs.map +1 -0
- package/dist/src/schemas/profileVoiceTools.mjs +43 -0
- package/dist/src/schemas/profileVoiceTools.mjs.map +1 -0
- package/dist/src/services/logSinkTelemetry/index.cjs +25 -0
- package/dist/src/services/logSinkTelemetry/index.cjs.map +1 -0
- package/dist/src/services/logSinkTelemetry/index.d.cts +13 -0
- package/dist/src/services/logSinkTelemetry/index.d.cts.map +1 -0
- package/dist/src/services/logSinkTelemetry/index.d.mts +13 -0
- package/dist/src/services/logSinkTelemetry/index.d.mts.map +1 -0
- package/dist/src/services/logSinkTelemetry/index.mjs +25 -0
- package/dist/src/services/logSinkTelemetry/index.mjs.map +1 -0
- package/dist/src/services/personaExtension/runtime.cjs +55 -0
- package/dist/src/services/personaExtension/runtime.cjs.map +1 -0
- package/dist/src/services/personaExtension/runtime.mjs +52 -0
- package/dist/src/services/personaExtension/runtime.mjs.map +1 -0
- package/dist/src/services/profileText/index.cjs +73 -0
- package/dist/src/services/profileText/index.cjs.map +1 -0
- package/dist/src/services/profileText/index.d.cts +19 -0
- package/dist/src/services/profileText/index.d.cts.map +1 -0
- package/dist/src/services/profileText/index.d.mts +19 -0
- package/dist/src/services/profileText/index.d.mts.map +1 -0
- package/dist/src/services/profileText/index.mjs +63 -0
- package/dist/src/services/profileText/index.mjs.map +1 -0
- package/dist/src/types/telemetry.cjs +11 -0
- package/dist/src/types/telemetry.cjs.map +1 -0
- package/dist/src/types/telemetry.d.cts +15 -0
- package/dist/src/types/telemetry.d.cts.map +1 -0
- package/dist/src/types/telemetry.d.mts +15 -0
- package/dist/src/types/telemetry.d.mts.map +1 -0
- package/dist/src/types/telemetry.mjs +11 -0
- package/dist/src/types/telemetry.mjs.map +1 -0
- package/package.json +11 -11
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.__toESM = __toESM;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_apiContracts = require("./src/schemas/apiContracts.cjs");
|
|
6
|
+
exports.apiContracts = require_apiContracts.apiContracts;
|
|
7
|
+
exports.default = require_apiContracts.apiContracts;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_index = require("../src/services/logSinkTelemetry/index.cjs");
|
|
6
|
+
const require_runtime = require("../src/services/personaExtension/runtime.cjs");
|
|
7
|
+
//#region src/services/personaExtension/index.ts
|
|
8
|
+
const personaExtension = (0, require("@agimon-ai/doompi-core/pi-extension").definePiExtension)("@agimon-ai/doompi-profile/persona", ({ options }) => require_runtime.createPersonaRuntime(options ?? require_index.createProfileTelemetry()));
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.default = personaExtension;
|
|
11
|
+
exports.personaExtension = personaExtension;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=persona.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persona.cjs","names":["definePiExtension","createPersonaRuntime","createProfileTelemetry"],"sources":["../../src/services/personaExtension/index.ts"],"sourcesContent":["import { definePiExtension } from '@agimon-ai/doompi-core/pi-extension';\n\nimport type { ProfileTelemetry } from '../../types/telemetry';\nimport { createProfileTelemetry } from '../logSinkTelemetry';\nimport { createPersonaRuntime } from './runtime';\nexport const personaExtension = definePiExtension<ProfileTelemetry>(\n '@agimon-ai/doompi-profile/persona',\n ({ options }) => createPersonaRuntime(options ?? createProfileTelemetry()),\n);\nexport default personaExtension;\n"],"mappings":";;;;;;;AAKA,MAAa,oBAAA,gDAAmBA,CAAAA,CAAAA,kBAAAA,CAC9B,sCACC,EAAE,cAAcC,gBAAAA,qBAAqB,WAAWC,cAAAA,uBAAuB,CAAC,CAC3E"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ProfileTelemetry } from "../src/types/telemetry.cjs";
|
|
2
|
+
//#region src/services/personaExtension/index.d.ts
|
|
3
|
+
export declare const personaExtension: import("@agimon-ai/doompi-core/runtime-pi-extension").DefinedPiExtension<ProfileTelemetry>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { personaExtension as default };
|
|
6
|
+
//# sourceMappingURL=persona.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persona.d.cts","names":[],"sources":["../../src/services/personaExtension/index.ts"],"mappings":";;qBAKa,wEAAgB,mBAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ProfileTelemetry } from "../src/types/telemetry.mjs";
|
|
2
|
+
//#region src/services/personaExtension/index.d.ts
|
|
3
|
+
export declare const personaExtension: import("@agimon-ai/doompi-core/runtime-pi-extension").DefinedPiExtension<ProfileTelemetry>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { personaExtension as default };
|
|
6
|
+
//# sourceMappingURL=persona.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persona.d.mts","names":[],"sources":["../../src/services/personaExtension/index.ts"],"mappings":";;qBAKa,wEAAgB,mBAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createProfileTelemetry } from "../src/services/logSinkTelemetry/index.mjs";
|
|
2
|
+
import { createPersonaRuntime } from "../src/services/personaExtension/runtime.mjs";
|
|
3
|
+
import { definePiExtension } from "@agimon-ai/doompi-core/pi-extension";
|
|
4
|
+
//#region src/services/personaExtension/index.ts
|
|
5
|
+
const personaExtension = definePiExtension("@agimon-ai/doompi-profile/persona", ({ options }) => createPersonaRuntime(options ?? createProfileTelemetry()));
|
|
6
|
+
//#endregion
|
|
7
|
+
export { personaExtension as default, personaExtension };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=persona.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persona.mjs","names":[],"sources":["../../src/services/personaExtension/index.ts"],"sourcesContent":["import { definePiExtension } from '@agimon-ai/doompi-core/pi-extension';\n\nimport type { ProfileTelemetry } from '../../types/telemetry';\nimport { createProfileTelemetry } from '../logSinkTelemetry';\nimport { createPersonaRuntime } from './runtime';\nexport const personaExtension = definePiExtension<ProfileTelemetry>(\n '@agimon-ai/doompi-profile/persona',\n ({ options }) => createPersonaRuntime(options ?? createProfileTelemetry()),\n);\nexport default personaExtension;\n"],"mappings":";;;;AAKA,MAAa,mBAAmB,kBAC9B,sCACC,EAAE,cAAc,qBAAqB,WAAW,uBAAuB,CAAC,CAC3E"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_root_cli = require("../src/extensions/workspaces/sessions/(backend)/root.cli.cjs");
|
|
6
|
+
const require_profile_cli = require("../src/extensions/workspaces/sessions/(backend)/command/profile.cli.cjs");
|
|
7
|
+
const require_sessionStart_cli = require("../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.cjs");
|
|
8
|
+
const require_doompiAuthorProfile_cli = require("../src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.cli.cjs");
|
|
9
|
+
let _agimon_ai_doompi_core_pi_extension = require("@agimon-ai/doompi-core/pi-extension");
|
|
10
|
+
let _agimon_ai_doompi_core_extension_file = require("@agimon-ai/doompi-core/extension-file");
|
|
11
|
+
//#region generated/pi.ts
|
|
12
|
+
const at = (value, context) => typeof value === "function" ? value(context) : value;
|
|
13
|
+
const extension = (0, _agimon_ai_doompi_core_pi_extension.definePiExtension)("@agimon-ai/doompi-profile", async (context) => {
|
|
14
|
+
const scopeSession = await require_root_cli.default(context);
|
|
15
|
+
const contextSession = {
|
|
16
|
+
...context,
|
|
17
|
+
root: scopeSession.value
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
...(0, _agimon_ai_doompi_core_extension_file.composeRootHooks)(scopeSession),
|
|
21
|
+
get commands() {
|
|
22
|
+
return [at(require_profile_cli.default, contextSession)];
|
|
23
|
+
},
|
|
24
|
+
events: { session_start: at(require_sessionStart_cli.default, contextSession) },
|
|
25
|
+
get resources() {
|
|
26
|
+
return [at(require_doompiAuthorProfile_cli.default, contextSession)];
|
|
27
|
+
},
|
|
28
|
+
services: [...scopeSession.services ?? []]
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
//#endregion
|
|
32
|
+
exports.default = extension;
|
|
33
|
+
exports.extension = extension;
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=pi.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pi.cjs","names":["definePiExtension","rootSession","composeRootHooks","commandProfile","hookSessionStart","resourceDoompiAuthorProfile"],"sources":["../../generated/pi.ts"],"sourcesContent":["// Generated by @agimon-ai/doompi-build. Do not edit by hand.\nimport { definePiExtension, type PiPluginContext, type PiPluginContributions } from '@agimon-ai/doompi-core/pi-extension';\nimport { composeRootHooks } from '@agimon-ai/doompi-core/extension-file';\n\nimport rootSession from '../src/extensions/workspaces/sessions/(backend)/root.cli';\nimport commandProfile from '../src/extensions/workspaces/sessions/(backend)/command/profile.cli';\nimport hookSessionStart from '../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli';\nimport resourceDoompiAuthorProfile from '../src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.cli';\n\ntype OptionsOf<T> = T extends (context: PiPluginContext<infer Options>) => unknown ? Options : never;\ntype InferredOptions = Exclude<OptionsOf<typeof rootSession> | OptionsOf<typeof commandProfile> | OptionsOf<typeof hookSessionStart> | OptionsOf<typeof resourceDoompiAuthorProfile>, undefined>;\ntype Intersect<Union> =\n (Union extends unknown ? (value: Union) => void : never) extends (value: infer Value) => void ? Value : never;\ntype ExtensionOptions = [InferredOptions] extends [never] ? undefined : Intersect<InferredOptions>;\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\n\nexport const extension = definePiExtension<ExtensionOptions>('@agimon-ai/doompi-profile', async (context) => {\n const scopeSession = await rootSession(context);\n const contextSession = { ...context, root: scopeSession.value };\n return {\n ...composeRootHooks(scopeSession),\n get commands(): PiPluginContributions['commands'] { return [at(commandProfile, contextSession)]; },\n events: {\n session_start: at(hookSessionStart, contextSession) as NonNullable<PiPluginContributions['events']>['session_start'],\n },\n get resources(): PiPluginContributions['resources'] { return [at(resourceDoompiAuthorProfile, contextSession)]; },\n services: [...(scopeSession.services ?? [])],\n };\n});\n\nexport default extension;\n"],"mappings":";;;;;;;;;;;AAgBA,MAAM,MAAY,OAA0B,YAC1C,OAAO,UAAU,aAAc,MAAwB,OAAO,IAAI;AAEpE,MAAa,aAAA,GAAYA,oCAAAA,kBAAAA,CAAoC,6BAA6B,OAAO,YAAY;CAC3G,MAAM,eAAe,MAAMC,iBAAAA,QAAY,OAAO;CAC9C,MAAM,iBAAiB;EAAE,GAAG;EAAS,MAAM,aAAa;CAAM;CAC9D,OAAO;EACL,IAAA,GAAGC,sCAAAA,iBAAAA,CAAiB,YAAY;EAChC,IAAI,WAA8C;GAAE,OAAO,CAAC,GAAGC,oBAAAA,SAAgB,cAAc,CAAC;EAAG;EACjG,QAAQ,EACN,eAAe,GAAGC,yBAAAA,SAAkB,cAAc,EACpD;EACA,IAAI,YAAgD;GAAE,OAAO,CAAC,GAAGC,gCAAAA,SAA6B,cAAc,CAAC;EAAG;EAChH,UAAU,CAAC,GAAI,aAAa,YAAY,CAAC,CAAE;CAC7C;AACF,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ProfileTelemetry } from "../src/types/telemetry.cjs";
|
|
2
|
+
import "../index.cjs";
|
|
3
|
+
//#region generated/pi.d.ts
|
|
4
|
+
export declare const extension: import("@agimon-ai/doompi-core/runtime-pi-extension").DefinedPiExtension<ProfileTelemetry>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { extension as default };
|
|
7
|
+
//# sourceMappingURL=pi.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pi.d.cts","names":[],"sources":["../../generated/pi.ts"],"mappings":";;;qBAmBa,iEAAS,mBAAT"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ProfileTelemetry } from "../src/types/telemetry.mjs";
|
|
2
|
+
import "../index.mjs";
|
|
3
|
+
//#region generated/pi.d.ts
|
|
4
|
+
export declare const extension: import("@agimon-ai/doompi-core/runtime-pi-extension").DefinedPiExtension<ProfileTelemetry>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { extension as default };
|
|
7
|
+
//# sourceMappingURL=pi.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pi.d.mts","names":[],"sources":["../../generated/pi.ts"],"mappings":";;;qBAmBa,iEAAS,mBAAT"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import root_cli_default from "../src/extensions/workspaces/sessions/(backend)/root.cli.mjs";
|
|
2
|
+
import profile_cli_default from "../src/extensions/workspaces/sessions/(backend)/command/profile.cli.mjs";
|
|
3
|
+
import sessionStart_cli_default from "../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli.mjs";
|
|
4
|
+
import doompiAuthorProfile_cli_default from "../src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.cli.mjs";
|
|
5
|
+
import { definePiExtension } from "@agimon-ai/doompi-core/pi-extension";
|
|
6
|
+
import { composeRootHooks } from "@agimon-ai/doompi-core/extension-file";
|
|
7
|
+
//#region generated/pi.ts
|
|
8
|
+
const at = (value, context) => typeof value === "function" ? value(context) : value;
|
|
9
|
+
const extension = definePiExtension("@agimon-ai/doompi-profile", async (context) => {
|
|
10
|
+
const scopeSession = await root_cli_default(context);
|
|
11
|
+
const contextSession = {
|
|
12
|
+
...context,
|
|
13
|
+
root: scopeSession.value
|
|
14
|
+
};
|
|
15
|
+
return {
|
|
16
|
+
...composeRootHooks(scopeSession),
|
|
17
|
+
get commands() {
|
|
18
|
+
return [at(profile_cli_default, contextSession)];
|
|
19
|
+
},
|
|
20
|
+
events: { session_start: at(sessionStart_cli_default, contextSession) },
|
|
21
|
+
get resources() {
|
|
22
|
+
return [at(doompiAuthorProfile_cli_default, contextSession)];
|
|
23
|
+
},
|
|
24
|
+
services: [...scopeSession.services ?? []]
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
//#endregion
|
|
28
|
+
export { extension as default, extension };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=pi.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pi.mjs","names":["rootSession","commandProfile","hookSessionStart","resourceDoompiAuthorProfile"],"sources":["../../generated/pi.ts"],"sourcesContent":["// Generated by @agimon-ai/doompi-build. Do not edit by hand.\nimport { definePiExtension, type PiPluginContext, type PiPluginContributions } from '@agimon-ai/doompi-core/pi-extension';\nimport { composeRootHooks } from '@agimon-ai/doompi-core/extension-file';\n\nimport rootSession from '../src/extensions/workspaces/sessions/(backend)/root.cli';\nimport commandProfile from '../src/extensions/workspaces/sessions/(backend)/command/profile.cli';\nimport hookSessionStart from '../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.cli';\nimport resourceDoompiAuthorProfile from '../src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.cli';\n\ntype OptionsOf<T> = T extends (context: PiPluginContext<infer Options>) => unknown ? Options : never;\ntype InferredOptions = Exclude<OptionsOf<typeof rootSession> | OptionsOf<typeof commandProfile> | OptionsOf<typeof hookSessionStart> | OptionsOf<typeof resourceDoompiAuthorProfile>, undefined>;\ntype Intersect<Union> =\n (Union extends unknown ? (value: Union) => void : never) extends (value: infer Value) => void ? Value : never;\ntype ExtensionOptions = [InferredOptions] extends [never] ? undefined : Intersect<InferredOptions>;\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\n\nexport const extension = definePiExtension<ExtensionOptions>('@agimon-ai/doompi-profile', async (context) => {\n const scopeSession = await rootSession(context);\n const contextSession = { ...context, root: scopeSession.value };\n return {\n ...composeRootHooks(scopeSession),\n get commands(): PiPluginContributions['commands'] { return [at(commandProfile, contextSession)]; },\n events: {\n session_start: at(hookSessionStart, contextSession) as NonNullable<PiPluginContributions['events']>['session_start'],\n },\n get resources(): PiPluginContributions['resources'] { return [at(resourceDoompiAuthorProfile, contextSession)]; },\n services: [...(scopeSession.services ?? [])],\n };\n});\n\nexport default extension;\n"],"mappings":";;;;;;;AAgBA,MAAM,MAAY,OAA0B,YAC1C,OAAO,UAAU,aAAc,MAAwB,OAAO,IAAI;AAEpE,MAAa,YAAY,kBAAoC,6BAA6B,OAAO,YAAY;CAC3G,MAAM,eAAe,MAAMA,iBAAY,OAAO;CAC9C,MAAM,iBAAiB;EAAE,GAAG;EAAS,MAAM,aAAa;CAAM;CAC9D,OAAO;EACL,GAAG,iBAAiB,YAAY;EAChC,IAAI,WAA8C;GAAE,OAAO,CAAC,GAAGC,qBAAgB,cAAc,CAAC;EAAG;EACjG,QAAQ,EACN,eAAe,GAAGC,0BAAkB,cAAc,EACpD;EACA,IAAI,YAAgD;GAAE,OAAO,CAAC,GAAGC,iCAA6B,cAAc,CAAC;EAAG;EAChH,UAAU,CAAC,GAAI,aAAa,YAAY,CAAC,CAAE;CAC7C;AACF,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_profile_server = require("../src/extensions/workspaces/sessions/(backend)/command/profile.server.cjs");
|
|
6
|
+
const require_sessionStart_server = require("../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server.cjs");
|
|
7
|
+
const require_doompiAuthorProfile_server = require("../src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.server.cjs");
|
|
8
|
+
const require_profileConfig_server = require("../src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server.cjs");
|
|
9
|
+
let _agimon_ai_doompi_core_server_facet = require("@agimon-ai/doompi-core/server-facet");
|
|
10
|
+
//#region generated/server.ts
|
|
11
|
+
const at = (value, context) => typeof value === "function" ? value(context) : value;
|
|
12
|
+
/* v8 ignore next -- generated normalization branch */
|
|
13
|
+
const defined = (values) => values.filter((value) => value !== void 0);
|
|
14
|
+
const via = (identity, value) => ({
|
|
15
|
+
...identity,
|
|
16
|
+
...value
|
|
17
|
+
});
|
|
18
|
+
const facet = (0, _agimon_ai_doompi_core_server_facet.defineServerPlugin)({
|
|
19
|
+
name: "@agimon-ai/doompi-profile",
|
|
20
|
+
session: (context) => ({
|
|
21
|
+
get commands() {
|
|
22
|
+
return defined([via({ name: "profile" }, at(require_profile_server.default, context))]);
|
|
23
|
+
},
|
|
24
|
+
get hooks() {
|
|
25
|
+
return [via({ event: "session_start" }, at(require_sessionStart_server.default, context))];
|
|
26
|
+
},
|
|
27
|
+
get resources() {
|
|
28
|
+
return [at(require_doompiAuthorProfile_server.default, context), at(require_profileConfig_server.default, context)];
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
//#endregion
|
|
33
|
+
exports.default = facet;
|
|
34
|
+
exports.facet = facet;
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=server.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.cjs","names":["defineServerPlugin","commandProfile","hookSessionStart","resourceDoompiAuthorProfile","resourceProfileConfig"],"sources":["../../generated/server.ts"],"sourcesContent":["// Generated by @agimon-ai/doompi-build. Do not edit by hand.\nimport { defineServerPlugin, type DoomServerSessionPlugin } from '@agimon-ai/doompi-core/server-facet';\n\nimport commandProfile from '../src/extensions/workspaces/sessions/(backend)/command/profile.server';\nimport hookSessionStart from '../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server';\nimport resourceDoompiAuthorProfile from '../src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.server';\nimport resourceProfileConfig from '../src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server';\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\n/* v8 ignore next -- generated normalization branch */\nconst defined = <T>(values: readonly (T | undefined)[]): T[] =>\n values.filter((value): value is T => value !== undefined);\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T => ({ ...identity, ...(value as object) }) as T;\n\nexport const facet = defineServerPlugin({\n name: '@agimon-ai/doompi-profile',\n session: (context) => ({\n get commands(): DoomServerSessionPlugin['commands'] { return defined([via({ name: 'profile' }, at(commandProfile, context))]); },\n get hooks(): DoomServerSessionPlugin['hooks'] { return [via({ event: 'session_start' }, at(hookSessionStart, context))]; },\n get resources(): DoomServerSessionPlugin['resources'] { return [at(resourceDoompiAuthorProfile, context), at(resourceProfileConfig, context)]; },\n }),\n});\n\nexport default facet;\n"],"mappings":";;;;;;;;;;AASA,MAAM,MAAY,OAA0B,YAC1C,OAAO,UAAU,aAAc,MAAwB,OAAO,IAAI;;AAEpE,MAAM,WAAc,WAClB,OAAO,QAAQ,UAAsB,UAAU,KAAA,CAAS;AAC1D,MAAM,OAAU,UAAmC,WAAuB;CAAE,GAAG;CAAU,GAAI;AAAiB;AAE9G,MAAa,SAAA,GAAQA,oCAAAA,mBAAAA,CAAmB;CACtC,MAAM;CACN,UAAU,aAAa;EACrB,IAAI,WAAgD;GAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,MAAM,UAAU,GAAG,GAAGC,uBAAAA,SAAgB,OAAO,CAAC,CAAC,CAAC;EAAG;EAC/H,IAAI,QAA0C;GAAE,OAAO,CAAC,IAAI,EAAE,OAAO,gBAAgB,GAAG,GAAGC,4BAAAA,SAAkB,OAAO,CAAC,CAAC;EAAG;EACzH,IAAI,YAAkD;GAAE,OAAO,CAAC,GAAGC,mCAAAA,SAA6B,OAAO,GAAG,GAAGC,6BAAAA,SAAuB,OAAO,CAAC;EAAG;CACjJ;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.cts","names":[],"sources":["../../generated/server.ts"],"mappings":";qBAgBa,qDAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.mts","names":[],"sources":["../../generated/server.ts"],"mappings":";qBAgBa,qDAAK"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import profile_server_default from "../src/extensions/workspaces/sessions/(backend)/command/profile.server.mjs";
|
|
2
|
+
import sessionStart_server_default from "../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server.mjs";
|
|
3
|
+
import doompiAuthorProfile_server_default from "../src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.server.mjs";
|
|
4
|
+
import profileConfig_server_default from "../src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server.mjs";
|
|
5
|
+
import { defineServerPlugin } from "@agimon-ai/doompi-core/server-facet";
|
|
6
|
+
//#region generated/server.ts
|
|
7
|
+
const at = (value, context) => typeof value === "function" ? value(context) : value;
|
|
8
|
+
/* v8 ignore next -- generated normalization branch */
|
|
9
|
+
const defined = (values) => values.filter((value) => value !== void 0);
|
|
10
|
+
const via = (identity, value) => ({
|
|
11
|
+
...identity,
|
|
12
|
+
...value
|
|
13
|
+
});
|
|
14
|
+
const facet = defineServerPlugin({
|
|
15
|
+
name: "@agimon-ai/doompi-profile",
|
|
16
|
+
session: (context) => ({
|
|
17
|
+
get commands() {
|
|
18
|
+
return defined([via({ name: "profile" }, at(profile_server_default, context))]);
|
|
19
|
+
},
|
|
20
|
+
get hooks() {
|
|
21
|
+
return [via({ event: "session_start" }, at(sessionStart_server_default, context))];
|
|
22
|
+
},
|
|
23
|
+
get resources() {
|
|
24
|
+
return [at(doompiAuthorProfile_server_default, context), at(profileConfig_server_default, context)];
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { facet as default, facet };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=server.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.mjs","names":["commandProfile","hookSessionStart","resourceDoompiAuthorProfile","resourceProfileConfig"],"sources":["../../generated/server.ts"],"sourcesContent":["// Generated by @agimon-ai/doompi-build. Do not edit by hand.\nimport { defineServerPlugin, type DoomServerSessionPlugin } from '@agimon-ai/doompi-core/server-facet';\n\nimport commandProfile from '../src/extensions/workspaces/sessions/(backend)/command/profile.server';\nimport hookSessionStart from '../src/extensions/workspaces/sessions/(backend)/hook/sessionStart.server';\nimport resourceDoompiAuthorProfile from '../src/extensions/workspaces/sessions/(backend)/resource/doompiAuthorProfile.server';\nimport resourceProfileConfig from '../src/extensions/workspaces/sessions/(backend)/resource/profileConfig.server';\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\n/* v8 ignore next -- generated normalization branch */\nconst defined = <T>(values: readonly (T | undefined)[]): T[] =>\n values.filter((value): value is T => value !== undefined);\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T => ({ ...identity, ...(value as object) }) as T;\n\nexport const facet = defineServerPlugin({\n name: '@agimon-ai/doompi-profile',\n session: (context) => ({\n get commands(): DoomServerSessionPlugin['commands'] { return defined([via({ name: 'profile' }, at(commandProfile, context))]); },\n get hooks(): DoomServerSessionPlugin['hooks'] { return [via({ event: 'session_start' }, at(hookSessionStart, context))]; },\n get resources(): DoomServerSessionPlugin['resources'] { return [at(resourceDoompiAuthorProfile, context), at(resourceProfileConfig, context)]; },\n }),\n});\n\nexport default facet;\n"],"mappings":";;;;;;AASA,MAAM,MAAY,OAA0B,YAC1C,OAAO,UAAU,aAAc,MAAwB,OAAO,IAAI;;AAEpE,MAAM,WAAc,WAClB,OAAO,QAAQ,UAAsB,UAAU,KAAA,CAAS;AAC1D,MAAM,OAAU,UAAmC,WAAuB;CAAE,GAAG;CAAU,GAAI;AAAiB;AAE9G,MAAa,QAAQ,mBAAmB;CACtC,MAAM;CACN,UAAU,aAAa;EACrB,IAAI,WAAgD;GAAE,OAAO,QAAQ,CAAC,IAAI,EAAE,MAAM,UAAU,GAAG,GAAGA,wBAAgB,OAAO,CAAC,CAAC,CAAC;EAAG;EAC/H,IAAI,QAA0C;GAAE,OAAO,CAAC,IAAI,EAAE,OAAO,gBAAgB,GAAG,GAAGC,6BAAkB,OAAO,CAAC,CAAC;EAAG;EACzH,IAAI,YAAkD;GAAE,OAAO,CAAC,GAAGC,oCAA6B,OAAO,GAAG,GAAGC,8BAAuB,OAAO,CAAC;EAAG;CACjJ;AACF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineSelectionAxis, defineWebPlugin } from "@agimon-ai/doompi-core/web";
|
|
2
|
+
//#region src/extensions/workspaces/sessions/(frontend)/selection-axis/profile.web.ts
|
|
3
|
+
var profile_web_default = defineSelectionAxis({
|
|
4
|
+
name: "profile",
|
|
5
|
+
command: "profile",
|
|
6
|
+
statusKey: "doom-profile",
|
|
7
|
+
emptyLabel: "no profile",
|
|
8
|
+
order: 10
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region generated/web.ts
|
|
12
|
+
const via = (identity, value) => ({
|
|
13
|
+
...identity,
|
|
14
|
+
...value
|
|
15
|
+
});
|
|
16
|
+
const webPlugin = defineWebPlugin({
|
|
17
|
+
id: "profile",
|
|
18
|
+
session: { get selectionAxes() {
|
|
19
|
+
return [via({ name: "profile" }, profile_web_default)];
|
|
20
|
+
} }
|
|
21
|
+
});
|
|
22
|
+
//#endregion
|
|
23
|
+
export { webPlugin };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=web.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.mjs","names":["selectionAxisProfile"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/selection-axis/profile.web.ts","../../generated/web.ts"],"sourcesContent":["import { defineSelectionAxis } from '@agimon-ai/doompi-core/web';\nexport default defineSelectionAxis({\n name: 'profile',\n command: 'profile',\n statusKey: 'doom-profile',\n emptyLabel: 'no profile',\n order: 10,\n});\n","// Generated by @agimon-ai/doompi-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/doompi-core/web';\n\nimport selectionAxisProfile from '../src/extensions/workspaces/sessions/(frontend)/selection-axis/profile.web';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T => ({ ...identity, ...(value as object) }) as T;\n\nexport const webPlugin = defineWebPlugin({\n id: 'profile',\n session: {\n get selectionAxes(): WebPluginContributions['selectionAxes'] { return [via({ name: 'profile' }, selectionAxisProfile)]; },\n },\n});\n"],"mappings":";;AACA,IAAA,sBAAe,oBAAoB;CACjC,MAAM;CACN,SAAS;CACT,WAAW;CACX,YAAY;CACZ,OAAO;AACT,CAAC;;;ACFD,MAAM,OAAU,UAAmC,WAAuB;CAAE,GAAG;CAAU,GAAI;AAAiB;AAE9G,MAAa,YAAY,gBAAgB;CACvC,IAAI;CACJ,SAAS,EACP,IAAI,gBAAyD;EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,UAAU,GAAGA,mBAAoB,CAAC;CAAG,EAC1H;AACF,CAAC"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_index = require("./src/services/logSinkTelemetry/index.cjs");
|
|
3
|
+
const require_index$1 = require("./src/services/profileText/index.cjs");
|
|
4
|
+
const require_telemetry = require("./src/types/telemetry.cjs");
|
|
5
|
+
exports.PROFILE_EVENT = require_telemetry.PROFILE_EVENT;
|
|
6
|
+
exports.PROFILE_STATUS_KEY = require_index$1.PROFILE_STATUS_KEY;
|
|
7
|
+
exports.createProfileTelemetry = require_index.createProfileTelemetry;
|
|
8
|
+
exports.profileDescription = require_index$1.profileDescription;
|
|
9
|
+
exports.profileItems = require_index$1.profileItems;
|
|
10
|
+
exports.profileStatus = require_index$1.profileStatus;
|
|
11
|
+
exports.profileSummary = require_index$1.profileSummary;
|
|
12
|
+
exports.profileTitle = require_index$1.profileTitle;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PROFILE_EVENT, ProfileEventAttributes, ProfileEventName, ProfileTelemetry } from "./src/types/telemetry.cjs";
|
|
2
|
+
import { ProfileTelemetryOptions, createProfileTelemetry } from "./src/services/logSinkTelemetry/index.cjs";
|
|
3
|
+
import { PROFILE_STATUS_KEY, profileDescription, profileItems, profileStatus, profileSummary, profileTitle } from "./src/services/profileText/index.cjs";
|
|
4
|
+
export { PROFILE_EVENT, PROFILE_STATUS_KEY, type ProfileEventAttributes, type ProfileEventName, type ProfileTelemetry, type ProfileTelemetryOptions, createProfileTelemetry, profileDescription, profileItems, profileStatus, profileSummary, profileTitle };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PROFILE_EVENT, ProfileEventAttributes, ProfileEventName, ProfileTelemetry } from "./src/types/telemetry.mjs";
|
|
2
|
+
import { ProfileTelemetryOptions, createProfileTelemetry } from "./src/services/logSinkTelemetry/index.mjs";
|
|
3
|
+
import { PROFILE_STATUS_KEY, profileDescription, profileItems, profileStatus, profileSummary, profileTitle } from "./src/services/profileText/index.mjs";
|
|
4
|
+
export { PROFILE_EVENT, PROFILE_STATUS_KEY, type ProfileEventAttributes, type ProfileEventName, type ProfileTelemetry, type ProfileTelemetryOptions, createProfileTelemetry, profileDescription, profileItems, profileStatus, profileSummary, profileTitle };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createProfileTelemetry } from "./src/services/logSinkTelemetry/index.mjs";
|
|
2
|
+
import { PROFILE_STATUS_KEY, profileDescription, profileItems, profileStatus, profileSummary, profileTitle } from "./src/services/profileText/index.mjs";
|
|
3
|
+
import { PROFILE_EVENT } from "./src/types/telemetry.mjs";
|
|
4
|
+
export { PROFILE_EVENT, PROFILE_STATUS_KEY, createProfileTelemetry, profileDescription, profileItems, profileStatus, profileSummary, profileTitle };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
let _agimon_ai_doompi_core_profile_identity = require("@agimon-ai/doompi-core/profile-identity");
|
|
2
|
+
//#region src/extensions/workspaces/sessions/(backend)/_lib/identityEntry.ts
|
|
3
|
+
/**
|
|
4
|
+
* Journals the persona the session is speaking as.
|
|
5
|
+
*
|
|
6
|
+
* A profile switch reloads the session, so each activation publishes once on
|
|
7
|
+
* session start and the entries accumulate in journal order. That order is the
|
|
8
|
+
* whole mechanism: a cockpit folding the journal forward attributes every
|
|
9
|
+
* assistant message to the identity most recently published before it, which is
|
|
10
|
+
* how a message keeps the persona it was written under after a switch.
|
|
11
|
+
*
|
|
12
|
+
* For that to hold, the entry must not be treated as a projection. A projection
|
|
13
|
+
* keeps only the latest record and replays that one, which would repaint the
|
|
14
|
+
* entire transcript as the current persona.
|
|
15
|
+
*/
|
|
16
|
+
function publishProfileIdentity(pi, profile, identity, published) {
|
|
17
|
+
if (!profile) return published;
|
|
18
|
+
const projection = {
|
|
19
|
+
profile,
|
|
20
|
+
...identity?.name === void 0 ? {} : { name: identity.name },
|
|
21
|
+
...identity?.icon === void 0 ? {} : { icon: identity.icon }
|
|
22
|
+
};
|
|
23
|
+
const serialized = JSON.stringify(projection);
|
|
24
|
+
if (serialized === published) return published;
|
|
25
|
+
pi.appendEntry(_agimon_ai_doompi_core_profile_identity.DOOM_PROFILE_IDENTITY_ENTRY_TYPE, projection);
|
|
26
|
+
return serialized;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
exports.publishProfileIdentity = publishProfileIdentity;
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=identityEntry.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identityEntry.cjs","names":["DOOM_PROFILE_IDENTITY_ENTRY_TYPE"],"sources":["../../../../../../../src/extensions/workspaces/sessions/(backend)/_lib/identityEntry.ts"],"sourcesContent":["import type { PersonaIdentity } from '@agimon-ai/doompi-config/profiles';\nimport {\n DOOM_PROFILE_IDENTITY_ENTRY_TYPE,\n type ProfileIdentityProjection,\n} from '@agimon-ai/doompi-core/profile-identity';\nimport type { ExtensionAPI } from '@earendil-works/pi-coding-agent';\n\n/**\n * Journals the persona the session is speaking as.\n *\n * A profile switch reloads the session, so each activation publishes once on\n * session start and the entries accumulate in journal order. That order is the\n * whole mechanism: a cockpit folding the journal forward attributes every\n * assistant message to the identity most recently published before it, which is\n * how a message keeps the persona it was written under after a switch.\n *\n * For that to hold, the entry must not be treated as a projection. A projection\n * keeps only the latest record and replays that one, which would repaint the\n * entire transcript as the current persona.\n */\nexport function publishProfileIdentity(\n pi: Pick<ExtensionAPI, 'appendEntry'>,\n profile: string | undefined,\n identity: PersonaIdentity | undefined,\n published: string | undefined,\n): string | undefined {\n if (!profile) return published;\n\n const projection: ProfileIdentityProjection = {\n profile,\n ...(identity?.name === undefined ? {} : { name: identity.name }),\n ...(identity?.icon === undefined ? {} : { icon: identity.icon }),\n };\n const serialized = JSON.stringify(projection);\n // Reload republishes on every session start. Re-announcing an identity the\n // transcript already carries would add a seam where nothing changed.\n if (serialized === published) return published;\n pi.appendEntry(DOOM_PROFILE_IDENTITY_ENTRY_TYPE, projection);\n return serialized;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAoBA,SAAgB,uBACd,IACA,SACA,UACA,WACoB;CACpB,IAAI,CAAC,SAAS,OAAO;CAErB,MAAM,aAAwC;EAC5C;EACA,GAAI,UAAU,SAAS,KAAA,IAAY,CAAC,IAAI,EAAE,MAAM,SAAS,KAAK;EAC9D,GAAI,UAAU,SAAS,KAAA,IAAY,CAAC,IAAI,EAAE,MAAM,SAAS,KAAK;CAChE;CACA,MAAM,aAAa,KAAK,UAAU,UAAU;CAG5C,IAAI,eAAe,WAAW,OAAO;CACrC,GAAG,YAAYA,wCAAAA,kCAAkC,UAAU;CAC3D,OAAO;AACT"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DOOM_PROFILE_IDENTITY_ENTRY_TYPE } from "@agimon-ai/doompi-core/profile-identity";
|
|
2
|
+
//#region src/extensions/workspaces/sessions/(backend)/_lib/identityEntry.ts
|
|
3
|
+
/**
|
|
4
|
+
* Journals the persona the session is speaking as.
|
|
5
|
+
*
|
|
6
|
+
* A profile switch reloads the session, so each activation publishes once on
|
|
7
|
+
* session start and the entries accumulate in journal order. That order is the
|
|
8
|
+
* whole mechanism: a cockpit folding the journal forward attributes every
|
|
9
|
+
* assistant message to the identity most recently published before it, which is
|
|
10
|
+
* how a message keeps the persona it was written under after a switch.
|
|
11
|
+
*
|
|
12
|
+
* For that to hold, the entry must not be treated as a projection. A projection
|
|
13
|
+
* keeps only the latest record and replays that one, which would repaint the
|
|
14
|
+
* entire transcript as the current persona.
|
|
15
|
+
*/
|
|
16
|
+
function publishProfileIdentity(pi, profile, identity, published) {
|
|
17
|
+
if (!profile) return published;
|
|
18
|
+
const projection = {
|
|
19
|
+
profile,
|
|
20
|
+
...identity?.name === void 0 ? {} : { name: identity.name },
|
|
21
|
+
...identity?.icon === void 0 ? {} : { icon: identity.icon }
|
|
22
|
+
};
|
|
23
|
+
const serialized = JSON.stringify(projection);
|
|
24
|
+
if (serialized === published) return published;
|
|
25
|
+
pi.appendEntry(DOOM_PROFILE_IDENTITY_ENTRY_TYPE, projection);
|
|
26
|
+
return serialized;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { publishProfileIdentity };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=identityEntry.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identityEntry.mjs","names":[],"sources":["../../../../../../../src/extensions/workspaces/sessions/(backend)/_lib/identityEntry.ts"],"sourcesContent":["import type { PersonaIdentity } from '@agimon-ai/doompi-config/profiles';\nimport {\n DOOM_PROFILE_IDENTITY_ENTRY_TYPE,\n type ProfileIdentityProjection,\n} from '@agimon-ai/doompi-core/profile-identity';\nimport type { ExtensionAPI } from '@earendil-works/pi-coding-agent';\n\n/**\n * Journals the persona the session is speaking as.\n *\n * A profile switch reloads the session, so each activation publishes once on\n * session start and the entries accumulate in journal order. That order is the\n * whole mechanism: a cockpit folding the journal forward attributes every\n * assistant message to the identity most recently published before it, which is\n * how a message keeps the persona it was written under after a switch.\n *\n * For that to hold, the entry must not be treated as a projection. A projection\n * keeps only the latest record and replays that one, which would repaint the\n * entire transcript as the current persona.\n */\nexport function publishProfileIdentity(\n pi: Pick<ExtensionAPI, 'appendEntry'>,\n profile: string | undefined,\n identity: PersonaIdentity | undefined,\n published: string | undefined,\n): string | undefined {\n if (!profile) return published;\n\n const projection: ProfileIdentityProjection = {\n profile,\n ...(identity?.name === undefined ? {} : { name: identity.name }),\n ...(identity?.icon === undefined ? {} : { icon: identity.icon }),\n };\n const serialized = JSON.stringify(projection);\n // Reload republishes on every session start. Re-announcing an identity the\n // transcript already carries would add a seam where nothing changed.\n if (serialized === published) return published;\n pi.appendEntry(DOOM_PROFILE_IDENTITY_ENTRY_TYPE, projection);\n return serialized;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAoBA,SAAgB,uBACd,IACA,SACA,UACA,WACoB;CACpB,IAAI,CAAC,SAAS,OAAO;CAErB,MAAM,aAAwC;EAC5C;EACA,GAAI,UAAU,SAAS,KAAA,IAAY,CAAC,IAAI,EAAE,MAAM,SAAS,KAAK;EAC9D,GAAI,UAAU,SAAS,KAAA,IAAY,CAAC,IAAI,EAAE,MAAM,SAAS,KAAK;CAChE;CACA,MAAM,aAAa,KAAK,UAAU,UAAU;CAG5C,IAAI,eAAe,WAAW,OAAO;CACrC,GAAG,YAAY,kCAAkC,UAAU;CAC3D,OAAO;AACT"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
const require_index = require("../../../../../services/profileText/index.cjs");
|
|
2
|
+
const require_telemetry = require("../../../../../types/telemetry.cjs");
|
|
3
|
+
let _agimon_ai_doompi_config_piContext = require("@agimon-ai/doompi-config/piContext");
|
|
4
|
+
let _agimon_ai_doompi_core_transition = require("@agimon-ai/doompi-core/transition");
|
|
5
|
+
let _agimon_ai_doompi_core_voice_tools = require("@agimon-ai/doompi-core/voice-tools");
|
|
6
|
+
let _agimon_ai_doompi_minor_mode = require("@agimon-ai/doompi-minor-mode");
|
|
7
|
+
let _agimon_ai_doompi_minor_mode_reload_handoff = require("@agimon-ai/doompi-minor-mode/reload-handoff");
|
|
8
|
+
//#region src/extensions/workspaces/sessions/(backend)/_lib/profileCommand.ts
|
|
9
|
+
const WARNING = "warning";
|
|
10
|
+
const INFO = "info";
|
|
11
|
+
const PROFILE_CONFIG_PATH = ".doom/profiles.yaml";
|
|
12
|
+
/**
|
|
13
|
+
* The picker and everything behind it load on first use.
|
|
14
|
+
*
|
|
15
|
+
* Every session registers this command, but almost none of them run it, so the
|
|
16
|
+
* profile catalogue, the TUI component and the switch stay off the startup path.
|
|
17
|
+
*/
|
|
18
|
+
function lazyModules() {
|
|
19
|
+
let harnessStore;
|
|
20
|
+
let journal;
|
|
21
|
+
let picker;
|
|
22
|
+
let profiles;
|
|
23
|
+
let selection;
|
|
24
|
+
return {
|
|
25
|
+
harnessStore: () => harnessStore ??= import("@agimon-ai/doompi-config/harnessStore"),
|
|
26
|
+
journal: () => journal ??= import("@agimon-ai/doompi-config/piContext"),
|
|
27
|
+
picker: () => picker ??= import("@agimon-ai/doompi-ui/matrix-picker"),
|
|
28
|
+
profiles: () => profiles ??= import("@agimon-ai/doompi-config/profiles"),
|
|
29
|
+
selection: () => selection ??= import("@agimon-ai/doompi-config/selectionSwitch")
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
async function pickProfile(ctx, profiles, current, loadPicker) {
|
|
33
|
+
const title = require_index.profileTitle(current);
|
|
34
|
+
if (ctx.mode !== "tui") return ctx.ui.select(title, profiles.map((profile) => profile.name));
|
|
35
|
+
const { MatrixPickerComponent } = await loadPicker();
|
|
36
|
+
return (await ctx.ui.custom((_tui, theme, keybindings, done) => new MatrixPickerComponent({
|
|
37
|
+
title,
|
|
38
|
+
items: require_index.profileItems(profiles),
|
|
39
|
+
selected: current ? [current] : [],
|
|
40
|
+
multi: false
|
|
41
|
+
}, theme, keybindings, done)))?.[0];
|
|
42
|
+
}
|
|
43
|
+
function createProfileCommand(pi, telemetry, cordisContext, reloadHandoffs) {
|
|
44
|
+
const load = lazyModules();
|
|
45
|
+
return ["profile", {
|
|
46
|
+
description: "Show profiles and load a different persona and environment",
|
|
47
|
+
handler: async (args, ctx) => {
|
|
48
|
+
const cordis = cordisContext();
|
|
49
|
+
const state = (0, _agimon_ai_doompi_config_piContext.requireDoomConfigContext)(cordis).harness;
|
|
50
|
+
const [{ requireHarnessRoot }, { loadProfiles }] = await Promise.all([load.harnessStore(), load.profiles()]);
|
|
51
|
+
const root = requireHarnessRoot(state);
|
|
52
|
+
const current = state.profile;
|
|
53
|
+
const sessionId = ctx.sessionManager.getSessionId();
|
|
54
|
+
const token = reloadHandoffs ? require_index.voiceSwitchToken(args) : void 0;
|
|
55
|
+
let voiceHandoff;
|
|
56
|
+
let profiles;
|
|
57
|
+
try {
|
|
58
|
+
profiles = loadProfiles(root);
|
|
59
|
+
} catch (error) {
|
|
60
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
61
|
+
telemetry.recordError(require_telemetry.PROFILE_EVENT.profileLoadFailed, error);
|
|
62
|
+
ctx.ui.notify(`Could not load ${PROFILE_CONFIG_PATH}: ${reason}`, WARNING);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (profiles.length === 0) {
|
|
66
|
+
ctx.ui.notify(`No profiles found in ${PROFILE_CONFIG_PATH}.`, WARNING);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
let picked;
|
|
70
|
+
if (token && reloadHandoffs) {
|
|
71
|
+
const voiceSession = (0, _agimon_ai_doompi_core_voice_tools.readDoomVoiceToolsService)(cordis)?.readSession(sessionId);
|
|
72
|
+
voiceHandoff = voiceSession ? reloadHandoffs.accept(token, {
|
|
73
|
+
sessionId,
|
|
74
|
+
hostGeneration: voiceSession.hostGeneration
|
|
75
|
+
}) : void 0;
|
|
76
|
+
if (voiceHandoff?.kind !== "profile-switch" || !voiceHandoff.profile) throw new Error("The voice profile switch token is stale or belongs to another session.");
|
|
77
|
+
picked = voiceHandoff.profile;
|
|
78
|
+
} else picked = await pickProfile(ctx, profiles, current, load.picker);
|
|
79
|
+
const profile = profiles.find((candidate) => candidate.name === picked);
|
|
80
|
+
if (!profile) return;
|
|
81
|
+
if (profile.name === current) {
|
|
82
|
+
ctx.ui.notify(require_index.profileSummary(profile), INFO);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const coordinator = (0, _agimon_ai_doompi_core_transition.requireDoomTransitionCoordinator)(cordis);
|
|
86
|
+
let minorModeReloadHandoff;
|
|
87
|
+
const result = await coordinator.execute({
|
|
88
|
+
sessionId: ctx.sessionManager.getSessionId(),
|
|
89
|
+
hostGeneration: coordinator.hostGeneration,
|
|
90
|
+
operationId: crypto.randomUUID(),
|
|
91
|
+
source: ctx.mode === "tui" ? "ui" : "command",
|
|
92
|
+
target: {
|
|
93
|
+
axis: "profile",
|
|
94
|
+
profile: profile.name
|
|
95
|
+
}
|
|
96
|
+
}, async (_request, plan) => {
|
|
97
|
+
minorModeReloadHandoff = (0, _agimon_ai_doompi_minor_mode_reload_handoff.prepareMinorModeReloadHandoff)(cordis, ctx.sessionManager.getSessionId(), coordinator.hostGeneration, plan.operationId, (0, _agimon_ai_doompi_minor_mode.readMinorModeCatalog)(cordis)?.getSnapshot());
|
|
98
|
+
try {
|
|
99
|
+
const { applyProfile } = await load.selection();
|
|
100
|
+
ctx.ui.notify(await applyProfile(profile, state), INFO);
|
|
101
|
+
const { persistHarnessSelection } = await load.journal();
|
|
102
|
+
persistHarnessSelection(pi, {
|
|
103
|
+
...state,
|
|
104
|
+
profile: profile.name
|
|
105
|
+
});
|
|
106
|
+
telemetry.recordEvent(require_telemetry.PROFILE_EVENT.profileApplied, {
|
|
107
|
+
"harness.profile": profile.name,
|
|
108
|
+
...current ? { "harness.profile.previous": current } : {},
|
|
109
|
+
"harness.transition.disposition": plan.disposition,
|
|
110
|
+
"harness.transition.operation_id": plan.operationId
|
|
111
|
+
});
|
|
112
|
+
return "applied";
|
|
113
|
+
} catch (error) {
|
|
114
|
+
minorModeReloadHandoff?.discard();
|
|
115
|
+
minorModeReloadHandoff = void 0;
|
|
116
|
+
throw error;
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
if (result.outcome === "rejected" || result.outcome === "stale") {
|
|
120
|
+
minorModeReloadHandoff?.discard();
|
|
121
|
+
ctx.ui.notify(`Profile transition was ${result.outcome}: ${result.diagnostics.join(", ")}`, WARNING);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
if (result.outcome !== "applied") {
|
|
125
|
+
minorModeReloadHandoff?.discard();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
try {
|
|
129
|
+
await ctx.waitForIdle();
|
|
130
|
+
await ctx.reload();
|
|
131
|
+
} catch (error) {
|
|
132
|
+
minorModeReloadHandoff?.discard();
|
|
133
|
+
throw error;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}];
|
|
137
|
+
}
|
|
138
|
+
//#endregion
|
|
139
|
+
exports.createProfileCommand = createProfileCommand;
|
|
140
|
+
|
|
141
|
+
//# sourceMappingURL=profileCommand.cjs.map
|