@pellux/goodvibes-agent 1.0.43 → 1.1.0

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.
@@ -450372,6 +450372,23 @@ function createSchema2(db) {
450372
450372
  `);
450373
450373
  db.run(`CREATE INDEX IF NOT EXISTS idx_knowledge_schedules_job_id ON knowledge_schedules(job_id)`);
450374
450374
  }
450375
+ function getKnowledgeSchemaStatements() {
450376
+ const statements = [];
450377
+ createSchema2({
450378
+ run(sql) {
450379
+ const normalized = sql.trim();
450380
+ if (normalized.length > 0)
450381
+ statements.push(normalized);
450382
+ }
450383
+ });
450384
+ return statements;
450385
+ }
450386
+ function renderKnowledgeSchemaSql() {
450387
+ return `${getKnowledgeSchemaStatements().map((statement) => statement.endsWith(";") ? statement : `${statement};`).join(`
450388
+
450389
+ `)}
450390
+ `;
450391
+ }
450375
450392
  function rowObject(columns, values2) {
450376
450393
  return Object.fromEntries(columns.map((column, index) => [column, values2[index]]));
450377
450394
  }
@@ -763654,6 +763671,9 @@ var init_ingest = __esm(() => {
763654
763671
  // node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/browser-history/index.js
763655
763672
  var init_browser_history = __esm(() => {
763656
763673
  init_ingest();
763674
+ init_discover();
763675
+ init_readers();
763676
+ init_paths2();
763657
763677
  });
763658
763678
 
763659
763679
  // node_modules/graphql/jsutils/devAssert.mjs
@@ -781293,6 +781313,7 @@ var init_semantic = __esm(() => {
781293
781313
  init_llm();
781294
781314
  init_gap_repair();
781295
781315
  init_service4();
781316
+ init_self_improvement();
781296
781317
  });
781297
781318
 
781298
781319
  // node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/home-graph/helpers.js
@@ -785261,8 +785282,40 @@ var init_map_view = __esm(() => {
785261
785282
  });
785262
785283
 
785263
785284
  // node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/home-graph/types.js
785264
- var HOME_GRAPH_CAPABILITIES;
785285
+ var HOME_GRAPH_NODE_KINDS, HOME_GRAPH_RELATIONS, HOME_GRAPH_CAPABILITIES;
785265
785286
  var init_types15 = __esm(() => {
785287
+ HOME_GRAPH_NODE_KINDS = [
785288
+ "ha_home",
785289
+ "ha_entity",
785290
+ "ha_device",
785291
+ "ha_area",
785292
+ "ha_automation",
785293
+ "ha_script",
785294
+ "ha_scene",
785295
+ "ha_label",
785296
+ "ha_integration",
785297
+ "ha_room",
785298
+ "ha_device_passport",
785299
+ "ha_maintenance_item",
785300
+ "ha_troubleshooting_case",
785301
+ "ha_purchase",
785302
+ "ha_network_node"
785303
+ ];
785304
+ HOME_GRAPH_RELATIONS = [
785305
+ "controls",
785306
+ "located_in",
785307
+ "belongs_to_device",
785308
+ "has_manual",
785309
+ "has_receipt",
785310
+ "has_warranty",
785311
+ "has_issue",
785312
+ "fixed_by",
785313
+ "uses_battery",
785314
+ "connected_via",
785315
+ "part_of_network",
785316
+ "mentioned_by",
785317
+ "source_for"
785318
+ ];
785266
785319
  HOME_GRAPH_CAPABILITIES = [
785267
785320
  "knowledge-space-isolation",
785268
785321
  "snapshot-sync",
@@ -786669,6 +786722,7 @@ var init_service5 = __esm(() => {
786669
786722
  var init_home_graph = __esm(() => {
786670
786723
  init_service5();
786671
786724
  init_extension();
786725
+ init_types15();
786672
786726
  });
786673
786727
 
786674
786728
  // node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/store-refinement.js
@@ -788996,10 +789050,14 @@ var init_service6 = __esm(() => {
788996
789050
  var init_project_planning = __esm(() => {
788997
789051
  init_service6();
788998
789052
  init_helpers3();
789053
+ init_readiness();
788999
789054
  });
789000
789055
 
789001
789056
  // node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/persistence.js
789002
- var init_persistence = () => {};
789057
+ var init_persistence = __esm(() => {
789058
+ init_store_schema();
789059
+ init_store_load();
789060
+ });
789003
789061
 
789004
789062
  // node_modules/@pellux/goodvibes-sdk/dist/platform/knowledge/projections.js
789005
789063
  class KnowledgeProjectionService {
@@ -792507,21 +792565,21 @@ var init_service7 = __esm(() => {
792507
792565
  var exports_knowledge = {};
792508
792566
  __export(exports_knowledge, {
792509
792567
  withKnowledgeSpace: () => withKnowledgeSpace,
792510
- uniqKnowledgeValues: () => uniq3,
792511
- stabilizeKnowledgeText: () => stableText2,
792512
- runKnowledgeSemanticSelfImprovement: () => runKnowledgeSemanticSelfImprovement2,
792568
+ uniqKnowledgeValues: () => uniq2,
792569
+ stabilizeKnowledgeText: () => stableText,
792570
+ runKnowledgeSemanticSelfImprovement: () => runKnowledgeSemanticSelfImprovement,
792513
792571
  resolveProjectPlanningSpace: () => resolveProjectPlanningSpace,
792514
- resolveKnowledgeDbPathFromControlPlaneDir: () => resolveKnowledgeDbPathFromControlPlaneDir2,
792572
+ resolveKnowledgeDbPathFromControlPlaneDir: () => resolveKnowledgeDbPathFromControlPlaneDir,
792515
792573
  renderPacket: () => renderPacket,
792516
792574
  renderKnowledgeSchemaSql: () => renderKnowledgeSchemaSql,
792517
792575
  renderKnowledgeMap: () => renderKnowledgeMap,
792518
792576
  readKnowledgeSearchText: () => readKnowledgeSearchText,
792519
- readBrowserKnowledgeProfile: () => readBrowserKnowledgeProfile2,
792577
+ readBrowserKnowledgeProfile: () => readBrowserKnowledgeProfile,
792520
792578
  projectPlanningSourceId: () => projectPlanningSourceId,
792521
792579
  projectPlanningProjectIdFromPath: () => projectPlanningProjectIdFromPath,
792522
792580
  projectPlanningCanonicalUri: () => projectPlanningCanonicalUri,
792523
792581
  projectKnowledgeSpaceId: () => projectKnowledgeSpaceId,
792524
- parseKnowledgeJsonValue: () => parseJsonValue2,
792582
+ parseKnowledgeJsonValue: () => parseJsonValue,
792525
792583
  normalizeProjectId: () => normalizeProjectId,
792526
792584
  normalizeKnowledgeSpaceId: () => normalizeKnowledgeSpaceId,
792527
792585
  normalizeHomeAssistantInstallationId: () => normalizeHomeAssistantInstallationId,
@@ -792529,12 +792587,12 @@ __export(exports_knowledge, {
792529
792587
  materializeGeneratedKnowledgeProjection: () => materializeGeneratedKnowledgeProjection,
792530
792588
  looksLikeRawPdfPayload: () => looksLikeRawPdfPayload,
792531
792589
  looksBinaryLikeText: () => looksBinaryLikeText,
792532
- loadKnowledgeStoreSnapshot: () => loadKnowledgeStoreSnapshot2,
792590
+ loadKnowledgeStoreSnapshot: () => loadKnowledgeStoreSnapshot,
792533
792591
  listGeneratedKnowledgePages: () => listGeneratedKnowledgePages,
792534
- listBrowserKinds: () => listBrowserKinds2,
792592
+ listBrowserKinds: () => listBrowserKinds,
792535
792593
  knowledgeSpaceMetadata: () => knowledgeSpaceMetadata,
792536
792594
  knowledgePageSourceWeight: () => knowledgePageSourceWeight,
792537
- knowledgeNowMs: () => nowMs2,
792595
+ knowledgeNowMs: () => nowMs,
792538
792596
  knowledgeExtractionNeedsRefresh: () => knowledgeExtractionNeedsRefresh,
792539
792597
  isUsefulKnowledgePageSourceCandidate: () => isUsefulKnowledgePageSourceCandidate,
792540
792598
  isUsefulKnowledgePageSource: () => isUsefulKnowledgePageSource,
@@ -792554,12 +792612,12 @@ __export(exports_knowledge, {
792554
792612
  generatedKnowledgeSourceId: () => generatedKnowledgeSourceId,
792555
792613
  generatedKnowledgeCanonicalUri: () => generatedKnowledgeCanonicalUri,
792556
792614
  extractKnowledgeArtifact: () => extractKnowledgeArtifact,
792557
- evaluateProjectPlanningReadiness: () => evaluateProjectPlanningReadiness2,
792558
- discoverBrowserKnowledgeProfiles: () => discoverBrowserKnowledgeProfiles2,
792615
+ evaluateProjectPlanningReadiness: () => evaluateProjectPlanningReadiness,
792616
+ discoverBrowserKnowledgeProfiles: () => discoverBrowserKnowledgeProfiles,
792559
792617
  createWebKnowledgeGapRepairer: () => createWebKnowledgeGapRepairer,
792560
792618
  createProviderBackedKnowledgeSemanticLlm: () => createProviderBackedKnowledgeSemanticLlm,
792561
792619
  createMemoryApi: () => createMemoryApi,
792562
- createKnowledgeSchema: () => createSchema3,
792620
+ createKnowledgeSchema: () => createSchema2,
792563
792621
  createKnowledgeApi: () => createKnowledgeApi,
792564
792622
  createDefaultKnowledgeConnectorRegistry: () => createDefaultKnowledgeConnectorRegistry,
792565
792623
  compareKnowledgePageSources: () => compareKnowledgePageSources,
@@ -794998,7 +795056,7 @@ var init_delivery_manager = __esm(() => {
794998
795056
  });
794999
795057
 
795000
795058
  // node_modules/@pellux/goodvibes-sdk/dist/platform/automation/scheduler-capacity.js
795001
- function computeSchedulerCapacity(slotsTotal, runs, nowMs3 = Date.now()) {
795059
+ function computeSchedulerCapacity(slotsTotal, runs, nowMs2 = Date.now()) {
795002
795060
  let slotsInUse = 0;
795003
795061
  const queuedRuns = [];
795004
795062
  for (const run7 of runs) {
@@ -795008,7 +795066,7 @@ function computeSchedulerCapacity(slotsTotal, runs, nowMs3 = Date.now()) {
795008
795066
  queuedRuns.push(run7);
795009
795067
  }
795010
795068
  const queueDepth = queuedRuns.length;
795011
- const oldestQueuedAgeMs = queueDepth > 0 ? nowMs3 - Math.min(...queuedRuns.map((r6) => r6.queuedAt)) : null;
795069
+ const oldestQueuedAgeMs = queueDepth > 0 ? nowMs2 - Math.min(...queuedRuns.map((r6) => r6.queuedAt)) : null;
795012
795070
  return { slotsTotal, slotsInUse, queueDepth, oldestQueuedAgeMs };
795013
795071
  }
795014
795072
 
@@ -817087,7 +817145,7 @@ var createStyledCell = (char, overrides = {}) => ({
817087
817145
  // src/version.ts
817088
817146
  import { readFileSync } from "fs";
817089
817147
  import { join } from "path";
817090
- var _version = "1.0.43";
817148
+ var _version = "1.1.0";
817091
817149
  try {
817092
817150
  const pkg = JSON.parse(readFileSync(join(import.meta.dir, "..", "package.json"), "utf-8"));
817093
817151
  _version = typeof pkg.version === "string" ? pkg.version : _version;
@@ -839600,7 +839658,7 @@ var WORK_PLAN_STATUSES = [
839600
839658
  "failed",
839601
839659
  "cancelled"
839602
839660
  ];
839603
- function nowMs3() {
839661
+ function nowMs2() {
839604
839662
  return Date.now();
839605
839663
  }
839606
839664
  function isObject4(value) {
@@ -839706,7 +839764,7 @@ class WorkPlanStore {
839706
839764
  if (!normalizedTitle)
839707
839765
  throw new Error("Work plan item title is required.");
839708
839766
  const plan = this.readPlan();
839709
- const time4 = nowMs3();
839767
+ const time4 = nowMs2();
839710
839768
  const item = {
839711
839769
  id: createItemId(),
839712
839770
  title: normalizedTitle,
@@ -839730,7 +839788,7 @@ class WorkPlanStore {
839730
839788
  updateItem(idOrPrefix, patch2) {
839731
839789
  const plan = this.readPlan();
839732
839790
  const item = this.resolveItem(plan, idOrPrefix);
839733
- const time4 = nowMs3();
839791
+ const time4 = nowMs2();
839734
839792
  const nextStatus = patch2.status ?? item.status;
839735
839793
  const next = this.pruneItem({
839736
839794
  ...item,
@@ -839763,7 +839821,7 @@ class WorkPlanStore {
839763
839821
  removeItem(idOrPrefix) {
839764
839822
  const plan = this.readPlan();
839765
839823
  const item = this.resolveItem(plan, idOrPrefix);
839766
- const time4 = nowMs3();
839824
+ const time4 = nowMs2();
839767
839825
  const remaining = plan.items.filter((candidate) => candidate.id !== item.id);
839768
839826
  this.writePlan({
839769
839827
  ...plan,
@@ -839783,7 +839841,7 @@ class WorkPlanStore {
839783
839841
  ...plan,
839784
839842
  items: remaining,
839785
839843
  activeItemId: remaining[0]?.id,
839786
- updatedAt: nowMs3()
839844
+ updatedAt: nowMs2()
839787
839845
  });
839788
839846
  return removed;
839789
839847
  }
@@ -839822,7 +839880,7 @@ class WorkPlanStore {
839822
839880
  const parsed = JSON.parse(raw);
839823
839881
  if (!isObject4(parsed))
839824
839882
  return this.createEmptyPlan();
839825
- const time4 = nowMs3();
839883
+ const time4 = nowMs2();
839826
839884
  const createdAt = typeof parsed.createdAt === "number" ? parsed.createdAt : time4;
839827
839885
  const updatedAt = typeof parsed.updatedAt === "number" ? parsed.updatedAt : createdAt;
839828
839886
  const items = Array.isArray(parsed.items) ? parsed.items.map((item) => normalizeItem(item, createdAt)).filter((item) => item !== null) : [];
@@ -839841,7 +839899,7 @@ class WorkPlanStore {
839841
839899
  };
839842
839900
  }
839843
839901
  createEmptyPlan() {
839844
- const time4 = nowMs3();
839902
+ const time4 = nowMs2();
839845
839903
  return {
839846
839904
  id: createPlanId(this.options.projectId, this.options.projectRoot),
839847
839905
  projectId: this.options.projectId,
@@ -849793,13 +849851,13 @@ init_state3();
849793
849851
 
849794
849852
  // src/input/commands/recall-shared.ts
849795
849853
  var VALID_CLASSES = ["decision", "constraint", "incident", "pattern", "fact", "risk", "runbook", "architecture", "ownership"];
849796
- var VALID_SCOPES2 = ["session", "project", "team"];
849854
+ var VALID_SCOPES = ["session", "project", "team"];
849797
849855
  var VALID_REVIEW_STATES = ["fresh", "reviewed", "stale", "contradicted"];
849798
849856
  function isValidClass(s4) {
849799
849857
  return VALID_CLASSES.includes(s4);
849800
849858
  }
849801
849859
  function isValidScope(s4) {
849802
- return VALID_SCOPES2.includes(s4);
849860
+ return VALID_SCOPES.includes(s4);
849803
849861
  }
849804
849862
  function isValidReviewState(s4) {
849805
849863
  return VALID_REVIEW_STATES.includes(s4);
@@ -849842,7 +849900,7 @@ function handleRecallSearch(args2, context) {
849842
849900
  if (isValidScope(scope))
849843
849901
  filter.scope = scope;
849844
849902
  else {
849845
- context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES2.join(", ")}.`);
849903
+ context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES.join(", ")}.`);
849846
849904
  return;
849847
849905
  }
849848
849906
  }
@@ -850017,7 +850075,7 @@ function handleRecallList(args2, context) {
850017
850075
  if (scopeIdx !== -1 && args2[scopeIdx + 1]) {
850018
850076
  const scope = args2[scopeIdx + 1];
850019
850077
  if (!isValidScope(scope)) {
850020
- context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES2.join(", ")}.`);
850078
+ context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES.join(", ")}.`);
850021
850079
  return;
850022
850080
  }
850023
850081
  filter.scope = scope;
@@ -850067,7 +850125,7 @@ async function handleRecallAdd(args2, context) {
850067
850125
  const tags = tagsRaw ? tagsRaw.split(",").map((token) => token.trim()).filter(Boolean) : [];
850068
850126
  const scope = scopeRaw && isValidScope(scopeRaw) ? scopeRaw : "project";
850069
850127
  if (scopeRaw && !isValidScope(scopeRaw)) {
850070
- context.print(`[memory] Invalid scope "${scopeRaw}". Valid values ${VALID_SCOPES2.join(", ")}.`);
850128
+ context.print(`[memory] Invalid scope "${scopeRaw}". Valid values ${VALID_SCOPES.join(", ")}.`);
850071
850129
  return;
850072
850130
  }
850073
850131
  const provenance = [];
@@ -850201,7 +850259,7 @@ function handleRecallExport(args2, context) {
850201
850259
  if (scopeIdx !== -1 && commandArgs[scopeIdx + 1]) {
850202
850260
  const scope = commandArgs[scopeIdx + 1];
850203
850261
  if (!isValidScope(scope)) {
850204
- context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES2.join(", ")}.`);
850262
+ context.print(`[memory] Unknown scope "${scope}". Valid values ${VALID_SCOPES.join(", ")}.`);
850205
850263
  return;
