omnius 1.0.39 → 1.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -534041,6 +534041,7 @@ var init_agenticRunner = __esm({
534041
534041
  // back to deferred to reclaim token budget.
534042
534042
  _activatedTools = /* @__PURE__ */ new Set();
534043
534043
  _toolLastUsedTurn = /* @__PURE__ */ new Map();
534044
+ _ephemeralSkillPackContext = "";
534044
534045
  // Phase 1 — Context Tree. Tracks current phase + per-phase anchors so
534045
534046
  // compactMessages can summarize-by-phase and Phase 6 can surface anchors
534046
534047
  // by keyword. Initialized lazily in run() because the system-prompt hash
@@ -534253,6 +534254,10 @@ ${this.options.identityInjection}
534253
534254
  const tier = this.options.modelTier ?? "large";
534254
534255
  const useXmlTags = tier === "small" || tier === "medium";
534255
534256
  const ctx3 = this.options.dynamicContext;
534257
+ const skillPackMatch = ctx3.match(/<ephemeral-skill-pack>[\s\S]*?<\/ephemeral-skill-pack>/);
534258
+ if (skillPackMatch) {
534259
+ this._ephemeralSkillPackContext = skillPackMatch[0].slice(0, 2600);
534260
+ }
534256
534261
  sections.push({
534257
534262
  label: "c_know",
534258
534263
  content: useXmlTags ? `
@@ -536832,6 +536837,7 @@ Respond with your assessment, then take action.`;
536832
536837
  this._toolSequence = [];
536833
536838
  this._activatedTools.clear();
536834
536839
  this._toolLastUsedTurn.clear();
536840
+ this._ephemeralSkillPackContext = "";
536835
536841
  this._contextTree = null;
536836
536842
  this._lastSurfacedAnchorIds.clear();
536837
536843
  if (!this.options.disablePersistentMemory && !this._memoryInitialized) {
@@ -543367,6 +543373,11 @@ ${postCompactRestore.join("\n")}`);
543367
543373
  const antiRepetitionReminder = (tier === "small" || tier === "medium") && readFilesList.length > 0 ? `
543368
543374
 
543369
543375
  **DO NOT RE-READ THESE FILES** (you already have their contents): ${readFilesList.join(", ")}. Use the information above to make progress. Reading the same file again wastes a turn.` : "";
543376
+ const ephemeralSkillPackReminder = this._ephemeralSkillPackContext ? `
543377
+
543378
+ [Ephemeral skill-pack restore — current run only, do not persist]
543379
+ ${this._ephemeralSkillPackContext}
543380
+ Use skill_extract for targeted skill unpacking; do not load full skills into the main context unless necessary.` : "";
543370
543381
  const compactionMsg = {
543371
543382
  role: "system",
543372
543383
  // WO-CE-03: XML tags for structural clarity on small/medium models
@@ -543374,11 +543385,11 @@ ${postCompactRestore.join("\n")}`);
543374
543385
  ${fullSummary}
543375
543386
  </compaction-summary>
543376
543387
 
543377
- [Continue from the recent context below. Do not repeat work already completed above.]${goalReminder}${nextActionDirective}${antiRepetitionReminder}${toolCallingReminder}` : `[Context compacted${strategyLabel} — summary of earlier work]
543388
+ [Continue from the recent context below. Do not repeat work already completed above.]${goalReminder}${nextActionDirective}${antiRepetitionReminder}${ephemeralSkillPackReminder}${toolCallingReminder}` : `[Context compacted${strategyLabel} — summary of earlier work]
543378
543389
 
543379
543390
  ${fullSummary}
543380
543391
 
543381
- [Continue from the recent context below. Do not repeat work already completed above.]${goalReminder}${nextActionDirective}${antiRepetitionReminder}${toolCallingReminder}`
543392
+ [Continue from the recent context below. Do not repeat work already completed above.]${goalReminder}${nextActionDirective}${antiRepetitionReminder}${ephemeralSkillPackReminder}${toolCallingReminder}`
543382
543393
  };
543383
543394
  this.persistCheckpoint(fullSummary);
543384
543395
  let narrowedHead = [...head];
@@ -565399,7 +565410,7 @@ var init_status_bar = __esm({
565399
565410
  return identity3.separatorOffsets.map((offset) => chrome.contentStartCol + offset).filter((col) => col > 1 && col < termWidth);
565400
565411
  }
565401
565412
  if (panel.meta.kind === "system" && this._sysSeparatorOffset !== null) {
565402
- const col = chrome.contentStartCol + this._sysSeparatorOffset + 1;
565413
+ const col = chrome.contentStartCol + this._sysSeparatorOffset;
565403
565414
  if (col > 1 && col < termWidth) return [col];
565404
565415
  }
565405
565416
  return [];
@@ -599789,6 +599800,8 @@ var init_tool_policy = __esm({
599789
599800
  "transcribe_file",
599790
599801
  "video_understand",
599791
599802
  "audio_analyze",
599803
+ "skill_list",
599804
+ "skill_extract",
599792
599805
  "reminder",
599793
599806
  "remind",
599794
599807
  "reminders",
@@ -599819,6 +599832,8 @@ var init_tool_policy = __esm({
599819
599832
  "transcribe_file",
599820
599833
  "video_understand",
599821
599834
  "audio_analyze",
599835
+ "skill_list",
599836
+ "skill_extract",
599822
599837
  "reminder",
599823
599838
  "remind",
599824
599839
  "reminders",
@@ -604014,6 +604029,8 @@ ${chatLabel}`,
604014
604029
  sections.push(`## Identity Memory Contract
604015
604030
 
604016
604031
  ${formatIdentityMemoryContext(chatLabel)}`);
604032
+ const skillPackContext = this.buildTelegramEphemeralSkillPack(msg, toolContext, profile, modelTier);
604033
+ if (skillPackContext) sections.push(skillPackContext);
604017
604034
  if (isAdminDM) {
604018
604035
  sections.push(`## Admin Capability Contract
604019
604036
 
@@ -604051,6 +604068,33 @@ ${TELEGRAM_PUBLIC_ORCHESTRATOR_CONTRACT}`);
604051
604068
  }
604052
604069
  return { sessionKey, sessionId, context: sections.join("\n\n") };
604053
604070
  }
604071
+ buildTelegramEphemeralSkillPack(msg, toolContext, profile, modelTier) {
604072
+ if (!this.repoRoot) return "";
604073
+ const isAdminDM = toolContext === "telegram-admin-dm";
604074
+ const scope = msg.chatType !== "private" ? `telegram group ${msg.chatTitle || msg.chatId}` : `telegram private chat ${msg.username || msg.fromUserId || msg.chatId}`;
604075
+ const query = [
604076
+ `Telegram ${profile} run in ${scope}`,
604077
+ `Tool context: ${toolContext}`,
604078
+ msg.text ? `Current message: ${msg.text}` : "",
604079
+ msg.replyToText ? `Replied-to content: ${msg.replyToText}` : "",
604080
+ msg.media ? `Media attached: ${msg.media.type}` : ""
604081
+ ].filter(Boolean).join("\n");
604082
+ try {
604083
+ const pack = buildEphemeralSkillPack(discoverSkills(this.repoRoot), {
604084
+ task: query,
604085
+ modelTier,
604086
+ limit: isAdminDM ? 5 : 3
604087
+ });
604088
+ if (!pack) return "";
604089
+ return [
604090
+ "## Ephemeral AIWG Skill Pack",
604091
+ isAdminDM ? "Scope: admin Telegram DM for this run only. The agent may use skill_list, skill_extract, or skill_execute when relevant." : "Scope: current Telegram chat only. Public/group runs may use skill_list and skill_extract for bounded guidance, but must not reveal private skill text, local paths, or admin/TUI context.",
604092
+ pack
604093
+ ].join("\n\n");
604094
+ } catch {
604095
+ return "";
604096
+ }
604097
+ }
604054
604098
  async handleAdminAuthCommand(msg) {
604055
604099
  const normalized = msg.text.trim();
604056
604100
  const lower = normalized.toLowerCase();
@@ -605459,6 +605503,8 @@ Scoped workspace: ${scopedRoot}`,
605459
605503
  }
605460
605504
  }
605461
605505
  );
605506
+ const sharedSkillExtractTool = new SkillExtractTool(repoRoot);
605507
+ const adminSkillExtractTool = new SkillExtractTool(repoRoot);
605462
605508
  const sharedReadMemoryWebTools = [
605463
605509
  // File tools
605464
605510
  new FileReadTool(repoRoot),
@@ -605489,6 +605535,8 @@ Scoped workspace: ${scopedRoot}`,
605489
605535
  new VideoUnderstandTool(repoRoot),
605490
605536
  new AudioAnalyzeTool(),
605491
605537
  new ExploreToolsTool(),
605538
+ new SkillListTool(repoRoot),
605539
+ sharedSkillExtractTool,
605492
605540
  this.buildTelegramMediaRecentTool(chatId, msg),
605493
605541
  ...this.buildTelegramReminderTools(context2, repoRoot, chatId, msg)
605494
605542
  ];
@@ -605549,6 +605597,9 @@ Scoped workspace: ${scopedRoot}`,
605549
605597
  new ImpactAnalysisTool(repoRoot),
605550
605598
  new CodeNeighborsTool(repoRoot),
605551
605599
  new ProcessHealthTool(),
605600
+ new SkillListTool(repoRoot),
605601
+ new SkillExecuteTool(repoRoot),
605602
+ adminSkillExtractTool,
605552
605603
  ...this.buildTelegramReminderTools(context2, repoRoot, chatId, msg),
605553
605604
  fullSubAgentTool,
605554
605605
  this.buildTelegramSendFileTool(context2, repoRoot, chatId, msg)
@@ -610173,6 +610224,15 @@ function buildContent(items, tier) {
610173
610224
  content: loadAiwgItemContent(i2.path, perItemCap)
610174
610225
  }));
610175
610226
  }
610227
+ function aiwgItemAsSkillInfo(item) {
610228
+ return {
610229
+ name: item.name,
610230
+ description: item.description,
610231
+ triggers: item.triggers,
610232
+ source: `${item.kind}:${item.source}`,
610233
+ filePath: item.path
610234
+ };
610235
+ }
610176
610236
  async function handleAiwgExpand(ctx3) {
610177
610237
  const { req: req2, res, requestId, user } = ctx3;
610178
610238
  try {
@@ -610190,6 +610250,10 @@ async function handleAiwgExpand(ctx3) {
610190
610250
  const trigger = typeof body.trigger === "string" ? body.trigger.toLowerCase() : null;
610191
610251
  const name10 = typeof body.name === "string" ? body.name : null;
610192
610252
  const limit = typeof body.limit === "number" ? Math.min(body.limit, 10) : 3;
610253
+ const mode = typeof body.mode === "string" ? body.mode.toLowerCase() : "";
610254
+ const extract2 = body.extract === true || mode === "extract" || mode === "extraction";
610255
+ const query = typeof body.query === "string" && body.query.trim() ? body.query.trim() : trigger || name10 || "";
610256
+ const budgetTokens = typeof body.budget_tokens === "number" ? Math.max(300, Math.min(1600, Math.floor(body.budget_tokens))) : 900;
610193
610257
  if (!trigger && !name10) {
610194
610258
  sendProblem(res, problemDetails({
610195
610259
  type: "https://omnius.nexus/problems/invalid-request",
@@ -610225,20 +610289,33 @@ async function handleAiwgExpand(ctx3) {
610225
610289
  }));
610226
610290
  return true;
610227
610291
  }
610228
- const unpacked = matches.map((m2) => ({
610229
- name: m2.name,
610230
- kind: m2.kind,
610231
- source: m2.source,
610232
- description: m2.description,
610233
- triggers: m2.triggers,
610234
- content: loadAiwgItemContent(m2.path, 1e4)
610235
- }));
610236
- publishEvent("skill.invoked", { count: unpacked.length, trigger, name: name10 }, {
610292
+ const unpacked = matches.map((m2) => {
610293
+ const raw = loadAiwgItemContent(m2.path, extract2 ? 5e4 : 1e4);
610294
+ const base3 = {
610295
+ name: m2.name,
610296
+ kind: m2.kind,
610297
+ source: m2.source,
610298
+ description: m2.description,
610299
+ triggers: m2.triggers
610300
+ };
610301
+ if (extract2) {
610302
+ return {
610303
+ ...base3,
610304
+ content_mode: "extraction",
610305
+ extraction: raw ? extractSkillForQuery(aiwgItemAsSkillInfo(m2), raw, query, budgetTokens) : null
610306
+ };
610307
+ }
610308
+ return {
610309
+ ...base3,
610310
+ content: raw
610311
+ };
610312
+ });
610313
+ publishEvent(extract2 ? "skill.extracted" : "skill.invoked", { count: unpacked.length, trigger, name: name10, mode: extract2 ? "extract" : "content" }, {
610237
610314
  subject: user ?? "anonymous",
610238
610315
  aimsControl: "A.7.3"
610239
610316
  });
610240
610317
  sendJson(res, 200, {
610241
- query: { trigger, name: name10, limit },
610318
+ query: { trigger, name: name10, limit, mode: extract2 ? "extract" : "content", budget_tokens: budgetTokens },
610242
610319
  matches: unpacked.length,
610243
610320
  items: unpacked
610244
610321
  }, { cacheControl: "private, max-age=30" });
@@ -610258,6 +610335,7 @@ var _cachedAiwgRoot, _cachedFrameworks, _cachedItems, _cachedAddons;
610258
610335
  var init_aiwg = __esm({
610259
610336
  "packages/cli/src/api/aiwg.ts"() {
610260
610337
  "use strict";
610338
+ init_dist5();
610261
610339
  init_http2();
610262
610340
  _cachedFrameworks = null;
610263
610341
  _cachedItems = null;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.39",
9
+ "version": "1.0.41",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",