@almadar/std 3.13.1 → 3.14.1

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.
Files changed (49) hide show
  1. package/behaviors/exports/atoms/std-agent-activity-log.orb +11 -3
  2. package/behaviors/exports/atoms/std-agent-step-progress.orb +162 -23
  3. package/behaviors/exports/atoms/std-agent-tool-call.orb +0 -499
  4. package/behaviors/exports/molecules/std-agent-fix-loop.orb +173 -25
  5. package/behaviors/exports/molecules/std-agent-learner.orb +15 -550
  6. package/behaviors/exports/molecules/std-agent-planner.orb +10 -530
  7. package/behaviors/exports/molecules/std-agent-rag.orb +4 -1
  8. package/behaviors/exports/molecules/std-agent-tool-loop.orb +169 -573
  9. package/behaviors/exports/organisms/std-agent-builder.orb +905 -1453
  10. package/behaviors/exports/organisms/std-agent-pipeline.orb +806 -1502
  11. package/behaviors/exports/organisms/std-agent-reviewer.orb +4 -1
  12. package/behaviors/exports/validation-report.json +2 -2
  13. package/dist/behaviors/behaviors-registry.json +11173 -5568
  14. package/dist/behaviors/exports/atoms/std-agent-activity-log.orb +11 -3
  15. package/dist/behaviors/exports/atoms/std-agent-step-progress.orb +162 -23
  16. package/dist/behaviors/exports/atoms/std-agent-tool-call.orb +0 -499
  17. package/dist/behaviors/exports/molecules/std-agent-fix-loop.orb +173 -25
  18. package/dist/behaviors/exports/molecules/std-agent-learner.orb +15 -550
  19. package/dist/behaviors/exports/molecules/std-agent-planner.orb +10 -530
  20. package/dist/behaviors/exports/molecules/std-agent-rag.orb +4 -1
  21. package/dist/behaviors/exports/molecules/std-agent-tool-loop.orb +169 -573
  22. package/dist/behaviors/exports/organisms/std-agent-builder.orb +905 -1453
  23. package/dist/behaviors/exports/organisms/std-agent-pipeline.orb +806 -1502
  24. package/dist/behaviors/exports/organisms/std-agent-reviewer.orb +4 -1
  25. package/dist/behaviors/exports/validation-report.json +2 -2
  26. package/dist/behaviors/exports-reader.js +257 -302
  27. package/dist/behaviors/exports-reader.js.map +1 -1
  28. package/dist/behaviors/functions/index.js +257 -302
  29. package/dist/behaviors/functions/index.js.map +1 -1
  30. package/dist/behaviors/index.js +257 -302
  31. package/dist/behaviors/index.js.map +1 -1
  32. package/dist/behaviors/query.js +257 -302
  33. package/dist/behaviors/query.js.map +1 -1
  34. package/dist/behaviors-registry.json +11173 -5568
  35. package/dist/exports/atoms/std-agent-activity-log.orb +11 -3
  36. package/dist/exports/atoms/std-agent-step-progress.orb +162 -23
  37. package/dist/exports/atoms/std-agent-tool-call.orb +0 -499
  38. package/dist/exports/molecules/std-agent-fix-loop.orb +173 -25
  39. package/dist/exports/molecules/std-agent-learner.orb +15 -550
  40. package/dist/exports/molecules/std-agent-planner.orb +10 -530
  41. package/dist/exports/molecules/std-agent-rag.orb +4 -1
  42. package/dist/exports/molecules/std-agent-tool-loop.orb +169 -573
  43. package/dist/exports/organisms/std-agent-builder.orb +905 -1453
  44. package/dist/exports/organisms/std-agent-pipeline.orb +806 -1502
  45. package/dist/exports/organisms/std-agent-reviewer.orb +4 -1
  46. package/dist/exports/validation-report.json +2 -2
  47. package/dist/index.js +257 -302
  48. package/dist/index.js.map +1 -1
  49. package/package.json +1 -1
@@ -20915,187 +20915,9 @@ function stdAgentCompletion(params = {}) {
20915
20915
  };
20916
20916
  return makeOrbital(`${c.entityName}Orbital`, entity, [modalTrait, notifTrait, agentTrait], [page]);
20917
20917
  }