850206
850264
  }
850207
850265
  filter.scope = scope;
@@ -850280,7 +850338,7 @@ function handleRecallHandoffExport(args2, context) {
850280
850338
  const scopeIdx = commandArgs.indexOf("--scope");
850281
850339
  const scopeRaw = scopeIdx !== -1 ? commandArgs[scopeIdx + 1] : "team";
850282
850340
  if (!scopeRaw || !isValidScope(scopeRaw)) {
850283
- context.print(`[memory] Unknown scope "${scopeRaw ?? ""}". Valid values ${VALID_SCOPES2.join(", ")}.`);
850341
+ context.print(`[memory] Unknown scope "${scopeRaw ?? ""}". Valid values ${VALID_SCOPES.join(", ")}.`);
850284
850342
  return;
850285
850343
  }
850286
850344
  const bundle = memory.exportBundle({ scope: scopeRaw });
@@ -850396,7 +850454,7 @@ function handleRecallPromote(args2, context) {
850396
850454
  const id = parsed.rest[0];
850397
850455
  const scope = parsed.rest[1];
850398
850456
  if (!id || !scope || !isValidScope(scope)) {
850399
- context.print(`[memory] Usage: /memory promote <id> <${VALID_SCOPES2.join("|")}> --yes`);
850457
+ context.print(`[memory] Usage: /memory promote <id> <${VALID_SCOPES.join("|")}> --yes`);
850400
850458
  return;
850401
850459
  }
850402
850460
  if (!parsed.yes) {
@@ -858574,7 +858632,8 @@ var AGENT_WORKSPACE_CATEGORY_IDS = [
858574
858632
  "work",
858575
858633
  "host",
858576
858634
  "automation",
858577
- "delegate"
858635
+ "delegate",
858636
+ "finish"
858578
858637
  ];
858579
858638
 
858580
858639
  // src/input/commands/agent-workspace-runtime.ts
@@ -863014,7 +863073,7 @@ function registerBriefRuntimeCommands(registry5) {
863014
863073
 
863015
863074
  // src/cli/bundle-command.ts
863016
863075
  import { existsSync as existsSync80, mkdirSync as mkdirSync64, readFileSync as readFileSync87, writeFileSync as writeFileSync55 } from "fs";
863017
- import { dirname as dirname61 } from "path";
863076
+ import { dirname as dirname62 } from "path";
863018
863077
  // src/runtime/onboarding/state.ts
863019
863078
  import { existsSync as existsSync76, mkdirSync as mkdirSync62, readFileSync as readFileSync84, writeFileSync as writeFileSync53 } from "fs";
863020
863079
  var ONBOARDING_RUNTIME_STATE_FILE = "onboarding-state.json";
@@ -863659,6 +863718,7 @@ function deriveStep1CapabilityFlags(snapshot) {
863659
863718
  }
863660
863719
  // src/runtime/onboarding/markers.ts
863661
863720
  import { existsSync as existsSync77, mkdirSync as mkdirSync63, readFileSync as readFileSync85, writeFileSync as writeFileSync54 } from "fs";
863721
+ import { dirname as dirname60 } from "path";
863662
863722
  var ONBOARDING_CHECK_MARKER_FILE = "onboarding-checked.json";
863663
863723
  function resolveMarkerPath(shellPaths, scope) {
863664
863724
  return scope === "project" ? shellPaths.resolveProjectPath(GOODVIBES_AGENT_SURFACE_ROOT, ONBOARDING_CHECK_MARKER_FILE) : shellPaths.resolveUserPath(GOODVIBES_AGENT_SURFACE_ROOT, ONBOARDING_CHECK_MARKER_FILE);
@@ -863728,9 +863788,26 @@ function readOnboardingCheckMarkers(shellPaths) {
863728
863788
  effective: pickEffectiveMarker(user)
863729
863789
  };
863730
863790
  }
863791
+ function writeOnboardingCheckMarker(shellPaths, options = {}) {
863792
+ const scope = options.scope ?? "user";
863793
+ const path7 = resolveMarkerPath(shellPaths, scope);
863794
+ const checkedAt = options.checkedAt ?? Date.now();
863795
+ const payload = {
863796
+ version: 1,
863797
+ checkedAt,
863798
+ updatedAt: options.updatedAt ?? checkedAt,
863799
+ source: options.source ?? "wizard",
863800
+ ...options.mode ? { mode: options.mode } : {},
863801
+ ...options.workspaceRoot ? { workspaceRoot: options.workspaceRoot } : {}
863802
+ };
863803
+ mkdirSync63(dirname60(path7), { recursive: true });
863804
+ writeFileSync54(path7, `${JSON.stringify(payload, null, 2)}
863805
+ `, "utf-8");
863806
+ return readOnboardingCheckMarker(shellPaths, scope);
863807
+ }
863731
863808
  // src/cli/help.ts
863732
863809
  import { existsSync as existsSync78, readFileSync as readFileSync86 } from "fs";
863733
- import { dirname as dirname60, join as join93 } from "path";
863810
+ import { dirname as dirname61, join as join93 } from "path";
863734
863811
  import { fileURLToPath as fileURLToPath4 } from "url";
863735
863812
  function readJsonVersion(path7) {
863736
863813
  try {
@@ -863743,7 +863820,7 @@ function readJsonVersion(path7) {
863743
863820
  }
863744
863821
  }
863745
863822
  function getPackageVersion() {
863746
- const here = dirname60(fileURLToPath4(import.meta.url));
863823
+ const here = dirname61(fileURLToPath4(import.meta.url));
863747
863824
  return readJsonVersion(join93(here, "..", "..", "package.json")) ?? VERSION;
863748
863825
  }
863749
863826
  function renderGoodVibesVersion(binary2 = "goodvibes-agent") {
@@ -864687,7 +864764,7 @@ async function handleBundleCommand(runtime2) {
864687
864764
  }
864688
864765
  };
864689
864766
  const targetPath = shellPaths.resolveWorkspacePath(outputPath);
864690
- mkdirSync64(dirname61(targetPath), { recursive: true });
864767
+ mkdirSync64(dirname62(targetPath), { recursive: true });
864691
864768
  writeFileSync55(targetPath, redactSerializedSecrets(JSON.stringify(bundle, null, 2), sensitiveValues) + `
864692
864769
  `, "utf-8");
864693
864770
  return {
@@ -865305,7 +865382,7 @@ function formatProviderAuthRoute(route) {
865305
865382
 
865306
865383
  // src/cli/management-commands.ts
865307
865384
  import { mkdirSync as mkdirSync65, writeFileSync as writeFileSync56 } from "fs";
865308
- import { dirname as dirname62 } from "path";
865385
+ import { dirname as dirname63 } from "path";
865309
865386
  init_config8();
865310
865387
  init_config8();
865311
865388
  init_config8();
@@ -865615,7 +865692,7 @@ async function handleSessions(runtime2) {
865615
865692
  `;
865616
865693
  if (outputPath) {
865617
865694
  const targetPath = services.shellPaths.resolveWorkspacePath(outputPath);
865618
- mkdirSync65(dirname62(targetPath), { recursive: true });
865695
+ mkdirSync65(dirname63(targetPath), { recursive: true });
865619
865696
  writeFileSync56(targetPath, text, "utf-8");
865620
865697
  return [
865621
865698
  "Session exported",
@@ -866498,10 +866575,10 @@ Run goodvibes-agent skills discover to inspect available skill files.`, 1);
866498
866575
 
866499
866576
  // src/cli/memory-command.ts
866500
866577
  import { mkdirSync as mkdirSync66, readFileSync as readFileSync88, writeFileSync as writeFileSync57 } from "fs";
866501
- import { dirname as dirname63, resolve as resolve39 } from "path";
866578
+ import { dirname as dirname64, resolve as resolve39 } from "path";
866502
866579
  init_state3();
866503
866580
  var VALID_CLASSES2 = ["decision", "constraint", "incident", "pattern", "fact", "risk", "runbook", "architecture", "ownership"];
866504
- var VALID_SCOPES4 = ["session", "project", "team"];
866581
+ var VALID_SCOPES3 = ["session", "project", "team"];
866505
866582
  var VALID_REVIEW_STATES3 = ["fresh", "reviewed", "stale", "contradicted"];
866506
866583
  var VALID_PROVENANCE_KINDS = ["session", "turn", "task", "event", "file"];
866507
866584
  var VALUE_OPTIONS = new Set([
@@ -866601,7 +866678,7 @@ function isMemoryClass2(value) {
866601
866678
  return VALID_CLASSES2.includes(value);
866602
866679
  }
866603
866680
  function isMemoryScope2(value) {
866604
- return VALID_SCOPES4.includes(value);
866681
+ return VALID_SCOPES3.includes(value);
866605
866682
  }
866606
866683
  function isReviewState(value) {
866607
866684
  return VALID_REVIEW_STATES3.includes(value);
@@ -866616,7 +866693,7 @@ function requireClass(value) {
866616
866693
  }
866617
866694
  function requireScope(value) {
866618
866695
  if (!value || !isMemoryScope2(value))
866619
- throw new Error(`Invalid memory scope "${value ?? ""}". Valid values ${VALID_SCOPES4.join(", ")}`);
866696
+ throw new Error(`Invalid memory scope "${value ?? ""}". Valid values ${VALID_SCOPES3.join(", ")}`);
866620
866697
  return value;
866621
866698
  }
866622
866699
  function optionalScope(value) {
@@ -866794,7 +866871,7 @@ function resolvePath4(runtime2, path7) {
866794
866871
  return resolve39(runtime2.workingDirectory, path7);
866795
866872
  }
866796
866873
  function writeBundle(path7, bundle) {
866797
- mkdirSync66(dirname63(path7), { recursive: true });
866874
+ mkdirSync66(dirname64(path7), { recursive: true });
866798
866875
  writeFileSync57(path7, `${JSON.stringify(bundle, null, 2)}
866799
866876
  `);
866800
866877
  }
@@ -883827,7 +883904,7 @@ function describeHarnessDelegationRoute(context, args2) {
883827
883904
 
883828
883905
  // src/tools/agent-harness-keybinding-metadata.ts
883829
883906
  import { existsSync as existsSync83, mkdirSync as mkdirSync68, readFileSync as readFileSync90, writeFileSync as writeFileSync59 } from "fs";
883830
- import { dirname as dirname64 } from "path";
883907
+ import { dirname as dirname65 } from "path";
883831
883908
  var FIXED_SHORTCUTS = [
883832
883909
  { key: "Enter", description: "Send prompt" },
883833
883910
  { key: "Shift+Enter / Ctrl+J", description: "Insert newline" },
@@ -884207,7 +884284,7 @@ function readOverrideFile(configPath) {
884207
884284
  return parsed;
884208
884285
  }
884209
884286
  function writeOverrideFile(configPath, overrides) {
884210
- mkdirSync68(dirname64(configPath), { recursive: true });
884287
+ mkdirSync68(dirname65(configPath), { recursive: true });
884211
884288
  writeFileSync59(configPath, `${JSON.stringify(overrides, null, 2)}
884212
884289
  `, "utf-8");
884213
884290
  }
@@ -890239,6 +890316,10 @@ function activateAgentWorkspaceSelection(workspace, requestRender) {
890239
890316
  workspace.applyLocalLibraryOperation(action2.localOperation);
890240
890317
  return;
890241
890318
  }
890319
+ if (action2.kind === "onboarding-complete") {
890320
+ workspace.completeOnboarding();
890321
+ return;
890322
+ }
890242
890323
  if (action2.kind === "guidance" || !action2.command) {
890243
890324
  handleGuidanceOrWorkspaceAction(workspace, action2);
890244
890325
  return;
@@ -890965,6 +891046,17 @@ var AGENT_WORKSPACE_CATEGORIES = [
890965
891046
  { id: "review-command", label: "Review delegation command", detail: "Use the confirmed delegation form only when the user explicitly asks for code review/build execution. Include the actual task text, preserve the full original ask, and request delegated review only when asked.", kind: "guidance", safety: "delegates" },
890966
891047
  { id: "delegation-status", label: "Delegation status", detail: "Inspect build-delegation receipts and shared-session status without starting coding work.", command: "/delegate status", kind: "command", safety: "read-only" }
890967
891048
  ]
891049
+ },
891050
+ {
891051
+ id: "finish",
891052
+ group: "FINISH",
891053
+ label: "Finish",
891054
+ summary: "Acknowledge setup and close onboarding.",
891055
+ detail: "Use this final step after reviewing setup. Apply & close writes the user onboarding completion marker so normal future launches start in the main conversation.",
891056
+ actions: [
891057
+ { id: "onboarding-apply-close", label: "Apply & close", detail: "Acknowledge onboarding as finished, persist the user completion marker, and close the fullscreen Agent workspace.", kind: "onboarding-complete", safety: "safe" },
891058
+ { id: "finish-review-setup", label: "Review setup first", detail: "Jump back to setup before acknowledging onboarding as finished.", targetCategoryId: "setup", kind: "workspace", safety: "safe" }
891059
+ ]
890968
891060
  }
890969
891061
  ];
890970
891062
 
@@ -895834,6 +895926,45 @@ class AgentWorkspace {
895834
895926
  openDeleteEditor: (kind2, selected) => this.openDeleteEditor(kind2, selected)
895835
895927
  });
895836
895928
  }
895929
+ completeOnboarding() {
895930
+ const shellPaths3 = this.context?.workspace?.shellPaths;
895931
+ if (!shellPaths3) {
895932
+ this.status = "Cannot complete onboarding without Agent shell paths.";
895933
+ this.lastActionResult = {
895934
+ kind: "error",
895935
+ title: "Onboarding completion unavailable",
895936
+ detail: "The Agent workspace cannot locate the user onboarding completion marker path for this runtime.",
895937
+ safety: "safe"
895938
+ };
895939
+ return;
895940
+ }
895941
+ try {
895942
+ writeOnboardingCheckMarker(shellPaths3, {
895943
+ scope: "user",
895944
+ source: "wizard",
895945
+ mode: "new",
895946
+ workspaceRoot: shellPaths3.workingDirectory
895947
+ });
895948
+ this.status = "Onboarding applied and closed.";
895949
+ this.lastActionResult = {
895950
+ kind: "refreshed",
895951
+ title: "Onboarding complete",
895952
+ detail: "Saved the user onboarding completion marker. Future normal launches start in the main conversation.",
895953
+ safety: "safe"
895954
+ };
895955
+ if (!this.context?.dismissAgentWorkspace?.())
895956
+ this.close();
895957
+ } catch (error53) {
895958
+ const detail = error53 instanceof Error ? error53.message : String(error53);
895959
+ this.status = "Onboarding completion failed.";
895960
+ this.lastActionResult = {
895961
+ kind: "error",
895962
+ title: "Onboarding completion failed",
895963
+ detail,
895964
+ safety: "safe"
895965
+ };
895966
+ }
895967
+ }
895837
895968
  selectedItemForOperation(operation) {
895838
895969
  if (operation.startsWith("memory-"))
895839
895970
  return this.selectedLocalLibraryItem("memory");
@@ -902224,6 +902355,20 @@ function setupCounts(snapshot2) {
902224
902355
  function setupStatusLabel(status) {
902225
902356
  return status === "ready" ? "Ready" : status === "recommended" ? "Recommended" : status === "blocked" ? "Blocked" : "Optional";
902226
902357
  }
902358
+ function compactText3(text, maxWidth = 104) {
902359
+ const normalized3 = text.replace(/\s+/g, " ").trim();
902360
+ if (normalized3.length === 0)
902361
+ return "";
902362
+ const firstSentence = normalized3.match(/^.*?[.!?](?:\s|$)/)?.[0]?.trim();
902363
+ const source = firstSentence && firstSentence.length <= maxWidth ? firstSentence : normalized3;
902364
+ return truncateDisplay(source, maxWidth, "...");
902365
+ }
902366
+ function actionMetaLine(action2) {
902367
+ return {
902368
+ text: `${actionCommand(action2)}; ${action2.safety}`,
902369
+ fg: action2.kind === "command" ? FULLSCREEN_PALETTE.info : safetyColor(action2)
902370
+ };
902371
+ }
902227
902372
  function setupAttentionItems(snapshot2, limit3) {
902228
902373
  return [
902229
902374
  ...snapshot2.setupChecklist.filter((item) => item.status === "blocked"),
@@ -902280,46 +902425,33 @@ function companionAccessLine(snapshot2) {
902280
902425
  const tokenState = access3.tokenReadable ? `ready sha256:${access3.tokenFingerprint ?? "unknown"}` : access3.tokenPresent ? "present but unreadable" : "missing";
902281
902426
  const error53 = access3.tokenError ? `; token read error ${access3.tokenError}` : "";
902282
902427
  return {
902283
- text: `Companion: ${access3.surface}; token ${tokenState}; QR ${access3.qrCommand}; manual token text hidden${error53}.`,
902428
+ text: `Companion: ${access3.surface}; token ${tokenState}; QR ${access3.qrCommand}${error53}.`,
902284
902429
  fg: access3.pairingReady ? FULLSCREEN_PALETTE.good : FULLSCREEN_PALETTE.warn
902285
902430
  };
902286
902431
  }
902287
- function localLibraryLines(title, items, emptyText, selectedId) {
902288
- const lines = [
902289
- { text: title, fg: FULLSCREEN_PALETTE.title, bold: true }
902290
- ];
902432
+ function compactLocalLibraryLines(title, items, emptyText, selectedId) {
902433
+ const lines = [];
902291
902434
  if (items.length === 0) {
902292
- lines.push({ text: emptyText, fg: FULLSCREEN_PALETTE.warn });
902435
+ lines.push({ text: `${title}: 0. ${emptyText}`, fg: FULLSCREEN_PALETTE.warn });
902293
902436
  return lines;
902294
902437
  }
902295
- for (const item of items.slice(0, 8)) {
902296
- const selected = item.id === selectedId;
902297
- const status = [
902298
- selected ? "selected" : "",
902299
- item.active ? "active" : "",
902300
- item.enabled === true ? "enabled" : item.enabled === false ? "disabled" : "",
902301
- item.scope && item.cls ? `${item.scope}/${item.cls}` : "",
902302
- item.confidence !== undefined ? `${item.confidence}%` : "",
902303
- item.requirementCount !== undefined && item.requirementCount > 0 ? item.missingRequirementCount && item.missingRequirementCount > 0 ? `needs ${item.missingRequirementCount}/${item.requirementCount}` : `ready ${item.requirementCount}/${item.requirementCount}` : "",
902304
- formatAgentRecordReviewState(item.reviewState),
902305
- item.source ? `origin ${item.source}` : "",
902306
- item.startCount !== undefined ? `starts ${item.startCount}` : ""
902307
- ].filter(Boolean).join(" / ");
902308
- const tags = item.tags.length > 0 ? ` tags ${item.tags.join(",")}` : "";
902309
- const triggers = item.triggers.length > 0 ? ` triggers ${item.triggers.join(",")}` : "";
902310
- const marker = selected ? `${GLYPHS.navigation.selected} ` : "";
902311
- lines.push({
902312
- text: `${marker}${item.id}: ${item.name} (${status})`,
902313
- fg: item.reviewState === "stale" ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.info,
902314
- bold: selected || item.active === true
902315
- });
902316
- lines.push({ text: ` ${item.description}${tags}${triggers}`, fg: FULLSCREEN_PALETTE.muted });
902317
- if (item.missingRequirements && item.missingRequirements.length > 0) {
902318
- lines.push({ text: ` missing setup: ${item.missingRequirements.join(", ")}`, fg: FULLSCREEN_PALETTE.warn });
902319
- }
902320
- }
902321
- if (items.length > 8) {
902322
- lines.push({ text: `${items.length - 8} more item(s). Open the library command for the full list.`, fg: FULLSCREEN_PALETTE.dim });
902438
+ const selected = items.find((item) => item.id === selectedId) ?? items[0];
902439
+ const status = [
902440
+ selected.active ? "active" : "",
902441
+ selected.enabled === true ? "enabled" : selected.enabled === false ? "disabled" : "",
902442
+ selected.scope && selected.cls ? `${selected.scope}/${selected.cls}` : "",
902443
+ selected.confidence !== undefined ? `${selected.confidence}%` : "",
902444
+ selected.requirementCount !== undefined && selected.requirementCount > 0 ? selected.missingRequirementCount && selected.missingRequirementCount > 0 ? `needs ${selected.missingRequirementCount}/${selected.requirementCount}` : `ready ${selected.requirementCount}/${selected.requirementCount}` : "",
902445
+ formatAgentRecordReviewState(selected.reviewState),
902446
+ selected.startCount !== undefined ? `starts ${selected.startCount}` : ""
902447
+ ].filter(Boolean).join(", ");
902448
+ lines.push({
902449
+ text: `${title}: ${items.length}; selected ${selected.name}${status ? ` (${status})` : ""}.`,
902450
+ fg: selected.reviewState === "stale" ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.info,
902451
+ bold: selected.active === true
902452
+ });
902453
+ if (selected.missingRequirements && selected.missingRequirements.length > 0) {
902454
+ lines.push({ text: `Missing setup: ${selected.missingRequirements.join(", ")}`, fg: FULLSCREEN_PALETTE.warn });
902323
902455
  }
902324
902456
  return lines;
902325
902457
  }
@@ -902354,23 +902486,18 @@ function routineNextActionLine(snapshot2) {
902354
902486
  }
902355
902487
  return { text: "Next routine action: Start selected in the main conversation, inspect receipts, or reconcile connected schedules.", fg: FULLSCREEN_PALETTE.info, bold: true };
902356
902488
  }
902357
- function routineScheduleReceiptLines(snapshot2) {
902489
+ function compactRoutineReceiptLine(snapshot2) {
902358
902490
  const latest = snapshot2.latestRoutineScheduleReceipt;
902359
- const lines = [
902360
- {
902361
- text: `Promotion receipts: ${snapshot2.routineScheduleReceiptCount}; created: ${snapshot2.successfulRoutineScheduleReceiptCount}; failed: ${snapshot2.failedRoutineScheduleReceiptCount}`,
902362
- fg: snapshot2.failedRoutineScheduleReceiptCount > 0 ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.info
902363
- }
902364
- ];
902365
- if (latest) {
902366
- lines.push({
902367
- text: `Latest receipt: ${latest.id} ${latest.status} routine=${latest.routineId} schedule="${latest.scheduleName}" ${latest.scheduleKind} ${latest.scheduleValue}`,
902368
- fg: latest.status === "failed" ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.good
902369
- });
902370
- } else {
902371
- lines.push({ text: "No schedule promotion receipts yet. Confirm a routine promotion from Automation when ready.", fg: FULLSCREEN_PALETTE.muted });
902491
+ if (!latest) {
902492
+ return {
902493
+ text: `Promotion receipts: ${snapshot2.routineScheduleReceiptCount}; none created yet.`,
902494
+ fg: FULLSCREEN_PALETTE.muted
902495
+ };
902372
902496
  }
902373
- return lines;
902497
+ return {
902498
+ text: `Promotion receipts: ${snapshot2.routineScheduleReceiptCount}; latest ${latest.status} ${latest.routineId}.`,
902499
+ fg: latest.status === "failed" ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.good
902500
+ };
902374
902501
  }
902375
902502
  function automationNextActionLine(snapshot2) {
902376
902503
  const ready = readyRoutineItems(snapshot2);
@@ -902390,55 +902517,6 @@ function automationNextActionLine(snapshot2) {
902390
902517
  }
902391
902518
  return { text: "Next automation action: Create a reminder, or create/import a routine before recurring workflow promotion.", fg: FULLSCREEN_PALETTE.warn, bold: true };
902392
902519
  }
902393
- function profileLines(snapshot2) {
902394
- const lines = [
902395
- { text: "Agent Profiles", fg: FULLSCREEN_PALETTE.title, bold: true }
902396
- ];
902397
- if (snapshot2.runtimeProfiles.length === 0) {
902398
- lines.push({ text: "No isolated Agent profiles yet. Use Create Agent profile in this workspace.", fg: FULLSCREEN_PALETTE.warn });
902399
- return lines;
902400
- }
902401
- for (const profile5 of snapshot2.runtimeProfiles.slice(0, 6)) {
902402
- const starter = profile5.starterTemplateId ? ` starter=${profile5.starterTemplateId}` : " starter=none";
902403
- const created = profile5.createdAt ? ` created ${profile5.createdAt.slice(0, 10)}` : "";
902404
- const states = [
902405
- profile5.id === snapshot2.activeRuntimeProfile ? "active" : "",
902406
- profile5.id === snapshot2.selectedRuntimeProfile ? "default" : ""
902407
- ].filter(Boolean).join(", ");
902408
- const stateText = states ? ` [${states}]` : "";
902409
- lines.push({
902410
- text: `${profile5.id}${stateText}${starter}${created}`,
902411
- fg: profile5.id === snapshot2.selectedRuntimeProfile ? FULLSCREEN_PALETTE.good : FULLSCREEN_PALETTE.info,
902412
- bold: profile5.id === snapshot2.activeRuntimeProfile || profile5.id === snapshot2.selectedRuntimeProfile
902413
- });
902414
- lines.push({ text: ` home: ${profile5.homeDirectory}`, fg: FULLSCREEN_PALETTE.muted });
902415
- }
902416
- if (snapshot2.runtimeProfiles.length > 6) {
902417
- lines.push({ text: `${snapshot2.runtimeProfiles.length - 6} more profile(s).`, fg: FULLSCREEN_PALETTE.dim });
902418
- }
902419
- return lines;
902420
- }
902421
- function starterTemplateLines(snapshot2) {
902422
- const lines = [
902423
- { text: "Starter Templates", fg: FULLSCREEN_PALETTE.title, bold: true }
902424
- ];
902425
- for (const template of snapshot2.runtimeStarterTemplates.slice(0, 6)) {
902426
- const origin = template.source === "local" ? "Local" : formatAgentRecordSource(template.source);
902427
- lines.push({
902428
- text: `${template.id}: ${template.name} [${origin}]`,
902429
- fg: template.source === "local" ? FULLSCREEN_PALETTE.good : FULLSCREEN_PALETTE.info,
902430
- bold: template.id === "research"
902431
- });
902432
- lines.push({
902433
- text: ` ${template.description} Persona ${template.personaName}; skills ${template.skillNames.join(", ")}; routines ${template.routineNames.join(", ")}.`,
902434
- fg: FULLSCREEN_PALETTE.muted
902435
- });
902436
- }
902437
- if (snapshot2.runtimeStarterTemplates.length > 6) {
902438
- lines.push({ text: `${snapshot2.runtimeStarterTemplates.length - 6} more starter template(s).`, fg: FULLSCREEN_PALETTE.dim });
902439
- }
902440
- return lines;
902441
- }
902442
902520
  function snapshotLines(workspace, category, snapshot2) {
902443
902521
  if (!snapshot2)
902444
902522
  return [{ text: "Runtime context is not loaded yet.", fg: FULLSCREEN_PALETTE.warn }];
@@ -902449,92 +902527,52 @@ function snapshotLines(workspace, category, snapshot2) {
902449
902527
  base2.push(...setupOverviewLines(snapshot2));
902450
902528
  } else if (category.id === "artifacts") {
902451
902529
  const mediaReady = snapshot2.voiceMediaReadiness.readyMediaProviderCount;
902452
- base2.push({ text: `Chat route: ${snapshot2.provider} / ${snapshot2.modelDisplayName}`, fg: FULLSCREEN_PALETTE.info }, { text: `Agent Knowledge route: ${snapshot2.knowledgeRoute}`, fg: FULLSCREEN_PALETTE.info }, { text: `Media providers: ${mediaReady}/${snapshot2.mediaProviderCount} ready; generation-capable ${snapshot2.mediaGenerationProviderCount}.`, fg: mediaReady > 0 ? FULLSCREEN_PALETTE.good : FULLSCREEN_PALETTE.warn }, { text: "Use this area for concrete files and generated output: attach images, export transcripts, ingest reviewed sources, inspect source records, and generate media.", fg: FULLSCREEN_PALETTE.good }, { text: "Agent Knowledge ingest writes only to the isolated Agent segment. Default knowledge and non-Agent routes are not fallback storage.", fg: FULLSCREEN_PALETTE.warn }, { text: "Generated media is stored as artifacts and referenced by id; the TUI should not print inline base64.", fg: FULLSCREEN_PALETTE.muted }, { text: `Workspace path: ${snapshot2.workingDirectory}`, fg: FULLSCREEN_PALETTE.muted });
902530
+ base2.push({ text: `Chat: ${snapshot2.provider} / ${snapshot2.modelDisplayName}; Knowledge: ${snapshot2.knowledgeRoute}`, fg: FULLSCREEN_PALETTE.info }, { text: `Media: ${mediaReady}/${snapshot2.mediaProviderCount} ready; generation ${snapshot2.mediaGenerationProviderCount}.`, fg: mediaReady > 0 ? FULLSCREEN_PALETTE.good : FULLSCREEN_PALETTE.warn }, { text: "Files: attach, export, inspect, ingest reviewed sources, or generate media.", fg: FULLSCREEN_PALETTE.good }, { text: "Knowledge ingest and media generation require explicit actions.", fg: FULLSCREEN_PALETTE.warn });
902453
902531
  } else if (category.id === "channels") {
902454
902532
  const enabledCount = snapshot2.channels.filter((channel) => channel.enabled).length;
902455
902533
  const readyCount = snapshot2.channels.filter((channel) => channel.ready).length;
902456
902534
  const configuredDefaults = snapshot2.channels.filter((channel) => channel.defaultTarget === "configured").length;
902457
- const readyChannels = snapshot2.channels.filter((channel) => channel.ready).map((channel) => channel.label);
902458
902535
  const needsTarget = snapshot2.channels.filter((channel) => channel.setupState === "needs-target");
902459
902536
  const needsConfig = snapshot2.channels.filter((channel) => channel.setupState === "needs-config");
902460
902537
  const nextAttentionChannel = needsConfig[0] ?? needsTarget[0] ?? snapshot2.channels.find((channel) => !channel.enabled);
902461
- const disabledChannels = snapshot2.channels.filter((channel) => !channel.enabled).map((channel) => channel.label);
902462
- const disabledPreview = disabledChannels.slice(0, 6).join(", ");
902463
- const disabledSuffix = disabledChannels.length > 6 ? `, +${disabledChannels.length - 6} more` : "";
902464
- const orderedChannels = [
902465
- ...snapshot2.channels.filter((channel) => channel.enabled),
902466
- ...snapshot2.channels.filter((channel) => !channel.enabled)
902467
- ].slice(0, 3);
902468
- base2.push({ text: `GoodVibes API: ${snapshot2.runtimeBaseUrl}`, fg: FULLSCREEN_PALETTE.info }, companionAccessLine(snapshot2), { text: `Readiness: ${readyCount}/${snapshot2.channels.length} ready; ${enabledCount} enabled; ${configuredDefaults} default target(s) configured.`, fg: FULLSCREEN_PALETTE.info }, { text: "Setup path: pair companion -> inspect readiness -> review accounts/policies/status -> fix one channel -> add explicit notification target if needed.", fg: FULLSCREEN_PALETTE.good }, { text: `Next channel action: ${nextAttentionChannel ? `${nextAttentionChannel.label} - ${nextAttentionChannel.nextStep}` : "All enabled channels are ready; keep delivery explicit and review policies before sending."}`, fg: nextAttentionChannel ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.good }, { text: `Ready channels: ${readyChannels.join(", ") || "none"}.`, fg: readyChannels.length > 0 ? FULLSCREEN_PALETTE.good : FULLSCREEN_PALETTE.warn }, { text: `Needs default target: ${needsTarget.map((channel) => `${channel.label} -> ${channel.defaultTargetKeys.join("|")}`).join(", ") || "none"}.`, fg: needsTarget.length > 0 ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.muted }, { text: `Needs config: ${needsConfig.map((channel) => `${channel.label} -> ${channel.missingRequiredKeys.join("|")}`).join(", ") || "none"}.`, fg: needsConfig.length > 0 ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.muted }, { text: `Disabled channels: ${disabledPreview || "none"}${disabledSuffix}.`, fg: FULLSCREEN_PALETTE.dim }, { text: "Safety: no secret values; sends and public exposure require explicit user action and Agent policy.", fg: FULLSCREEN_PALETTE.warn });
902469
- for (const channel of orderedChannels) {
902470
- const ready = channel.ready ? "ready" : `${channel.missingConfigCount} missing`;
902471
- base2.push({
902472
- text: `${channel.label}: ${channel.setupState}; ${ready}; target ${channel.defaultTarget}; delivery ${channel.delivery}; risk ${channel.risk}.`,
902473
- fg: channel.ready ? FULLSCREEN_PALETTE.good : channel.enabled ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.dim
902474
- });
902475
- }
902538
+ base2.push({ text: `API: ${snapshot2.runtimeBaseUrl}`, fg: FULLSCREEN_PALETTE.info }, companionAccessLine(snapshot2), { text: `Channels: ${readyCount}/${snapshot2.channels.length} ready; ${enabledCount} enabled; ${configuredDefaults} target(s).`, fg: FULLSCREEN_PALETTE.info }, { text: `Next: ${nextAttentionChannel ? `${nextAttentionChannel.label} - ${compactText3(nextAttentionChannel.nextStep)}` : "All enabled channels ready."}`, fg: nextAttentionChannel ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.good }, { text: "Safety: secrets hidden; sends require explicit action.", fg: FULLSCREEN_PALETTE.warn });
902476
902539
  } else if (category.id === "knowledge") {
902477
- base2.push({ text: `Route family: ${snapshot2.knowledgeRoute}/{status,ask,search}`, fg: FULLSCREEN_PALETTE.info }, { text: `Isolation: ${snapshot2.knowledgeIsolation}; no default knowledge or non-Agent fallback`, fg: FULLSCREEN_PALETTE.good }, { text: "Ingest: URL, URL-list, and bookmark imports require explicit --yes and write only to Agent Knowledge.", fg: FULLSCREEN_PALETTE.info }, { text: "Review: queue, issues, candidates, reports, reindex, and consolidation stay inside the Agent segment.", fg: FULLSCREEN_PALETTE.muted }, { text: "Agent-owned content appears here only after explicit Agent knowledge ingestion.", fg: FULLSCREEN_PALETTE.muted });
902540
+ base2.push({ text: `Route: ${snapshot2.knowledgeRoute}; isolation ${snapshot2.knowledgeIsolation}.`, fg: FULLSCREEN_PALETTE.info }, { text: "Ask/search, ingest, review, reindex, and reports stay Agent-owned.", fg: FULLSCREEN_PALETTE.good }, { text: "Ingest requires explicit confirmation.", fg: FULLSCREEN_PALETTE.warn });
902478
902541
  } else if (category.id === "research") {
902479
- base2.push({ text: `Chat route: ${snapshot2.provider} / ${snapshot2.modelDisplayName}`, fg: FULLSCREEN_PALETTE.info }, { text: `Agent Knowledge route: ${snapshot2.knowledgeRoute}`, fg: FULLSCREEN_PALETTE.info }, { text: `Browser tools: ${snapshot2.voiceMediaReadiness.browserToolState}; public base URL ${snapshot2.browserToolPublicBaseUrl}.`, fg: snapshot2.browserToolExposureEnabled ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.muted }, { text: snapshot2.voiceMediaReadiness.browserToolNextStep, fg: FULLSCREEN_PALETTE.muted }, { text: "Research requests are submitted to the main conversation. Agent may use connected read-only web tools when the user asks.", fg: FULLSCREEN_PALETTE.good }, { text: "URL references and web research do not ingest into Agent Knowledge. Ingestion is a separate confirmed Agent Knowledge action.", fg: FULLSCREEN_PALETTE.warn }, { text: "Use Agent Knowledge ask/search first for known source-backed context; use web research for current or external sources.", fg: FULLSCREEN_PALETTE.info }, { text: "External sends, browser-side effects, package installs, and connected-host mutations are outside this read-only research lane.", fg: FULLSCREEN_PALETTE.warn });
902542
+ base2.push({ text: `Chat: ${snapshot2.provider} / ${snapshot2.modelDisplayName}; Knowledge: ${snapshot2.knowledgeRoute}`, fg: FULLSCREEN_PALETTE.info }, { text: `Browser: ${snapshot2.voiceMediaReadiness.browserToolState}; public URL ${snapshot2.browserToolPublicBaseUrl}.`, fg: snapshot2.browserToolExposureEnabled ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.muted }, { text: "Research is read-only. Knowledge ingest is a separate confirmed action.", fg: FULLSCREEN_PALETTE.good }, { text: compactText3(snapshot2.voiceMediaReadiness.browserToolNextStep), fg: FULLSCREEN_PALETTE.muted });
902480
902543
  } else if (category.id === "tools") {
902481
- base2.push({ text: `MCP servers: ${snapshot2.mcpConnectedServerCount}/${snapshot2.mcpServerCount} connected; quarantined ${snapshot2.mcpQuarantinedServerCount}; allow-all ${snapshot2.mcpAllowAllServerCount}.`, fg: snapshot2.mcpQuarantinedServerCount > 0 || snapshot2.mcpAllowAllServerCount > 0 ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.info }, { text: "Open MCP workspace for live server status, tool inventory, config paths, and confirmed add/remove/reload actions.", fg: FULLSCREEN_PALETTE.info }, { text: "Add/update requires typed confirmation and dispatches through the TUI command router.", fg: FULLSCREEN_PALETTE.good }, { text: "Trust changes remain explicit; allow-all is kept behind the settings workspace.", fg: FULLSCREEN_PALETTE.warn }, { text: "Useful first actions: /mcp review, /mcp tools, /mcp config, and Add MCP server.", fg: FULLSCREEN_PALETTE.muted }, { text: "Normal assistant chat can use tools serially when policy allows; onboarding does not start hidden tool work.", fg: FULLSCREEN_PALETTE.muted });
902544
+ base2.push({ text: `MCP servers: ${snapshot2.mcpConnectedServerCount}/${snapshot2.mcpServerCount} connected; quarantined ${snapshot2.mcpQuarantinedServerCount}; allow-all ${snapshot2.mcpAllowAllServerCount}.`, fg: snapshot2.mcpQuarantinedServerCount > 0 || snapshot2.mcpAllowAllServerCount > 0 ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.info }, { text: "Add/update/reload and trust changes require confirmation.", fg: FULLSCREEN_PALETTE.good }, { text: "Start: /mcp review, /mcp tools, /mcp config, Add MCP server.", fg: FULLSCREEN_PALETTE.muted });
902482
902545
  } else if (category.id === "voice-media") {
902483
902546
  const readiness = snapshot2.voiceMediaReadiness;
902484
- const voiceRows = readiness.voiceProviders.slice(0, 6);
902485
- const mediaRows = readiness.mediaProviders.slice(0, 6);
902486
- base2.push({ text: `Voice providers: ${snapshot2.voiceProviderCount}; streaming TTS: ${snapshot2.voiceStreamingProviderCount}; STT: ${snapshot2.voiceSttProviderCount}; realtime: ${snapshot2.voiceRealtimeProviderCount}.`, fg: FULLSCREEN_PALETTE.info }, { text: `Voice interaction: ${snapshot2.voiceSurfaceEnabled ? "enabled" : "disabled"}; ready providers ${readiness.readyVoiceProviderCount}/${snapshot2.voiceProviderCount}.`, fg: snapshot2.voiceSurfaceEnabled ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.muted }, { text: `TTS config: provider ${snapshot2.ttsProvider}; voice ${snapshot2.ttsVoice}; response model ${snapshot2.ttsResponseModel}.`, fg: FULLSCREEN_PALETTE.info }, { text: `Selected TTS readiness: ${readiness.selectedTtsProviderLabel} -> ${readiness.selectedTtsProviderStatus}; voice ${readiness.ttsVoiceConfigured ? "configured" : "default"}; response route ${readiness.ttsResponseRouteConfigured ? "configured" : "chat route"}.`, fg: readiness.selectedTtsProviderStatus === "ready" ? FULLSCREEN_PALETTE.good : FULLSCREEN_PALETTE.warn }, { text: `Media providers: ${snapshot2.mediaProviderCount}; understanding: ${snapshot2.mediaUnderstandingProviderCount}; generation: ${snapshot2.mediaGenerationProviderCount}.`, fg: FULLSCREEN_PALETTE.info }, { text: `Ready media providers: ${readiness.readyMediaProviderCount}/${snapshot2.mediaProviderCount}.`, fg: readiness.readyMediaProviderCount > 0 ? FULLSCREEN_PALETTE.good : FULLSCREEN_PALETTE.warn }, { text: `Browser tools: ${readiness.browserToolState}; public base URL ${snapshot2.browserToolPublicBaseUrl}.`, fg: snapshot2.browserToolExposureEnabled ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.muted }, { text: readiness.browserToolNextStep, fg: FULLSCREEN_PALETTE.muted }, { text: "Voice provider readiness", fg: FULLSCREEN_PALETTE.title, bold: true });
902487
- for (const provider5 of voiceRows) {
902488
- const selected = provider5.selected ? "selected; " : "";
902489
- const missing = provider5.missingSecretKeyOptions.length > 0 ? `; needs ${provider5.missingSecretKeyOptions.join("|")}` : "";
902490
- base2.push({
902491
- text: `${provider5.label}: ${selected}${provider5.setupState}; ${provider5.features.join(", ") || "registered"}${missing}.`,
902492
- fg: provider5.setupState === "ready" ? FULLSCREEN_PALETTE.good : provider5.setupState === "needs-secret" ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.muted
902493
- });
902494
- }
902495
- if (snapshot2.voiceProviderCount > voiceRows.length)
902496
- base2.push({ text: `${snapshot2.voiceProviderCount - voiceRows.length} more voice provider(s).`, fg: FULLSCREEN_PALETTE.dim });
902497
- base2.push({ text: "Media provider readiness", fg: FULLSCREEN_PALETTE.title, bold: true });
902498
- for (const provider5 of mediaRows) {
902499
- const missing = provider5.missingSecretKeyOptions.length > 0 ? `; needs ${provider5.missingSecretKeyOptions.join("|")}` : "";
902500
- base2.push({
902501
- text: `${provider5.label}: ${provider5.setupState}; ${provider5.features.join(", ") || "registered"}${missing}.`,
902502
- fg: provider5.setupState === "ready" ? FULLSCREEN_PALETTE.good : provider5.setupState === "needs-secret" ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.muted
902503
- });
902504
- }
902505
- if (snapshot2.mediaProviderCount > mediaRows.length)
902506
- base2.push({ text: `${snapshot2.mediaProviderCount - mediaRows.length} more media provider(s).`, fg: FULLSCREEN_PALETTE.dim });
902507
- for (const step of readiness.nextSteps.slice(0, 4))
902508
- base2.push({ text: `Next: ${step}`, fg: FULLSCREEN_PALETTE.info });
902509
- base2.push({ text: "No secret values are rendered. Voice, browser, and generated media side effects require explicit user action.", fg: FULLSCREEN_PALETTE.warn }, { text: "Image input uses prompt attachments; media generation/provider setup stays behind explicit commands and configured providers.", fg: FULLSCREEN_PALETTE.muted });
902547
+ base2.push({ text: `Voice: ${readiness.readyVoiceProviderCount}/${snapshot2.voiceProviderCount} ready; TTS ${snapshot2.ttsProvider}; voice ${snapshot2.ttsVoice}.`, fg: readiness.readyVoiceProviderCount > 0 ? FULLSCREEN_PALETTE.good : FULLSCREEN_PALETTE.warn }, { text: `Media: ${readiness.readyMediaProviderCount}/${snapshot2.mediaProviderCount} ready; generation ${snapshot2.mediaGenerationProviderCount}.`, fg: readiness.readyMediaProviderCount > 0 ? FULLSCREEN_PALETTE.good : FULLSCREEN_PALETTE.warn }, { text: `Browser: ${readiness.browserToolState}; public URL ${snapshot2.browserToolPublicBaseUrl}.`, fg: snapshot2.browserToolExposureEnabled ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.muted }, { text: readiness.nextSteps[0] ? `Next: ${compactText3(readiness.nextSteps[0])}` : "Next: voice/media setup is ready.", fg: readiness.nextSteps.length > 0 ? FULLSCREEN_PALETTE.info : FULLSCREEN_PALETTE.good }, { text: "Secrets hidden; voice, browser, and media side effects require explicit action.", fg: FULLSCREEN_PALETTE.warn });
902510
902548
  } else if (category.id === "profiles") {
902511
902549
  const defaultProfile = snapshot2.selectedRuntimeProfile ? `${snapshot2.selectedRuntimeProfile}${snapshot2.selectedRuntimeProfileExists ? "" : " (missing)"}` : "(base Agent home)";
902512
- base2.push({ text: `Active Agent profile: ${snapshot2.activeRuntimeProfile}`, fg: FULLSCREEN_PALETTE.info }, { text: `Default for next launch: ${defaultProfile}`, fg: snapshot2.selectedRuntimeProfileExists || !snapshot2.selectedRuntimeProfile ? FULLSCREEN_PALETTE.info : FULLSCREEN_PALETTE.warn }, { text: `Agent profiles under this home: ${snapshot2.runtimeProfileCount}`, fg: FULLSCREEN_PALETTE.info }, { text: `Starter templates: ${snapshot2.runtimeStarterTemplateCount}; local custom: ${snapshot2.localStarterTemplateCount}`, fg: FULLSCREEN_PALETTE.info }, { text: `Starter ids: ${snapshot2.runtimeStarterTemplates.map((template) => template.id).join(", ") || "none"}`, fg: FULLSCREEN_PALETTE.info }, { text: "Starter Templates", fg: FULLSCREEN_PALETTE.title, bold: true }, { text: `Agent profile root: ${snapshot2.runtimeProfileRoot}`, fg: FULLSCREEN_PALETTE.muted }, { text: "" }, ...profileLines(snapshot2), { text: "" }, ...starterTemplateLines(snapshot2), { text: "" }, { text: "Named Agent profiles isolate local config, sessions, memory, personas, skills, routines, setup, and bundles.", fg: FULLSCREEN_PALETTE.good }, { text: "Starter authoring: browse, export, edit, import, and create Agent profiles from inside this workspace.", fg: FULLSCREEN_PALETTE.info }, { text: "The connected GoodVibes host stays shared unless that host is configured separately.", fg: FULLSCREEN_PALETTE.warn }, { text: "Portable bundles require explicit export/import commands with real paths and --yes.", fg: FULLSCREEN_PALETTE.muted });
902550
+ base2.push({ text: `Profiles: active ${snapshot2.activeRuntimeProfile}; default ${defaultProfile}.`, fg: snapshot2.selectedRuntimeProfileExists || !snapshot2.selectedRuntimeProfile ? FULLSCREEN_PALETTE.info : FULLSCREEN_PALETTE.warn }, { text: `Local profiles: ${snapshot2.runtimeProfileCount}; starters ${snapshot2.runtimeStarterTemplateCount}; custom ${snapshot2.localStarterTemplateCount}.`, fg: FULLSCREEN_PALETTE.info }, { text: `Starter ids: ${truncateDisplay(snapshot2.runtimeStarterTemplates.map((template) => template.id).join(", ") || "none", 96, "...")}`, fg: FULLSCREEN_PALETTE.muted }, { text: "Profiles isolate local Agent config, sessions, memory, personas, skills, routines, setup, and bundles.", fg: FULLSCREEN_PALETTE.good });
902513
902551
  } else if (category.id === "memory") {
902514
- base2.push({ text: `Session memories: ${snapshot2.sessionMemoryCount}`, fg: FULLSCREEN_PALETTE.info }, { text: `Agent memory: ${snapshot2.localMemoryCount}; prompt-active: ${snapshot2.localMemoryPromptActiveCount}; review queue: ${snapshot2.localMemoryReviewQueueCount}`, fg: FULLSCREEN_PALETTE.info }, { text: `Scratchpad notes: ${snapshot2.localNoteCount}; review queue: ${snapshot2.localNoteReviewQueueCount}`, fg: FULLSCREEN_PALETTE.info }, { text: `Local routines: ${snapshot2.localRoutineCount}; enabled: ${snapshot2.enabledRoutineCount}`, fg: FULLSCREEN_PALETTE.info }, { text: `Local skills: ${snapshot2.localSkillCount}; enabled: ${snapshot2.enabledSkillCount}; bundles: ${snapshot2.localSkillBundleCount}; active skills: ${snapshot2.activeSkillCount}`, fg: FULLSCREEN_PALETTE.info }, { text: `Local personas: ${snapshot2.localPersonaCount}; active: ${snapshot2.activePersonaName}`, fg: FULLSCREEN_PALETTE.info }, { text: "Durable memory, scratchpad notes, routines, skills, and personas remain Agent-local until shared registry contracts exist.", fg: FULLSCREEN_PALETTE.good }, { text: "Secrets are rejected/redacted; store secret references instead of secret values.", fg: FULLSCREEN_PALETTE.warn }, { text: "" }, ...localLibraryLines("Agent Memory", snapshot2.localMemories, "No Agent memory yet. Create one here with Create memory.", workspace.selectedLocalLibraryItem("memory")?.id ?? null));
902552
+ base2.push({ text: `Memory: ${snapshot2.localMemoryCount}; prompt ${snapshot2.localMemoryPromptActiveCount}; queue ${snapshot2.localMemoryReviewQueueCount}; session ${snapshot2.sessionMemoryCount}.`, fg: FULLSCREEN_PALETTE.info }, { text: `Notes: ${snapshot2.localNoteCount}; skills ${snapshot2.localSkillCount}/${snapshot2.enabledSkillCount}; routines ${snapshot2.localRoutineCount}/${snapshot2.enabledRoutineCount}; personas ${snapshot2.localPersonaCount}.`, fg: FULLSCREEN_PALETTE.info }, { text: `Active persona: ${snapshot2.activePersonaName}.`, fg: FULLSCREEN_PALETTE.info }, ...compactLocalLibraryLines("Agent Memory", snapshot2.localMemories, "Create one with Create memory.", workspace.selectedLocalLibraryItem("memory")?.id ?? null), { text: "Secrets are rejected or redacted; use secret references.", fg: FULLSCREEN_PALETTE.warn });
902515
902553
  } else if (category.id === "notes") {
902516
- base2.push({ text: `Scratchpad notes: ${snapshot2.localNoteCount}; review queue: ${snapshot2.localNoteReviewQueueCount}`, fg: FULLSCREEN_PALETTE.info }, { text: "Notes are Agent-local working context for source triage, temporary decisions, and operator handoff.", fg: FULLSCREEN_PALETTE.good }, { text: "Notes do not become memory and are not ingested into Agent Knowledge unless the user takes a separate explicit action.", fg: FULLSCREEN_PALETTE.warn }, { text: "Use reviewed notes to prefill durable memory, skills, routines, or personas, or to decide that a reviewed source deserves Agent Knowledge ingest.", fg: FULLSCREEN_PALETTE.muted }, { text: "" }, ...localLibraryLines("Scratchpad Notes", snapshot2.localNotes, "No local notes yet. Create one here with Create note.", workspace.selectedLocalLibraryItem("note")?.id ?? null));
902554
+ base2.push({ text: `Scratchpad notes: ${snapshot2.localNoteCount}; review queue: ${snapshot2.localNoteReviewQueueCount}`, fg: FULLSCREEN_PALETTE.info }, ...compactLocalLibraryLines("Scratchpad Notes", snapshot2.localNotes, "Create one with Create note.", workspace.selectedLocalLibraryItem("note")?.id ?? null), { text: "Notes stay local unless promoted by explicit action.", fg: FULLSCREEN_PALETTE.warn });
902517
902555
  } else if (category.id === "personas") {
902518
- base2.push({ text: `Personas: ${snapshot2.localPersonaCount}; active: ${snapshot2.activePersonaName}`, fg: FULLSCREEN_PALETTE.info }, { text: "Personas are local behavior profiles for the serial main-conversation assistant, not separate Agent jobs.", fg: FULLSCREEN_PALETTE.good }, { text: "Use them for tone, role, domain constraints, tool posture, and repeatable operating preferences.", fg: FULLSCREEN_PALETTE.muted }, { text: "" }, ...localLibraryLines("Persona Library", snapshot2.localPersonas, "No local personas yet. Create one here with Create persona.", workspace.selectedLocalLibraryItem("persona")?.id ?? null));
902556
+ base2.push({ text: `Personas: ${snapshot2.localPersonaCount}; active: ${snapshot2.activePersonaName}`, fg: FULLSCREEN_PALETTE.info }, ...compactLocalLibraryLines("Persona Library", snapshot2.localPersonas, "Create one with Create persona.", workspace.selectedLocalLibraryItem("persona")?.id ?? null), { text: "Personas shape the serial main-conversation assistant.", fg: FULLSCREEN_PALETTE.good });
902519
902557
  } else if (category.id === "skills") {
902520
- base2.push({ text: `Skills: ${snapshot2.localSkillCount}; enabled: ${snapshot2.enabledSkillCount}; bundles: ${snapshot2.localSkillBundleCount}; enabled bundles: ${snapshot2.enabledSkillBundleCount}; active skills: ${snapshot2.activeSkillCount}`, fg: FULLSCREEN_PALETTE.info }, { text: "Skills are reusable local procedures the assistant can apply from the main conversation.", fg: FULLSCREEN_PALETTE.good }, { text: "Enabled skills and enabled bundles are injected as operating guidance; secret-looking content is rejected.", fg: FULLSCREEN_PALETTE.warn }, { text: "" }, ...localLibraryLines("Skill Library", snapshot2.localSkills, "No local skills yet. Create one here with Create skill.", workspace.selectedLocalLibraryItem("skill")?.id ?? null), { text: "" }, ...localLibraryLines("Skill Bundles", snapshot2.localSkillBundles, "No local skill bundles yet. Use Skill bundles and Create bundle after creating skills.", null));
902558
+ base2.push({ text: `Skills: ${snapshot2.localSkillCount}; enabled: ${snapshot2.enabledSkillCount}; bundles: ${snapshot2.localSkillBundleCount}; enabled bundles: ${snapshot2.enabledSkillBundleCount}; active skills: ${snapshot2.activeSkillCount}`, fg: FULLSCREEN_PALETTE.info }, ...compactLocalLibraryLines("Skill Library", snapshot2.localSkills, "Create one with Create skill.", workspace.selectedLocalLibraryItem("skill")?.id ?? null), ...compactLocalLibraryLines("Skill Bundles", snapshot2.localSkillBundles, "Create one after adding skills.", null), { text: "Enabled skills/bundles become operating guidance; secrets are rejected.", fg: FULLSCREEN_PALETTE.warn });
902521
902559
  } else if (category.id === "routines") {
902522
902560
  const ready = readyRoutineItems(snapshot2);
902523
902561
  const needsSetup = routinesNeedingSetup(snapshot2);
902524
902562
  const needsReview = routinesNeedingReview(snapshot2);
902525
- base2.push({ text: `Routines: ${snapshot2.localRoutineCount}; enabled: ${snapshot2.enabledRoutineCount}`, fg: FULLSCREEN_PALETTE.info }, { text: `Schedule-ready routines: ${ready.length}; setup gaps: ${needsSetup.length}; review needed: ${needsReview.length}`, fg: needsSetup.length > 0 || needsReview.length > 0 ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.good }, { text: "Routines are repeatable main-conversation workflows. Starting one does not create hidden jobs.", fg: FULLSCREEN_PALETTE.good }, { text: "Scheduling a reviewed routine is explicit and requires a confirmed schedule command.", fg: FULLSCREEN_PALETTE.warn }, routineNextActionLine(snapshot2), ...routineScheduleReceiptLines(snapshot2), { text: "" }, ...localLibraryLines("Routine Library", snapshot2.localRoutines, "No local routines yet. Create one here with Create routine.", workspace.selectedLocalLibraryItem("routine")?.id ?? null));
902563
+ base2.push({ text: `Routines: ${snapshot2.localRoutineCount}; enabled: ${snapshot2.enabledRoutineCount}`, fg: FULLSCREEN_PALETTE.info }, { text: `Schedule-ready routines: ${ready.length}; setup gaps: ${needsSetup.length}; review needed: ${needsReview.length}`, fg: needsSetup.length > 0 || needsReview.length > 0 ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.good }, routineNextActionLine(snapshot2), compactRoutineReceiptLine(snapshot2), ...compactLocalLibraryLines("Routine Library", snapshot2.localRoutines, "Create one with Create routine.", workspace.selectedLocalLibraryItem("routine")?.id ?? null), { text: "Scheduling requires a confirmed action.", fg: FULLSCREEN_PALETTE.warn });
902526
902564
  } else if (category.id === "work") {
902527
- base2.push({ text: "Work plan and approvals are read or explicitly confirmed through public operator routes.", fg: FULLSCREEN_PALETTE.info }, { text: "This workspace does not approve, deny, cancel, or mutate requests by selection alone.", fg: FULLSCREEN_PALETTE.good }, { text: "Approve, deny, and cancel forms require an approval id and typed confirmation.", fg: FULLSCREEN_PALETTE.warn });
902565
+ base2.push({ text: "Work plans and approvals are read or explicitly confirmed.", fg: FULLSCREEN_PALETTE.info }, { text: "Selection alone does not approve, deny, cancel, or mutate requests.", fg: FULLSCREEN_PALETTE.good }, { text: "Approval actions require id plus typed confirmation.", fg: FULLSCREEN_PALETTE.warn });
902528
902566
  } else if (category.id === "automation") {
902529
902567
  const ready = readyRoutineItems(snapshot2);
902530
- base2.push({ text: "Automation and schedules default to read-only observability; side effects require confirmed forms.", fg: FULLSCREEN_PALETTE.info }, { text: "Confirmed reminders and routine promotion use connected schedules only.", fg: FULLSCREEN_PALETTE.info }, { text: "Local scheduler mutation controls remain blocked; job/run/schedule controls go through the connected host.", fg: FULLSCREEN_PALETTE.warn }, { text: "Reminder path: Create reminder -> choose at/every/cron -> optional delivery target -> confirm yes.", fg: FULLSCREEN_PALETTE.good }, { text: "Operator path: choose job/run/schedule action -> enter id -> type yes -> dispatch once.", fg: FULLSCREEN_PALETTE.good }, { text: "Routine path: Routines -> resolve setup -> review selected -> Promote routine -> Reconcile schedules.", fg: FULLSCREEN_PALETTE.good }, { text: `Schedule-ready routines: ${ready.length}; local promotion receipts: ${snapshot2.routineScheduleReceiptCount}`, fg: ready.length > 0 ? FULLSCREEN_PALETTE.good : FULLSCREEN_PALETTE.warn }, automationNextActionLine(snapshot2), ...routineScheduleReceiptLines(snapshot2));
902568
+ base2.push({ text: `Automation: ${ready.length} schedule-ready routine(s); receipts ${snapshot2.routineScheduleReceiptCount}.`, fg: ready.length > 0 ? FULLSCREEN_PALETTE.good : FULLSCREEN_PALETTE.warn }, automationNextActionLine(snapshot2), compactRoutineReceiptLine(snapshot2), { text: "Reminders and routine promotion require confirmation.", fg: FULLSCREEN_PALETTE.warn });
902531
902569
  } else if (category.id === "delegate") {
902532
- base2.push({ text: "Build/fix/review work is handed to GoodVibes TUI/shared-session contracts.", fg: FULLSCREEN_PALETTE.info }, { text: `Delegated review policy: ${snapshot2.delegatedReviewPolicy}`, fg: FULLSCREEN_PALETTE.warn }, { text: "Agent does not create coding-role Agent jobs.", fg: FULLSCREEN_PALETTE.good });
902570
+ base2.push({ text: "Build/fix/review work is handed to GoodVibes TUI.", fg: FULLSCREEN_PALETTE.info }, { text: `Delegated review policy: ${snapshot2.delegatedReviewPolicy}`, fg: FULLSCREEN_PALETTE.warn }, { text: "No coding-role Agent jobs are created here.", fg: FULLSCREEN_PALETTE.good });
902571
+ } else if (category.id === "finish") {
902572
+ base2.push({ text: "Apply & close marks onboarding finished for this user.", fg: FULLSCREEN_PALETTE.good }, { text: "Future normal launches start in the main conversation.", fg: FULLSCREEN_PALETTE.info }, { text: "Use /agent, /setup, or /onboarding to reopen this workspace later.", fg: FULLSCREEN_PALETTE.muted });
902533
902573
  }
902534
902574
  if (snapshot2.warnings.length > 0) {
902535
- base2.push({ text: "", dim: true }, { text: "Warnings", fg: FULLSCREEN_PALETTE.warn, bold: true });
902536
- for (const warning of snapshot2.warnings)
902537
- base2.push({ text: warning, fg: FULLSCREEN_PALETTE.warn });
902575
+ base2.push({ text: `Warnings: ${snapshot2.warnings.map((warning) => compactText3(warning, 60)).join("; ")}`, fg: FULLSCREEN_PALETTE.warn });
902538
902576
  }
902539
902577
  return base2;
902540
902578
  }
@@ -902542,53 +902580,36 @@ function editorContextLines(editor) {
902542
902580
  const selected = editor.fields[editor.selectedFieldIndex];
902543
902581
  const lines = [
902544
902582
  { text: editor.title, fg: FULLSCREEN_PALETTE.title, bold: true },
902545
- { text: editor.message, fg: editor.message.includes("required") || editor.message.includes("cannot") || editor.message.includes("Cannot") ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.info },
902546
- { text: "Enter advances fields and saves from the final field. Ctrl-J adds a line inside multiline fields. Esc cancels without writing.", fg: FULLSCREEN_PALETTE.muted }
902583
+ { text: compactText3(editor.message), fg: editor.message.includes("required") || editor.message.includes("cannot") || editor.message.includes("Cannot") ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.info },
902584
+ { text: "Enter next/save; Ctrl-J newline; Esc cancel.", fg: FULLSCREEN_PALETTE.muted }
902547
902585
  ];
902548
902586
  if (selected) {
902549
- lines.push({ text: "" }, { text: `Editing: ${selected.label}${selected.required ? " (required)" : ""}`, fg: FULLSCREEN_PALETTE.title, bold: true }, { text: selected.hint, fg: FULLSCREEN_PALETTE.muted });
902587
+ lines.push({ text: `Editing: ${selected.label}${selected.required ? " (required)" : ""}`, fg: FULLSCREEN_PALETTE.title, bold: true }, { text: compactText3(selected.hint), fg: FULLSCREEN_PALETTE.muted });
902550
902588
  }
902551
902589
  return lines;
902552
902590
  }
902553
902591
  function buildContextRows(workspace, category, action2, width) {
902554
- const compactPrimarySurface = category.id === "home" || category.id === "setup";
902555
902592
  const lines = [
902556
902593
  { text: category.label, fg: FULLSCREEN_PALETTE.title, bold: true },
902557
902594
  { text: category.summary, fg: FULLSCREEN_PALETTE.subtitle },
902558
- ...compactPrimarySurface ? [] : [
902559
- { text: "" },
902560
- { text: category.detail, fg: FULLSCREEN_PALETTE.text }
902561
- ],
902562
902595
  ...workspace.actionSearchActive ? [
902563
- { text: "" },
902564
902596
  { text: "Action Search", fg: FULLSCREEN_PALETTE.title, bold: true },
902565
902597
  {
902566
902598
  text: workspace.actionSearchQuery.length > 0 ? `Query: ${workspace.actionSearchQuery} (${workspace.actionSearchResults.length} result${workspace.actionSearchResults.length === 1 ? "" : "s"})` : "Type to search every Agent workspace action.",
902567
902599
  fg: workspace.actionSearchQuery.length > 0 && workspace.actionSearchResults.length === 0 ? FULLSCREEN_PALETTE.warn : FULLSCREEN_PALETTE.info
902568
902600
  },
902569
- { text: "Enter opens the selected result. Esc clears search and returns to normal workspace navigation.", fg: FULLSCREEN_PALETTE.muted },
902570
- { text: "" }
902601
+ { text: "Enter opens; Esc clears.", fg: FULLSCREEN_PALETTE.muted }
902571
902602
  ] : [],
902572
- ...workspace.localEditor ? editorContextLines(workspace.localEditor) : [],
902573
- ...workspace.localEditor ? [{ text: "" }] : []
902603
+ ...workspace.localEditor ? editorContextLines(workspace.localEditor) : []
902574
902604
  ];
902575
902605
  const selectedActionLines = action2 ? [
902576
- { text: "" },
902577
902606
  { text: `Selected: ${action2.label}`, fg: FULLSCREEN_PALETTE.title, bold: true },
902578
- { text: action2.detail, fg: FULLSCREEN_PALETTE.text },
902579
- { text: `Command: ${actionCommand(action2)}`, fg: action2.kind === "command" ? FULLSCREEN_PALETTE.info : FULLSCREEN_PALETTE.muted },
902580
- { text: `Safety: ${action2.safety}`, fg: safetyColor(action2) }
902607
+ actionMetaLine(action2)
902581
902608
  ] : [];
902582
- const snapshotContextLines = [
902583
- { text: "" },
902584
- ...snapshotLines(workspace, category, workspace.runtimeSnapshot)
902585
- ];
902586
- if (compactPrimarySurface)
902587
- lines.push(...selectedActionLines, ...snapshotContextLines);
902588
- else
902589
- lines.push(...snapshotContextLines, ...selectedActionLines);
902609
+ const snapshotContextLines = snapshotLines(workspace, category, workspace.runtimeSnapshot);
902610
+ lines.push(...selectedActionLines, ...snapshotContextLines);
902590
902611
  if (workspace.lastActionResult) {
902591
- lines.push({ text: "" }, { text: "Action Result", fg: FULLSCREEN_PALETTE.title, bold: true }, { text: workspace.lastActionResult.title, fg: actionResultColor(workspace.lastActionResult), bold: true }, { text: workspace.lastActionResult.detail, fg: FULLSCREEN_PALETTE.text });
902612
+ lines.push({ text: "Action Result", fg: FULLSCREEN_PALETTE.title, bold: true }, { text: workspace.lastActionResult.title, fg: actionResultColor(workspace.lastActionResult), bold: true }, { text: compactText3(workspace.lastActionResult.detail), fg: FULLSCREEN_PALETTE.text });
902592
902613
  if (workspace.lastActionResult.command) {
902593
902614
  lines.push({ text: `Command: ${workspace.lastActionResult.command}`, fg: FULLSCREEN_PALETTE.muted });
902594
902615
  }
@@ -902721,12 +902742,11 @@ function footerText3(workspace) {
902721
902742
  function renderAgentWorkspace(workspace, width, height) {
902722
902743
  const category = workspace.selectedActionCategory;
902723
902744
  const action2 = workspace.selectedAction;
902724
- const compactPrimarySurface = category.id === "home" || category.id === "setup";
902725
902745
  const layoutOptions = {
902726
902746
  width,
902727
902747
  height,
902728
902748
  leftWidth: width < 90 ? undefined : 30,
902729
- contextRatio: compactPrimarySurface ? 0.4 : 0.62,
902749
+ contextRatio: 0.4,
902730
902750
  minContextRows: 10
902731
902751
  };
902732
902752
  const metrics = getFullscreenWorkspaceMetrics(layoutOptions);
@@ -903880,8 +903900,6 @@ function applyInitialTuiCliState(options) {
903880
903900
  }
903881
903901
  } else if (!globalOnboardingMarker.exists) {
903882
903902
  input.openAgentWorkspace(commandContext);
903883
- } else if (cli.command === "tui" && seededPrompt === undefined) {
903884
- input.openAgentWorkspace(commandContext);
903885
903903
  }
903886
903904
  if (seededPrompt) {
903887
903905
  input.prompt = seededPrompt;