20918
- function resolve92(params) {
20919
- const entityName = params.entityName ?? "ActivityEntry";
20920
- const p = plural(entityName);
20921
- const requiredFields = [
20922
- { name: "action", type: "string", default: "" },
20923
- { name: "detail", type: "string", default: "" },
20924
- { name: "status", type: "string", default: "pending" },
20925
- { name: "timestamp", type: "string", default: "" },
20926
- { name: "duration", type: "number", default: 0 }
20927
- ];
20928
- const baseFields = params.fields ?? [];
20929
- const existingNames = new Set(baseFields.map((f) => f.name));
20930
- const mergedFields = [
20931
- ...baseFields,
20932
- ...requiredFields.filter((f) => !existingNames.has(f.name))
20933
- ];
20934
- const fields = ensureIdField(mergedFields);
20935
- return {
20936
- entityName,
20937
- fields,
20938
- persistence: params.persistence ?? "persistent",
20939
- traitName: `${entityName}Log`,
20940
- pluralName: p,
20941
- pageName: params.pageName ?? `${entityName}Page`,
20942
- pagePath: params.pagePath ?? `/${p.toLowerCase()}`,
20943
- isInitial: params.isInitial ?? false
20944
- };
20945
- }
20946
- function buildEntity78(c) {
20947
- return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
20948
- }
20949
- function buildTrait71(c) {
20950
- const { entityName } = c;
20951
- const loggingUI = {
20952
- type: "stack",
20953
- direction: "vertical",
20954
- gap: "lg",
20955
- children: [
20956
- {
20957
- type: "stack",
20958
- direction: "horizontal",
20959
- gap: "sm",
20960
- justify: "space-between",
20961
- align: "center",
20962
- children: [
20963
- {
20964
- type: "stack",
20965
- direction: "horizontal",
20966
- gap: "sm",
20967
- align: "center",
20968
- children: [
20969
- { type: "icon", name: "activity", size: "lg" },
20970
- { type: "typography", content: "Activity Log", variant: "h2" }
20971
- ]
20972
- },
20973
- { type: "button", label: "Clear", event: "CLEAR", variant: "ghost", icon: "trash" }
20974
- ]
20975
- },
20976
- { type: "divider" },
20977
- {
20978
- type: "timeline",
20979
- entity: entityName,
20980
- emptyIcon: "activity",
20981
- emptyTitle: "No activity yet",
20982
- emptyDescription: "Agent actions will appear here as they occur.",
20983
- renderItem: ["fn", "item", {
20984
- type: "stack",
20985
- direction: "vertical",
20986
- gap: "xs",
20987
- children: [
20988
- {
20989
- type: "stack",
20990
- direction: "horizontal",
20991
- gap: "sm",
20992
- align: "center",
20993
- children: [
20994
- { type: "badge", label: "@item.status" },
20995
- { type: "typography", variant: "h4", content: "@item.action" }
20996
- ]
20997
- },
20998
- { type: "typography", variant: "body", color: "muted", content: "@item.detail" },
20999
- {
21000
- type: "stack",
21001
- direction: "horizontal",
21002
- gap: "sm",
21003
- align: "center",
21004
- children: [
21005
- { type: "typography", variant: "caption", color: "muted", content: "@item.timestamp" },
21006
- { type: "badge", label: "@item.duration", variant: "outline" }
21007
- ]
21008
- }
21009
- ]
21010
- }]
21011
- }
21012
- ]
21013
- };
21014
- return {
21015
- name: c.traitName,
21016
- linkedEntity: entityName,
21017
- category: "interaction",
21018
- emits: [
21019
- { event: "LOG_ENTRY", scope: "external", payload: [
21020
- { name: "action", type: "string" },
21021
- { name: "detail", type: "string" },
21022
- { name: "status", type: "string" }
21023
- ] }
21024
- ],
21025
- listens: [
21026
- { event: "LOG_ENTRY", triggers: "LOG_ENTRY", scope: "external" }
21027
- ],
21028
- stateMachine: {
21029
- states: [
21030
- { name: "logging", isInitial: true }
21031
- ],
21032
- events: [
21033
- { key: "INIT", name: "Initialize" },
21034
- { key: "LOG_ENTRY", name: "Log Entry", payload: [
21035
- { name: "action", type: "string", required: true },
21036
- { name: "detail", type: "string", required: true },
21037
- { name: "status", type: "string", required: true }
21038
- ] },
21039
- { key: "CLEAR", name: "Clear Log" }
21040
- ],
21041
- transitions: [
21042
- {
21043
- from: "logging",
21044
- to: "logging",
21045
- event: "INIT",
21046
- effects: [
21047
- ["fetch", entityName],
21048
- ["render-ui", "main", loggingUI]
21049
- ]
21050
- },
21051
- {
21052
- from: "logging",
21053
- to: "logging",
21054
- event: "LOG_ENTRY",
21055
- effects: [
21056
- ["persist", "create", entityName, {
21057
- action: "@payload.action",
21058
- detail: "@payload.detail",
21059
- status: "@payload.status",
21060
- timestamp: "@now"
21061
- }],
21062
- ["fetch", entityName],
21063
- ["render-ui", "main", loggingUI]
21064
- ]
21065
- },
21066
- {
21067
- from: "logging",
21068
- to: "logging",
21069
- event: "CLEAR",
21070
- effects: [
21071
- ["persist", "delete", entityName],
21072
- ["fetch", entityName],
21073
- ["render-ui", "main", loggingUI]
21074
- ]
21075
- }
21076
- ]
21077
- }
21078
- };
21079
- }
21080
- function buildPage72(c) {
21081
- return makePage({ name: c.pageName, path: c.pagePath, traitName: c.traitName, isInitial: c.isInitial });
21082
- }
21083
- function stdAgentActivityLogEntity(params = {}) {
21084
- return buildEntity78(resolve92(params));
21085
- }
21086
- function stdAgentActivityLogTrait(params = {}) {
21087
- return buildTrait71(resolve92(params));
21088
- }
21089
- function stdAgentActivityLogPage(params = {}) {
21090
- return buildPage72(resolve92(params));
21091
- }
21092
- function stdAgentActivityLog(params = {}) {
21093
- const c = resolve92(params);
21094
- return makeOrbital(`${c.entityName}Orbital`, buildEntity78(c), [buildTrait71(c)], [buildPage72(c)]);
21095
- }
21096
20918
 
21097
20919
  // behaviors/functions/molecules/std-agent-planner.ts
21098
- function resolve93(params) {
20920
+ function resolve92(params) {
21099
20921
  const entityName = params.entityName ?? "Plan";
21100
20922
  const p = plural(entityName);
21101
20923
  const requiredFields = [
@@ -21120,7 +20942,8 @@ function resolve93(params) {
21120
20942
  { name: "action", type: "string", default: "" },
21121
20943
  { name: "detail", type: "string", default: "" },
21122
20944
  { name: "timestamp", type: "string", default: "" },
21123
- { name: "duration", type: "number", default: 0 }
20945
+ { name: "duration", type: "number", default: 0 },
20946
+ { name: "icon", type: "string", default: "circle" }
21124
20947
  ];
21125
20948
  const baseFields = ensureIdField(params.fields ?? []);
21126
20949
  const userFieldNames = new Set(baseFields.map((f) => f.name));
@@ -21305,7 +21128,7 @@ function errorView2(_entityName) {
21305
21128
  ]
21306
21129
  };
21307
21130
  }
21308
- function buildTrait72(c) {
21131
+ function buildTrait71(c) {
21309
21132
  const { entityName, categories, memoryLimit } = c;
21310
21133
  const categoryList = categories.join(", ");
21311
21134
  return {
@@ -21488,17 +21311,17 @@ function buildTrait72(c) {
21488
21311
  }
21489
21312
  };
21490
21313
  }
21491
- function buildEntity79(c) {
21314
+ function buildEntity78(c) {
21492
21315
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
21493
21316
  }
21494
21317
  function stdAgentPlannerEntity(params) {
21495
- return buildEntity79(resolve93(params));
21318
+ return buildEntity78(resolve92(params));
21496
21319
  }
21497
21320
  function stdAgentPlannerTrait(params) {
21498
- return buildTrait72(resolve93(params));
21321
+ return buildTrait71(resolve92(params));
21499
21322
  }
21500
21323
  function stdAgentPlannerPage(params) {
21501
- const c = resolve93(params);
21324
+ const c = resolve92(params);
21502
21325
  return {
21503
21326
  name: c.pageName,
21504
21327
  path: c.pagePath,
@@ -21506,7 +21329,6 @@ function stdAgentPlannerPage(params) {
21506
21329
  traits: [
21507
21330
  { ref: c.traitName },
21508
21331
  { ref: "PlannerTaskInput" },
21509
- { ref: "PlannerActivityLog" },
21510
21332
  { ref: "PlannerClassifierFlow" },
21511
21333
  { ref: "PlannerCompletionFlow" },
21512
21334
  { ref: "PlannerMemoryLifecycle" }
@@ -21514,9 +21336,9 @@ function stdAgentPlannerPage(params) {
21514
21336
  };
21515
21337
  }
21516
21338
  function stdAgentPlanner(params) {
21517
- const c = resolve93(params);
21339
+ const c = resolve92(params);
21518
21340
  const { entityName, fields } = c;
21519
- const plannerTrait = buildTrait72(c);
21341
+ const plannerTrait = buildTrait71(c);
21520
21342
  const classifierTrait = extractTrait(stdAgentClassifier({
21521
21343
  entityName,
21522
21344
  fields,
@@ -21577,18 +21399,6 @@ function stdAgentPlanner(params) {
21577
21399
  saveEvent: "PLAN"
21578
21400
  }));
21579
21401
  modalTrait.name = "PlannerTaskInput";
21580
- const activityLogTrait = extractTrait(stdAgentActivityLog({
21581
- entityName,
21582
- fields,
21583
- persistence: "runtime"
21584
- }));
21585
- activityLogTrait.name = "PlannerActivityLog";
21586
- activityLogTrait.listens = [];
21587
- if (activityLogTrait.emits) {
21588
- for (const e of activityLogTrait.emits) {
21589
- e.scope = "internal";
21590
- }
21591
- }
21592
21402
  const entity = makeEntity({ name: entityName, fields, persistence: c.persistence });
21593
21403
  const page = {
21594
21404
  name: c.pageName,
@@ -21597,7 +21407,6 @@ function stdAgentPlanner(params) {
21597
21407
  traits: [
21598
21408
  { ref: plannerTrait.name },
21599
21409
  { ref: modalTrait.name },
21600
- { ref: activityLogTrait.name },
21601
21410
  { ref: classifierTrait.name },
21602
21411
  { ref: completionTrait.name },
21603
21412
  { ref: memoryTrait.name }
@@ -21606,11 +21415,11 @@ function stdAgentPlanner(params) {
21606
21415
  return makeOrbital(
21607
21416
  `${entityName}Orbital`,
21608
21417
  entity,
21609
- [plannerTrait, modalTrait, activityLogTrait, classifierTrait, completionTrait, memoryTrait],
21418
+ [plannerTrait, modalTrait, classifierTrait, completionTrait, memoryTrait],
21610
21419
  [page]
21611
21420
  );
21612
21421
  }
21613
- function resolve94(params) {
21422
+ function resolve93(params) {
21614
21423
  const entityName = params.entityName ?? "ToolCall";
21615
21424
  const p = plural(entityName);
21616
21425
  const requiredFields = [
@@ -21641,7 +21450,7 @@ function resolve94(params) {
21641
21450
  isInitial: params.isInitial ?? false
21642
21451
  };
21643
21452
  }
21644
- function buildEntity80(c) {
21453
+ function buildEntity79(c) {
21645
21454
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
21646
21455
  }
21647
21456
  function buildAgentTrait7(c) {
@@ -21782,26 +21591,25 @@ function buildAgentTrait7(c) {
21782
21591
  };
21783
21592
  }
21784
21593
  function stdAgentToolCallEntity(params = {}) {
21785
- return buildEntity80(resolve94(params));
21594
+ return buildEntity79(resolve93(params));
21786
21595
  }
21787
21596
  function stdAgentToolCallTrait(params = {}) {
21788
- return buildAgentTrait7(resolve94(params));
21597
+ return buildAgentTrait7(resolve93(params));
21789
21598
  }
21790
21599
  function stdAgentToolCallPage(params = {}) {
21791
- const c = resolve94(params);
21600
+ const c = resolve93(params);
21792
21601
  return {
21793
21602
  name: c.pageName,
21794
21603
  path: c.pagePath,
21795
21604
  ...c.isInitial ? { isInitial: true } : {},
21796
21605
  traits: [
21797
21606
  { ref: `${c.entityName}Modal` },
21798
- { ref: `${c.entityName}Log` },
21799
21607
  { ref: `${c.entityName}Agent` }
21800
21608
  ]
21801
21609
  };
21802
21610
  }
21803
21611
  function stdAgentToolCall(params = {}) {
21804
- const c = resolve94(params);
21612
+ const c = resolve93(params);
21805
21613
  const { entityName, fields } = c;
21806
21614
  const invokeContent = {
21807
21615
  type: "stack",
@@ -21829,30 +21637,24 @@ function stdAgentToolCall(params = {}) {
21829
21637
  saveEffects: [["persist", "create", entityName, "@payload.data"]],
21830
21638
  emitOnSave: "INVOKED"
21831
21639
  }));
21832
- const activityLogTrait = extractTrait(stdAgentActivityLog({
21833
- entityName,
21834
- fields
21835
- }));
21836
21640
  const agentTrait = buildAgentTrait7(c);
21837
- const entity = buildEntity80(c);
21641
+ const entity = buildEntity79(c);
21838
21642
  const page = {
21839
21643
  name: c.pageName,
21840
21644
  path: c.pagePath,
21841
21645
  ...c.isInitial ? { isInitial: true } : {},
21842
21646
  traits: [
21843
21647
  { ref: modalTrait.name },
21844
- { ref: activityLogTrait.name },
21845
21648
  { ref: agentTrait.name }
21846
21649
  ]
21847
21650
  };
21848
- return makeOrbital(`${c.entityName}Orbital`, entity, [modalTrait, activityLogTrait, agentTrait], [page]);
21651
+ return makeOrbital(`${c.entityName}Orbital`, entity, [modalTrait, agentTrait], [page]);
21849
21652
  }
21850
- function resolve95(params) {
21653
+ function resolve94(params) {
21851
21654
  const entityName = params.entityName ?? "StepTracker";
21852
21655
  const p = plural(entityName);
21853
21656
  const stepLabels = params.stepLabels ?? ["Initialize", "Process", "Validate", "Complete"];
21854
21657
  const requiredFields = [
21855
- { name: "steps", type: "string", default: stepLabels.join(",") },
21856
21658
  { name: "currentStep", type: "number", default: 0 },
21857
21659
  { name: "totalSteps", type: "number", default: stepLabels.length },
21858
21660
  { name: "status", type: "string", default: "idle" }
@@ -21876,11 +21678,12 @@ function resolve95(params) {
21876
21678
  isInitial: params.isInitial ?? false
21877
21679
  };
21878
21680
  }
21879
- function buildEntity81(c) {
21681
+ function buildEntity80(c) {
21880
21682
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
21881
21683
  }
21882
- function buildTrait73(c) {
21684
+ function buildTrait72(c) {
21883
21685
  const { entityName } = c;
21686
+ const stepsLiteral = c.stepLabels.map((label, i) => ({ id: String(i), title: label }));
21884
21687
  const idleUI = {
21885
21688
  type: "stack",
21886
21689
  direction: "vertical",
@@ -21898,7 +21701,7 @@ function buildTrait73(c) {
21898
21701
  ]
21899
21702
  },
21900
21703
  { type: "divider" },
21901
- { type: "wizard-progress", currentStep: "@entity.currentStep", totalSteps: "@entity.totalSteps", steps: "@entity.steps" },
21704
+ { type: "wizard-progress", currentStep: "@entity.currentStep", steps: stepsLiteral },
21902
21705
  { type: "button", label: "Start", event: "START", variant: "primary", icon: "play" }
21903
21706
  ]
21904
21707
  };
@@ -21919,7 +21722,7 @@ function buildTrait73(c) {
21919
21722
  ]
21920
21723
  },
21921
21724
  { type: "divider" },
21922
- { type: "wizard-progress", currentStep: "@entity.currentStep", totalSteps: "@entity.totalSteps", steps: "@entity.steps" },
21725
+ { type: "wizard-progress", currentStep: "@entity.currentStep", steps: stepsLiteral },
21923
21726
  {
21924
21727
  type: "stack",
21925
21728
  direction: "horizontal",
@@ -21958,7 +21761,7 @@ function buildTrait73(c) {
21958
21761
  ]
21959
21762
  },
21960
21763
  { type: "divider" },
21961
- { type: "wizard-progress", currentStep: "@entity.totalSteps", totalSteps: "@entity.totalSteps", steps: "@entity.steps" },
21764
+ { type: "wizard-progress", currentStep: "@entity.totalSteps", steps: stepsLiteral },
21962
21765
  { type: "alert", variant: "success", message: "All steps completed successfully." },
21963
21766
  { type: "button", label: "Reset", event: "RESET", variant: "ghost", icon: "rotate-ccw" }
21964
21767
  ]
@@ -21980,7 +21783,7 @@ function buildTrait73(c) {
21980
21783
  ]
21981
21784
  },
21982
21785
  { type: "divider" },
21983
- { type: "wizard-progress", currentStep: "@entity.currentStep", totalSteps: "@entity.totalSteps", steps: "@entity.steps" },
21786
+ { type: "wizard-progress", currentStep: "@entity.currentStep", steps: stepsLiteral },
21984
21787
  { type: "alert", variant: "error", message: "Pipeline failed at the current step." },
21985
21788
  {
21986
21789
  type: "stack",
@@ -22115,25 +21918,25 @@ function buildTrait73(c) {
22115
21918
  }
22116
21919
  };
22117
21920
  }
22118
- function buildPage73(c) {
21921
+ function buildPage72(c) {
22119
21922
  return makePage({ name: c.pageName, path: c.pagePath, traitName: c.traitName, isInitial: c.isInitial });
22120
21923
  }
22121
21924
  function stdAgentStepProgressEntity(params = {}) {
22122
- return buildEntity81(resolve95(params));
21925
+ return buildEntity80(resolve94(params));
22123
21926
  }
22124
21927
  function stdAgentStepProgressTrait(params = {}) {
22125
- return buildTrait73(resolve95(params));
21928
+ return buildTrait72(resolve94(params));
22126
21929
  }
22127
21930
  function stdAgentStepProgressPage(params = {}) {
22128
- return buildPage73(resolve95(params));
21931
+ return buildPage72(resolve94(params));
22129
21932
  }
22130
21933
  function stdAgentStepProgress(params = {}) {
22131
- const c = resolve95(params);
22132
- return makeOrbital(`${c.entityName}Orbital`, buildEntity81(c), [buildTrait73(c)], [buildPage73(c)]);
21934
+ const c = resolve94(params);
21935
+ return makeOrbital(`${c.entityName}Orbital`, buildEntity80(c), [buildTrait72(c)], [buildPage72(c)]);
22133
21936
  }
22134
21937
 
22135
21938
  // behaviors/functions/molecules/std-agent-tool-loop.ts
22136
- function resolve96(params) {
21939
+ function resolve95(params) {
22137
21940
  const entityName = params.entityName ?? "ToolLoop";
22138
21941
  const p = plural(entityName);
22139
21942
  const requiredFields = [
@@ -22331,7 +22134,7 @@ function completedView(_entityName) {
22331
22134
  { type: "divider" },
22332
22135
  {
22333
22136
  type: "simple-grid",
22334
- columns: 2,
22137
+ cols: 2,
22335
22138
  children: [
22336
22139
  { type: "stat-display", label: "Iterations", value: `@entity.iterations`, icon: "repeat" },
22337
22140
  { type: "stat-display", label: "Status", value: `@entity.status`, icon: "check" }
@@ -22368,7 +22171,7 @@ function failedView(_entityName) {
22368
22171
  { type: "alert", variant: "error", message: `@entity.error` },
22369
22172
  {
22370
22173
  type: "simple-grid",
22371
- columns: 2,
22174
+ cols: 2,
22372
22175
  children: [
22373
22176
  { type: "stat-display", label: "Iterations Used", value: `@entity.iterations`, icon: "repeat" },
22374
22177
  { type: "stat-display", label: "Max Allowed", value: `@entity.maxIterations`, icon: "shield" }
@@ -22378,7 +22181,7 @@ function failedView(_entityName) {
22378
22181
  ]
22379
22182
  };
22380
22183
  }
22381
- function buildTrait74(c) {
22184
+ function buildTrait73(c) {
22382
22185
  const { entityName, maxIterations, compactThreshold } = c;
22383
22186
  return {
22384
22187
  name: c.traitName,
@@ -22589,17 +22392,17 @@ function buildTrait74(c) {
22589
22392
  }
22590
22393
  };
22591
22394
  }
22592
- function buildEntity82(c) {
22395
+ function buildEntity81(c) {
22593
22396
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
22594
22397
  }
22595
22398
  function stdAgentToolLoopEntity(params) {
22596
- return buildEntity82(resolve96(params));
22399
+ return buildEntity81(resolve95(params));
22597
22400
  }
22598
22401
  function stdAgentToolLoopTrait(params) {
22599
- return buildTrait74(resolve96(params));
22402
+ return buildTrait73(resolve95(params));
22600
22403
  }
22601
22404
  function stdAgentToolLoopPage(params) {
22602
- const c = resolve96(params);
22405
+ const c = resolve95(params);
22603
22406
  return {
22604
22407
  name: c.pageName,
22605
22408
  path: c.pagePath,
@@ -22607,7 +22410,6 @@ function stdAgentToolLoopPage(params) {
22607
22410
  traits: [
22608
22411
  { ref: c.traitName },
22609
22412
  { ref: "ToolLoopStepProgress" },
22610
- { ref: "ToolLoopActivityLog" },
22611
22413
  { ref: "ToolLoopCompletionFlow" },
22612
22414
  { ref: "ToolLoopToolCallFlow" },
22613
22415
  { ref: "ToolLoopContextMonitor" }
@@ -22615,9 +22417,9 @@ function stdAgentToolLoopPage(params) {
22615
22417
  };
22616
22418
  }
22617
22419
  function stdAgentToolLoop(params) {
22618
- const c = resolve96(params);
22420
+ const c = resolve95(params);
22619
22421
  const { entityName, fields } = c;
22620
- const loopTrait = buildTrait74(c);
22422
+ const loopTrait = buildTrait73(c);
22621
22423
  const completionTrait = extractTrait(stdAgentCompletion({
22622
22424
  entityName,
22623
22425
  fields,
@@ -22667,18 +22469,6 @@ function stdAgentToolLoop(params) {
22667
22469
  e.scope = "internal";
22668
22470
  }
22669
22471
  }
22670
- const activityLogTrait = extractTrait(stdAgentActivityLog({
22671
- entityName,
22672
- fields,
22673
- persistence: "runtime"
22674
- }));
22675
- activityLogTrait.name = "ToolLoopActivityLog";
22676
- activityLogTrait.listens = [];
22677
- if (activityLogTrait.emits) {
22678
- for (const e of activityLogTrait.emits) {
22679
- e.scope = "internal";
22680
- }
22681
- }
22682
22472
  const entity = makeEntity({ name: entityName, fields, persistence: c.persistence });
22683
22473
  const page = {
22684
22474
  name: c.pageName,
@@ -22687,7 +22477,6 @@ function stdAgentToolLoop(params) {
22687
22477
  traits: [
22688
22478
  { ref: loopTrait.name },
22689
22479
  { ref: stepProgressTrait.name },
22690
- { ref: activityLogTrait.name },
22691
22480
  { ref: completionTrait.name },
22692
22481
  { ref: toolCallTrait.name },
22693
22482
  { ref: contextTrait.name }
@@ -22696,11 +22485,11 @@ function stdAgentToolLoop(params) {
22696
22485
  return makeOrbital(
22697
22486
  `${entityName}Orbital`,
22698
22487
  entity,
22699
- [loopTrait, stepProgressTrait, activityLogTrait, completionTrait, toolCallTrait, contextTrait],
22488
+ [loopTrait, stepProgressTrait, completionTrait, toolCallTrait, contextTrait],
22700
22489
  [page]
22701
22490
  );
22702
22491
  }
22703
- function resolve97(params) {
22492
+ function resolve96(params) {
22704
22493
  const entityName = params.entityName ?? "FixLoop";
22705
22494
  const p = plural(entityName);
22706
22495
  const requiredFields = [
@@ -22896,7 +22685,7 @@ function succeededView() {
22896
22685
  { type: "divider" },
22897
22686
  {
22898
22687
  type: "simple-grid",
22899
- columns: 2,
22688
+ cols: 2,
22900
22689
  children: [
22901
22690
  { type: "stat-display", label: "Fix Attempts", value: `@entity.fixAttempts`, icon: "wrench" },
22902
22691
  { type: "stat-display", label: "Status", value: "Passed", icon: "check" }
@@ -22929,7 +22718,7 @@ function failedView2() {
22929
22718
  { type: "alert", variant: "error", message: `@entity.error` },
22930
22719
  {
22931
22720
  type: "simple-grid",
22932
- columns: 2,
22721
+ cols: 2,
22933
22722
  children: [
22934
22723
  { type: "stat-display", label: "Attempts Used", value: `@entity.fixAttempts`, icon: "wrench" },
22935
22724
  { type: "stat-display", label: "Remaining Errors", value: `@entity.errorCount`, icon: "alert-triangle" }
@@ -22951,7 +22740,7 @@ function failedView2() {
22951
22740
  ]
22952
22741
  };
22953
22742
  }
22954
- function buildTrait75(c) {
22743
+ function buildTrait74(c) {
22955
22744
  const { entityName, maxAttempts, validateTool, fixTool } = c;
22956
22745
  return {
22957
22746
  name: c.traitName,
@@ -23145,17 +22934,17 @@ function buildTrait75(c) {
23145
22934
  }
23146
22935
  };
23147
22936
  }
23148
- function buildEntity83(c) {
22937
+ function buildEntity82(c) {
23149
22938
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
23150
22939
  }
23151
22940
  function stdAgentFixLoopEntity(params) {
23152
- return buildEntity83(resolve97(params));
22941
+ return buildEntity82(resolve96(params));
23153
22942
  }
23154
22943
  function stdAgentFixLoopTrait(params) {
23155
- return buildTrait75(resolve97(params));
22944
+ return buildTrait74(resolve96(params));
23156
22945
  }
23157
22946
  function stdAgentFixLoopPage(params) {
23158
- const c = resolve97(params);
22947
+ const c = resolve96(params);
23159
22948
  return {
23160
22949
  name: c.pageName,
23161
22950
  path: c.pagePath,
@@ -23171,9 +22960,9 @@ function stdAgentFixLoopPage(params) {
23171
22960
  };
23172
22961
  }
23173
22962
  function stdAgentFixLoop(params) {
23174
- const c = resolve97(params);
22963
+ const c = resolve96(params);
23175
22964
  const { entityName, fields } = c;
23176
- const fixTrait = buildTrait75(c);
22965
+ const fixTrait = buildTrait74(c);
23177
22966
  const validateCallTrait = extractTrait(stdAgentToolCall({
23178
22967
  entityName,
23179
22968
  fields,
@@ -23256,7 +23045,7 @@ function stdAgentFixLoop(params) {
23256
23045
  [page]
23257
23046
  );
23258
23047
  }
23259
- function resolve98(params) {
23048
+ function resolve97(params) {
23260
23049
  const entityName = params.entityName ?? "Session";
23261
23050
  const p = plural(entityName);
23262
23051
  const requiredFields = [
@@ -23283,7 +23072,7 @@ function resolve98(params) {
23283
23072
  isInitial: params.isInitial ?? false
23284
23073
  };
23285
23074
  }
23286
- function buildEntity84(c) {
23075
+ function buildEntity83(c) {
23287
23076
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
23288
23077
  }
23289
23078
  function buildAgentTrait8(c) {
@@ -23436,13 +23225,13 @@ function buildAgentTrait8(c) {
23436
23225
  };
23437
23226
  }
23438
23227
  function stdAgentSessionEntity(params = {}) {
23439
- return buildEntity84(resolve98(params));
23228
+ return buildEntity83(resolve97(params));
23440
23229
  }
23441
23230
  function stdAgentSessionTrait(params = {}) {
23442
- return buildAgentTrait8(resolve98(params));
23231
+ return buildAgentTrait8(resolve97(params));
23443
23232
  }
23444
23233
  function stdAgentSessionPage(params = {}) {
23445
- const c = resolve98(params);
23234
+ const c = resolve97(params);
23446
23235
  return {
23447
23236
  name: c.pageName,
23448
23237
  path: c.pagePath,
@@ -23455,7 +23244,7 @@ function stdAgentSessionPage(params = {}) {
23455
23244
  };
23456
23245
  }
23457
23246
  function stdAgentSession(params = {}) {
23458
- const c = resolve98(params);
23247
+ const c = resolve97(params);
23459
23248
  const { entityName, fields } = c;
23460
23249
  const browseTrait = extractTrait(stdBrowse({
23461
23250
  entityName,
@@ -23514,7 +23303,7 @@ function stdAgentSession(params = {}) {
23514
23303
  emitOnSave: "LABELED"
23515
23304
  }));
23516
23305
  const agentTrait = buildAgentTrait8(c);
23517
- const entity = buildEntity84(c);
23306
+ const entity = buildEntity83(c);
23518
23307
  const page = {
23519
23308
  name: c.pageName,
23520
23309
  path: c.pagePath,
@@ -23653,7 +23442,7 @@ function stdAgentBuilder(params = {}) {
23653
23442
  fix: "wrench"
23654
23443
  }));
23655
23444
  }
23656
- function resolve99(params) {
23445
+ function resolve98(params) {
23657
23446
  const entityName = params.entityName ?? "SearchResult";
23658
23447
  const p = plural(entityName);
23659
23448
  const requiredFields = [
@@ -23679,7 +23468,7 @@ function resolve99(params) {
23679
23468
  isInitial: params.isInitial ?? false
23680
23469
  };
23681
23470
  }
23682
- function buildEntity85(c) {
23471
+ function buildEntity84(c) {
23683
23472
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
23684
23473
  }
23685
23474
  function buildAgentTrait9(c) {
@@ -23767,13 +23556,13 @@ function buildAgentTrait9(c) {
23767
23556
  };
23768
23557
  }
23769
23558
  function stdAgentSearchEntity(params = {}) {
23770
- return buildEntity85(resolve99(params));
23559
+ return buildEntity84(resolve98(params));
23771
23560
  }
23772
23561
  function stdAgentSearchTrait(params = {}) {
23773
- return buildAgentTrait9(resolve99(params));
23562
+ return buildAgentTrait9(resolve98(params));
23774
23563
  }
23775
23564
  function stdAgentSearchPage(params = {}) {
23776
- const c = resolve99(params);
23565
+ const c = resolve98(params);
23777
23566
  return {
23778
23567
  name: c.pageName,
23779
23568
  path: c.pagePath,
@@ -23785,7 +23574,7 @@ function stdAgentSearchPage(params = {}) {
23785
23574
  };
23786
23575
  }
23787
23576
  function stdAgentSearch(params = {}) {
23788
- const c = resolve99(params);
23577
+ const c = resolve98(params);
23789
23578
  const { entityName, fields } = c;
23790
23579
  const browseTrait = extractTrait(stdBrowse({
23791
23580
  entityName,
@@ -23806,7 +23595,7 @@ function stdAgentSearch(params = {}) {
23806
23595
  refreshEvents: ["SEARCHED"]
23807
23596
  }));
23808
23597
  const agentTrait = buildAgentTrait9(c);
23809
- const entity = buildEntity85(c);
23598
+ const entity = buildEntity84(c);
23810
23599
  const page = {
23811
23600
  name: c.pageName,
23812
23601
  path: c.pagePath,
@@ -23820,7 +23609,7 @@ function stdAgentSearch(params = {}) {
23820
23609
  }
23821
23610
 
23822
23611
  // behaviors/functions/molecules/std-agent-rag.ts
23823
- function resolve100(params) {
23612
+ function resolve99(params) {
23824
23613
  const entityName = params.entityName ?? "RagRequest";
23825
23614
  const p = plural(entityName);
23826
23615
  const requiredFields = [
@@ -24147,17 +23936,17 @@ function buildRagTrait(c) {
24147
23936
  }
24148
23937
  };
24149
23938
  }
24150
- function buildEntity86(c) {
23939
+ function buildEntity85(c) {
24151
23940
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
24152
23941
  }
24153
23942
  function stdAgentRagEntity(params) {
24154
- return buildEntity86(resolve100(params));
23943
+ return buildEntity85(resolve99(params));
24155
23944
  }
24156
23945
  function stdAgentRagTrait(params) {
24157
- return buildRagTrait(resolve100(params));
23946
+ return buildRagTrait(resolve99(params));
24158
23947
  }
24159
23948
  function stdAgentRagPage(params) {
24160
- const c = resolve100(params);
23949
+ const c = resolve99(params);
24161
23950
  return {
24162
23951
  name: c.pageName,
24163
23952
  path: c.pagePath,
@@ -24172,7 +23961,7 @@ function stdAgentRagPage(params) {
24172
23961
  };
24173
23962
  }
24174
23963
  function stdAgentRag(params) {
24175
- const c = resolve100(params);
23964
+ const c = resolve99(params);
24176
23965
  const { entityName, fields } = c;
24177
23966
  const ragTrait = buildRagTrait(c);
24178
23967
  const memoryTrait = extractTrait(stdAgentMemory({
@@ -25228,6 +25017,185 @@ function stdAgentTutor(params = {}) {
25228
25017
  concepts: "brain"
25229
25018
  }));
25230
25019
  }
25020
+ function resolve100(params) {
25021
+ const entityName = params.entityName ?? "ActivityEntry";
25022
+ const p = plural(entityName);
25023
+ const requiredFields = [
25024
+ { name: "action", type: "string", default: "" },
25025
+ { name: "detail", type: "string", default: "" },
25026
+ { name: "status", type: "string", default: "pending" },
25027
+ { name: "timestamp", type: "string", default: "" },
25028
+ { name: "duration", type: "number", default: 0 },
25029
+ { name: "icon", type: "string", default: "circle" }
25030
+ ];
25031
+ const baseFields = params.fields ?? [];
25032
+ const existingNames = new Set(baseFields.map((f) => f.name));
25033
+ const mergedFields = [
25034
+ ...baseFields,
25035
+ ...requiredFields.filter((f) => !existingNames.has(f.name))
25036
+ ];
25037
+ const fields = ensureIdField(mergedFields);
25038
+ return {
25039
+ entityName,
25040
+ fields,
25041
+ persistence: params.persistence ?? "persistent",
25042
+ traitName: `${entityName}Log`,
25043
+ pluralName: p,
25044
+ pageName: params.pageName ?? `${entityName}Page`,
25045
+ pagePath: params.pagePath ?? `/${p.toLowerCase()}`,
25046
+ isInitial: params.isInitial ?? false
25047
+ };
25048
+ }
25049
+ function buildEntity86(c) {
25050
+ return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
25051
+ }
25052
+ function buildTrait75(c) {
25053
+ const { entityName } = c;
25054
+ const loggingUI = {
25055
+ type: "stack",
25056
+ direction: "vertical",
25057
+ gap: "lg",
25058
+ children: [
25059
+ {
25060
+ type: "stack",
25061
+ direction: "horizontal",
25062
+ gap: "sm",
25063
+ justify: "space-between",
25064
+ align: "center",
25065
+ children: [
25066
+ {
25067
+ type: "stack",
25068
+ direction: "horizontal",
25069
+ gap: "sm",
25070
+ align: "center",
25071
+ children: [
25072
+ { type: "icon", name: "activity", size: "lg" },
25073
+ { type: "typography", content: "Activity Log", variant: "h2" }
25074
+ ]
25075
+ },
25076
+ { type: "button", label: "Clear", event: "CLEAR", variant: "ghost", icon: "trash" }
25077
+ ]
25078
+ },
25079
+ { type: "divider" },
25080
+ {
25081
+ type: "timeline",
25082
+ entity: entityName,
25083
+ emptyIcon: "activity",
25084
+ emptyTitle: "No activity yet",
25085
+ emptyDescription: "Agent actions will appear here as they occur.",
25086
+ renderItem: ["fn", "item", {
25087
+ type: "stack",
25088
+ direction: "vertical",
25089
+ gap: "xs",
25090
+ children: [
25091
+ {
25092
+ type: "stack",
25093
+ direction: "horizontal",
25094
+ gap: "sm",
25095
+ align: "center",
25096
+ children: [
25097
+ { type: "badge", label: "@item.status" },
25098
+ { type: "typography", variant: "h4", content: "@item.action" }
25099
+ ]
25100
+ },
25101
+ { type: "typography", variant: "body", color: "muted", content: "@item.detail" },
25102
+ {
25103
+ type: "stack",
25104
+ direction: "horizontal",
25105
+ gap: "sm",
25106
+ align: "center",
25107
+ children: [
25108
+ { type: "typography", variant: "caption", color: "muted", content: "@item.timestamp" },
25109
+ { type: "badge", label: "@item.duration", variant: "outline" }
25110
+ ]
25111
+ }
25112
+ ]
25113
+ }]
25114
+ }
25115
+ ]
25116
+ };
25117
+ return {
25118
+ name: c.traitName,
25119
+ linkedEntity: entityName,
25120
+ category: "interaction",
25121
+ emits: [
25122
+ { event: "LOG_ENTRY", scope: "external", payload: [
25123
+ { name: "action", type: "string" },
25124
+ { name: "detail", type: "string" },
25125
+ { name: "status", type: "string" }
25126
+ ] }
25127
+ ],
25128
+ listens: [
25129
+ { event: "LOG_ENTRY", triggers: "LOG_ENTRY", scope: "external" }
25130
+ ],
25131
+ stateMachine: {
25132
+ states: [
25133
+ { name: "logging", isInitial: true }
25134
+ ],
25135
+ events: [
25136
+ { key: "INIT", name: "Initialize" },
25137
+ { key: "LOG_ENTRY", name: "Log Entry", payload: [
25138
+ { name: "action", type: "string", required: true },
25139
+ { name: "detail", type: "string", required: true },
25140
+ { name: "status", type: "string", required: true }
25141
+ ] },
25142
+ { key: "CLEAR", name: "Clear Log" }
25143
+ ],
25144
+ transitions: [
25145
+ {
25146
+ from: "logging",
25147
+ to: "logging",
25148
+ event: "INIT",
25149
+ effects: [
25150
+ ["fetch", entityName],
25151
+ ["render-ui", "main", loggingUI]
25152
+ ]
25153
+ },
25154
+ {
25155
+ from: "logging",
25156
+ to: "logging",
25157
+ event: "LOG_ENTRY",
25158
+ effects: [
25159
+ ["persist", "create", entityName, {
25160
+ action: "@payload.action",
25161
+ detail: "@payload.detail",
25162
+ status: "@payload.status",
25163
+ timestamp: "@now"
25164
+ }],
25165
+ ["fetch", entityName],
25166
+ ["render-ui", "main", loggingUI]
25167
+ ]
25168
+ },
25169
+ {
25170
+ from: "logging",
25171
+ to: "logging",
25172
+ event: "CLEAR",
25173
+ effects: [
25174
+ ["persist", "delete", entityName],
25175
+ ["fetch", entityName],
25176
+ ["render-ui", "main", loggingUI]
25177
+ ]
25178
+ }
25179
+ ]
25180
+ }
25181
+ };
25182
+ }
25183
+ function buildPage73(c) {
25184
+ return makePage({ name: c.pageName, path: c.pagePath, traitName: c.traitName, isInitial: c.isInitial });
25185
+ }
25186
+ function stdAgentActivityLogEntity(params = {}) {
25187
+ return buildEntity86(resolve100(params));
25188
+ }
25189
+ function stdAgentActivityLogTrait(params = {}) {
25190
+ return buildTrait75(resolve100(params));
25191
+ }
25192
+ function stdAgentActivityLogPage(params = {}) {
25193
+ return buildPage73(resolve100(params));
25194
+ }
25195
+ function stdAgentActivityLog(params = {}) {
25196
+ const c = resolve100(params);
25197
+ return makeOrbital(`${c.entityName}Orbital`, buildEntity86(c), [buildTrait75(c)], [buildPage73(c)]);
25198
+ }
25231
25199
  function resolve101(params) {
25232
25200
  const entityName = params.entityName ?? "LearningRecord";
25233
25201
  const p = plural(entityName);
@@ -25258,7 +25226,8 @@ function resolve101(params) {
25258
25226
  { name: "action", type: "string", default: "" },
25259
25227
  { name: "detail", type: "string", default: "" },
25260
25228
  { name: "timestamp", type: "string", default: "" },
25261
- { name: "duration", type: "number", default: 0 }
25229
+ { name: "duration", type: "number", default: 0 },
25230
+ { name: "icon", type: "string", default: "circle" }
25262
25231
  ];
25263
25232
  const baseFields = ensureIdField(params.fields ?? []);
25264
25233
  const userFieldNames = new Set(baseFields.map((f) => f.name));
@@ -25298,7 +25267,7 @@ function idleView5(_entityName) {
25298
25267
  { type: "divider" },
25299
25268
  {
25300
25269
  type: "simple-grid",
25301
- columns: 3,
25270
+ cols: 3,
25302
25271
  children: [
25303
25272
  { type: "stat-display", label: "Successes", value: `@entity.totalSuccesses`, icon: "check-circle" },
25304
25273
  { type: "stat-display", label: "Failures", value: `@entity.totalFailures`, icon: "x-circle" },
@@ -25572,7 +25541,6 @@ function stdAgentLearnerPage(params) {
25572
25541
  ...c.isInitial ? { isInitial: true } : {},
25573
25542
  traits: [
25574
25543
  { ref: c.traitName },
25575
- { ref: "LearnerActivityLog" },
25576
25544
  { ref: "LearnerRecordsBrowse" },
25577
25545
  { ref: "LearnerMemoryLifecycle" },
25578
25546
  { ref: "LearnerCompletionFlow" },
@@ -25620,18 +25588,6 @@ function stdAgentLearner(params) {
25620
25588
  e.scope = "internal";
25621
25589
  }
25622
25590
  }
25623
- const activityLogTrait = extractTrait(stdAgentActivityLog({
25624
- entityName,
25625
- fields,
25626
- persistence: "runtime"
25627
- }));
25628
- activityLogTrait.name = "LearnerActivityLog";
25629
- activityLogTrait.listens = [];
25630
- if (activityLogTrait.emits) {
25631
- for (const e of activityLogTrait.emits) {
25632
- e.scope = "internal";
25633
- }
25634
- }
25635
25591
  const recordsBrowseTrait = extractTrait(stdBrowse({
25636
25592
  entityName,
25637
25593
  fields,
@@ -25651,7 +25607,6 @@ function stdAgentLearner(params) {
25651
25607
  ...c.isInitial ? { isInitial: true } : {},
25652
25608
  traits: [
25653
25609
  { ref: learnerTrait.name },
25654
- { ref: activityLogTrait.name },
25655
25610
  { ref: recordsBrowseTrait.name },
25656
25611
  { ref: memoryTrait.name },
25657
25612
  { ref: completionTrait.name },
@@ -25661,7 +25616,7 @@ function stdAgentLearner(params) {
25661
25616
  return makeOrbital(
25662
25617
  `${entityName}Orbital`,
25663
25618
  entity,
25664
- [learnerTrait, activityLogTrait, recordsBrowseTrait, memoryTrait, completionTrait, providerTrait],
25619
+ [learnerTrait, recordsBrowseTrait, memoryTrait, completionTrait, providerTrait],
25665
25620
  [page]
25666
25621
  );
25667
25622
  }