@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
@@ -20353,187 +20353,9 @@ function stdAgentCompletion(params = {}) {
20353
20353
  };
20354
20354
  return makeOrbital(`${c.entityName}Orbital`, entity, [modalTrait, notifTrait, agentTrait], [page]);
20355
20355
  }
20356
- function resolve92(params) {
20357
- const entityName = params.entityName ?? "ActivityEntry";
20358
- const p = plural(entityName);
20359
- const requiredFields = [
20360
- { name: "action", type: "string", default: "" },
20361
- { name: "detail", type: "string", default: "" },
20362
- { name: "status", type: "string", default: "pending" },
20363
- { name: "timestamp", type: "string", default: "" },
20364
- { name: "duration", type: "number", default: 0 }
20365
- ];
20366
- const baseFields = params.fields ?? [];
20367
- const existingNames = new Set(baseFields.map((f) => f.name));
20368
- const mergedFields = [
20369
- ...baseFields,
20370
- ...requiredFields.filter((f) => !existingNames.has(f.name))
20371
- ];
20372
- const fields = ensureIdField(mergedFields);
20373
- return {
20374
- entityName,
20375
- fields,
20376
- persistence: params.persistence ?? "persistent",
20377
- traitName: `${entityName}Log`,
20378
- pluralName: p,
20379
- pageName: params.pageName ?? `${entityName}Page`,
20380
- pagePath: params.pagePath ?? `/${p.toLowerCase()}`,
20381
- isInitial: params.isInitial ?? false
20382
- };
20383
- }
20384
- function buildEntity78(c) {
20385
- return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
20386
- }
20387
- function buildTrait71(c) {
20388
- const { entityName } = c;
20389
- const loggingUI = {
20390
- type: "stack",
20391
- direction: "vertical",
20392
- gap: "lg",
20393
- children: [
20394
- {
20395
- type: "stack",
20396
- direction: "horizontal",
20397
- gap: "sm",
20398
- justify: "space-between",
20399
- align: "center",
20400
- children: [
20401
- {
20402
- type: "stack",
20403
- direction: "horizontal",
20404
- gap: "sm",
20405
- align: "center",
20406
- children: [
20407
- { type: "icon", name: "activity", size: "lg" },
20408
- { type: "typography", content: "Activity Log", variant: "h2" }
20409
- ]
20410
- },
20411
- { type: "button", label: "Clear", event: "CLEAR", variant: "ghost", icon: "trash" }
20412
- ]
20413
- },
20414
- { type: "divider" },
20415
- {
20416
- type: "timeline",
20417
- entity: entityName,
20418
- emptyIcon: "activity",
20419
- emptyTitle: "No activity yet",
20420
- emptyDescription: "Agent actions will appear here as they occur.",
20421
- renderItem: ["fn", "item", {
20422
- type: "stack",
20423
- direction: "vertical",
20424
- gap: "xs",
20425
- children: [
20426
- {
20427
- type: "stack",
20428
- direction: "horizontal",
20429
- gap: "sm",
20430
- align: "center",
20431
- children: [
20432
- { type: "badge", label: "@item.status" },
20433
- { type: "typography", variant: "h4", content: "@item.action" }
20434
- ]
20435
- },
20436
- { type: "typography", variant: "body", color: "muted", content: "@item.detail" },
20437
- {
20438
- type: "stack",
20439
- direction: "horizontal",
20440
- gap: "sm",
20441
- align: "center",
20442
- children: [
20443
- { type: "typography", variant: "caption", color: "muted", content: "@item.timestamp" },
20444
- { type: "badge", label: "@item.duration", variant: "outline" }
20445
- ]
20446
- }
20447
- ]
20448
- }]
20449
- }
20450
- ]
20451
- };
20452
- return {
20453
- name: c.traitName,
20454
- linkedEntity: entityName,
20455
- category: "interaction",
20456
- emits: [
20457
- { event: "LOG_ENTRY", scope: "external", payload: [
20458
- { name: "action", type: "string" },
20459
- { name: "detail", type: "string" },
20460
- { name: "status", type: "string" }
20461
- ] }
20462
- ],
20463
- listens: [
20464
- { event: "LOG_ENTRY", triggers: "LOG_ENTRY", scope: "external" }
20465
- ],
20466
- stateMachine: {
20467
- states: [
20468
- { name: "logging", isInitial: true }
20469
- ],
20470
- events: [
20471
- { key: "INIT", name: "Initialize" },
20472
- { key: "LOG_ENTRY", name: "Log Entry", payload: [
20473
- { name: "action", type: "string", required: true },
20474
- { name: "detail", type: "string", required: true },
20475
- { name: "status", type: "string", required: true }
20476
- ] },
20477
- { key: "CLEAR", name: "Clear Log" }
20478
- ],
20479
- transitions: [
20480
- {
20481
- from: "logging",
20482
- to: "logging",
20483
- event: "INIT",
20484
- effects: [
20485
- ["fetch", entityName],
20486
- ["render-ui", "main", loggingUI]
20487
- ]
20488
- },
20489
- {
20490
- from: "logging",
20491
- to: "logging",
20492
- event: "LOG_ENTRY",
20493
- effects: [
20494
- ["persist", "create", entityName, {
20495
- action: "@payload.action",
20496
- detail: "@payload.detail",
20497
- status: "@payload.status",
20498
- timestamp: "@now"
20499
- }],
20500
- ["fetch", entityName],
20501
- ["render-ui", "main", loggingUI]
20502
- ]
20503
- },
20504
- {
20505
- from: "logging",
20506
- to: "logging",
20507
- event: "CLEAR",
20508
- effects: [
20509
- ["persist", "delete", entityName],
20510
- ["fetch", entityName],
20511
- ["render-ui", "main", loggingUI]
20512
- ]
20513
- }
20514
- ]
20515
- }
20516
- };
20517
- }
20518
- function buildPage72(c) {
20519
- return makePage({ name: c.pageName, path: c.pagePath, traitName: c.traitName, isInitial: c.isInitial });
20520
- }
20521
- function stdAgentActivityLogEntity(params = {}) {
20522
- return buildEntity78(resolve92(params));
20523
- }
20524
- function stdAgentActivityLogTrait(params = {}) {
20525
- return buildTrait71(resolve92(params));
20526
- }
20527
- function stdAgentActivityLogPage(params = {}) {
20528
- return buildPage72(resolve92(params));
20529
- }
20530
- function stdAgentActivityLog(params = {}) {
20531
- const c = resolve92(params);
20532
- return makeOrbital(`${c.entityName}Orbital`, buildEntity78(c), [buildTrait71(c)], [buildPage72(c)]);
20533
- }
20534
20356
 
20535
20357
  // behaviors/functions/molecules/std-agent-planner.ts
20536
- function resolve93(params) {
20358
+ function resolve92(params) {
20537
20359
  const entityName = params.entityName ?? "Plan";
20538
20360
  const p = plural(entityName);
20539
20361
  const requiredFields = [
@@ -20558,7 +20380,8 @@ function resolve93(params) {
20558
20380
  { name: "action", type: "string", default: "" },
20559
20381
  { name: "detail", type: "string", default: "" },
20560
20382
  { name: "timestamp", type: "string", default: "" },
20561
- { name: "duration", type: "number", default: 0 }
20383
+ { name: "duration", type: "number", default: 0 },
20384
+ { name: "icon", type: "string", default: "circle" }
20562
20385
  ];
20563
20386
  const baseFields = ensureIdField(params.fields ?? []);
20564
20387
  const userFieldNames = new Set(baseFields.map((f) => f.name));
@@ -20743,7 +20566,7 @@ function errorView2(_entityName) {
20743
20566
  ]
20744
20567
  };
20745
20568
  }
20746
- function buildTrait72(c) {
20569
+ function buildTrait71(c) {
20747
20570
  const { entityName, categories, memoryLimit } = c;
20748
20571
  const categoryList = categories.join(", ");
20749
20572
  return {
@@ -20926,17 +20749,17 @@ function buildTrait72(c) {
20926
20749
  }
20927
20750
  };
20928
20751
  }
20929
- function buildEntity79(c) {
20752
+ function buildEntity78(c) {
20930
20753
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
20931
20754
  }
20932
20755
  function stdAgentPlannerEntity(params) {
20933
- return buildEntity79(resolve93(params));
20756
+ return buildEntity78(resolve92(params));
20934
20757
  }
20935
20758
  function stdAgentPlannerTrait(params) {
20936
- return buildTrait72(resolve93(params));
20759
+ return buildTrait71(resolve92(params));
20937
20760
  }
20938
20761
  function stdAgentPlannerPage(params) {
20939
- const c = resolve93(params);
20762
+ const c = resolve92(params);
20940
20763
  return {
20941
20764
  name: c.pageName,
20942
20765
  path: c.pagePath,
@@ -20944,7 +20767,6 @@ function stdAgentPlannerPage(params) {
20944
20767
  traits: [
20945
20768
  { ref: c.traitName },
20946
20769
  { ref: "PlannerTaskInput" },
20947
- { ref: "PlannerActivityLog" },
20948
20770
  { ref: "PlannerClassifierFlow" },
20949
20771
  { ref: "PlannerCompletionFlow" },
20950
20772
  { ref: "PlannerMemoryLifecycle" }
@@ -20952,9 +20774,9 @@ function stdAgentPlannerPage(params) {
20952
20774
  };
20953
20775
  }
20954
20776
  function stdAgentPlanner(params) {
20955
- const c = resolve93(params);
20777
+ const c = resolve92(params);
20956
20778
  const { entityName, fields } = c;
20957
- const plannerTrait = buildTrait72(c);
20779
+ const plannerTrait = buildTrait71(c);
20958
20780
  const classifierTrait = extractTrait(stdAgentClassifier({
20959
20781
  entityName,
20960
20782
  fields,
@@ -21015,18 +20837,6 @@ function stdAgentPlanner(params) {
21015
20837
  saveEvent: "PLAN"
21016
20838
  }));
21017
20839
  modalTrait.name = "PlannerTaskInput";
21018
- const activityLogTrait = extractTrait(stdAgentActivityLog({
21019
- entityName,
21020
- fields,
21021
- persistence: "runtime"
21022
- }));
21023
- activityLogTrait.name = "PlannerActivityLog";
21024
- activityLogTrait.listens = [];
21025
- if (activityLogTrait.emits) {
21026
- for (const e of activityLogTrait.emits) {
21027
- e.scope = "internal";
21028
- }
21029
- }
21030
20840
  const entity = makeEntity({ name: entityName, fields, persistence: c.persistence });
21031
20841
  const page = {
21032
20842
  name: c.pageName,
@@ -21035,7 +20845,6 @@ function stdAgentPlanner(params) {
21035
20845
  traits: [
21036
20846
  { ref: plannerTrait.name },
21037
20847
  { ref: modalTrait.name },
21038
- { ref: activityLogTrait.name },
21039
20848
  { ref: classifierTrait.name },
21040
20849
  { ref: completionTrait.name },
21041
20850
  { ref: memoryTrait.name }
@@ -21044,11 +20853,11 @@ function stdAgentPlanner(params) {
21044
20853
  return makeOrbital(
21045
20854
  `${entityName}Orbital`,
21046
20855
  entity,
21047
- [plannerTrait, modalTrait, activityLogTrait, classifierTrait, completionTrait, memoryTrait],
20856
+ [plannerTrait, modalTrait, classifierTrait, completionTrait, memoryTrait],
21048
20857
  [page]
21049
20858
  );
21050
20859
  }
21051
- function resolve94(params) {
20860
+ function resolve93(params) {
21052
20861
  const entityName = params.entityName ?? "ToolCall";
21053
20862
  const p = plural(entityName);
21054
20863
  const requiredFields = [
@@ -21079,7 +20888,7 @@ function resolve94(params) {
21079
20888
  isInitial: params.isInitial ?? false
21080
20889
  };
21081
20890
  }
21082
- function buildEntity80(c) {
20891
+ function buildEntity79(c) {
21083
20892
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
21084
20893
  }
21085
20894
  function buildAgentTrait7(c) {
@@ -21220,26 +21029,25 @@ function buildAgentTrait7(c) {
21220
21029
  };
21221
21030
  }
21222
21031
  function stdAgentToolCallEntity(params = {}) {
21223
- return buildEntity80(resolve94(params));
21032
+ return buildEntity79(resolve93(params));
21224
21033
  }
21225
21034
  function stdAgentToolCallTrait(params = {}) {
21226
- return buildAgentTrait7(resolve94(params));
21035
+ return buildAgentTrait7(resolve93(params));
21227
21036
  }
21228
21037
  function stdAgentToolCallPage(params = {}) {
21229
- const c = resolve94(params);
21038
+ const c = resolve93(params);
21230
21039
  return {
21231
21040
  name: c.pageName,
21232
21041
  path: c.pagePath,
21233
21042
  ...c.isInitial ? { isInitial: true } : {},
21234
21043
  traits: [
21235
21044
  { ref: `${c.entityName}Modal` },
21236
- { ref: `${c.entityName}Log` },
21237
21045
  { ref: `${c.entityName}Agent` }
21238
21046
  ]
21239
21047
  };
21240
21048
  }
21241
21049
  function stdAgentToolCall(params = {}) {
21242
- const c = resolve94(params);
21050
+ const c = resolve93(params);
21243
21051
  const { entityName, fields } = c;
21244
21052
  const invokeContent = {
21245
21053
  type: "stack",
@@ -21267,30 +21075,24 @@ function stdAgentToolCall(params = {}) {
21267
21075
  saveEffects: [["persist", "create", entityName, "@payload.data"]],
21268
21076
  emitOnSave: "INVOKED"
21269
21077
  }));
21270
- const activityLogTrait = extractTrait(stdAgentActivityLog({
21271
- entityName,
21272
- fields
21273
- }));
21274
21078
  const agentTrait = buildAgentTrait7(c);
21275
- const entity = buildEntity80(c);
21079
+ const entity = buildEntity79(c);
21276
21080
  const page = {
21277
21081
  name: c.pageName,
21278
21082
  path: c.pagePath,
21279
21083
  ...c.isInitial ? { isInitial: true } : {},
21280
21084
  traits: [
21281
21085
  { ref: modalTrait.name },
21282
- { ref: activityLogTrait.name },
21283
21086
  { ref: agentTrait.name }
21284
21087
  ]
21285
21088
  };
21286
- return makeOrbital(`${c.entityName}Orbital`, entity, [modalTrait, activityLogTrait, agentTrait], [page]);
21089
+ return makeOrbital(`${c.entityName}Orbital`, entity, [modalTrait, agentTrait], [page]);
21287
21090
  }
21288
- function resolve95(params) {
21091
+ function resolve94(params) {
21289
21092
  const entityName = params.entityName ?? "StepTracker";
21290
21093
  const p = plural(entityName);
21291
21094
  const stepLabels = params.stepLabels ?? ["Initialize", "Process", "Validate", "Complete"];
21292
21095
  const requiredFields = [
21293
- { name: "steps", type: "string", default: stepLabels.join(",") },
21294
21096
  { name: "currentStep", type: "number", default: 0 },
21295
21097
  { name: "totalSteps", type: "number", default: stepLabels.length },
21296
21098
  { name: "status", type: "string", default: "idle" }
@@ -21314,11 +21116,12 @@ function resolve95(params) {
21314
21116
  isInitial: params.isInitial ?? false
21315
21117
  };
21316
21118
  }
21317
- function buildEntity81(c) {
21119
+ function buildEntity80(c) {
21318
21120
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
21319
21121
  }
21320
- function buildTrait73(c) {
21122
+ function buildTrait72(c) {
21321
21123
  const { entityName } = c;
21124
+ const stepsLiteral = c.stepLabels.map((label, i) => ({ id: String(i), title: label }));
21322
21125
  const idleUI = {
21323
21126
  type: "stack",
21324
21127
  direction: "vertical",
@@ -21336,7 +21139,7 @@ function buildTrait73(c) {
21336
21139
  ]
21337
21140
  },
21338
21141
  { type: "divider" },
21339
- { type: "wizard-progress", currentStep: "@entity.currentStep", totalSteps: "@entity.totalSteps", steps: "@entity.steps" },
21142
+ { type: "wizard-progress", currentStep: "@entity.currentStep", steps: stepsLiteral },
21340
21143
  { type: "button", label: "Start", event: "START", variant: "primary", icon: "play" }
21341
21144
  ]
21342
21145
  };
@@ -21357,7 +21160,7 @@ function buildTrait73(c) {
21357
21160
  ]
21358
21161
  },
21359
21162
  { type: "divider" },
21360
- { type: "wizard-progress", currentStep: "@entity.currentStep", totalSteps: "@entity.totalSteps", steps: "@entity.steps" },
21163
+ { type: "wizard-progress", currentStep: "@entity.currentStep", steps: stepsLiteral },
21361
21164
  {
21362
21165
  type: "stack",
21363
21166
  direction: "horizontal",
@@ -21396,7 +21199,7 @@ function buildTrait73(c) {
21396
21199
  ]
21397
21200
  },
21398
21201
  { type: "divider" },
21399
- { type: "wizard-progress", currentStep: "@entity.totalSteps", totalSteps: "@entity.totalSteps", steps: "@entity.steps" },
21202
+ { type: "wizard-progress", currentStep: "@entity.totalSteps", steps: stepsLiteral },
21400
21203
  { type: "alert", variant: "success", message: "All steps completed successfully." },
21401
21204
  { type: "button", label: "Reset", event: "RESET", variant: "ghost", icon: "rotate-ccw" }
21402
21205
  ]
@@ -21418,7 +21221,7 @@ function buildTrait73(c) {
21418
21221
  ]
21419
21222
  },
21420
21223
  { type: "divider" },
21421
- { type: "wizard-progress", currentStep: "@entity.currentStep", totalSteps: "@entity.totalSteps", steps: "@entity.steps" },
21224
+ { type: "wizard-progress", currentStep: "@entity.currentStep", steps: stepsLiteral },
21422
21225
  { type: "alert", variant: "error", message: "Pipeline failed at the current step." },
21423
21226
  {
21424
21227
  type: "stack",
@@ -21553,25 +21356,25 @@ function buildTrait73(c) {
21553
21356
  }
21554
21357
  };
21555
21358
  }
21556
- function buildPage73(c) {
21359
+ function buildPage72(c) {
21557
21360
  return makePage({ name: c.pageName, path: c.pagePath, traitName: c.traitName, isInitial: c.isInitial });
21558
21361
  }
21559
21362
  function stdAgentStepProgressEntity(params = {}) {
21560
- return buildEntity81(resolve95(params));
21363
+ return buildEntity80(resolve94(params));
21561
21364
  }
21562
21365
  function stdAgentStepProgressTrait(params = {}) {
21563
- return buildTrait73(resolve95(params));
21366
+ return buildTrait72(resolve94(params));
21564
21367
  }
21565
21368
  function stdAgentStepProgressPage(params = {}) {
21566
- return buildPage73(resolve95(params));
21369
+ return buildPage72(resolve94(params));
21567
21370
  }
21568
21371
  function stdAgentStepProgress(params = {}) {
21569
- const c = resolve95(params);
21570
- return makeOrbital(`${c.entityName}Orbital`, buildEntity81(c), [buildTrait73(c)], [buildPage73(c)]);
21372
+ const c = resolve94(params);
21373
+ return makeOrbital(`${c.entityName}Orbital`, buildEntity80(c), [buildTrait72(c)], [buildPage72(c)]);
21571
21374
  }
21572
21375
 
21573
21376
  // behaviors/functions/molecules/std-agent-tool-loop.ts
21574
- function resolve96(params) {
21377
+ function resolve95(params) {
21575
21378
  const entityName = params.entityName ?? "ToolLoop";
21576
21379
  const p = plural(entityName);
21577
21380
  const requiredFields = [
@@ -21769,7 +21572,7 @@ function completedView(_entityName) {
21769
21572
  { type: "divider" },
21770
21573
  {
21771
21574
  type: "simple-grid",
21772
- columns: 2,
21575
+ cols: 2,
21773
21576
  children: [
21774
21577
  { type: "stat-display", label: "Iterations", value: `@entity.iterations`, icon: "repeat" },
21775
21578
  { type: "stat-display", label: "Status", value: `@entity.status`, icon: "check" }
@@ -21806,7 +21609,7 @@ function failedView(_entityName) {
21806
21609
  { type: "alert", variant: "error", message: `@entity.error` },
21807
21610
  {
21808
21611
  type: "simple-grid",
21809
- columns: 2,
21612
+ cols: 2,
21810
21613
  children: [
21811
21614
  { type: "stat-display", label: "Iterations Used", value: `@entity.iterations`, icon: "repeat" },
21812
21615
  { type: "stat-display", label: "Max Allowed", value: `@entity.maxIterations`, icon: "shield" }
@@ -21816,7 +21619,7 @@ function failedView(_entityName) {
21816
21619
  ]
21817
21620
  };
21818
21621
  }
21819
- function buildTrait74(c) {
21622
+ function buildTrait73(c) {
21820
21623
  const { entityName, maxIterations, compactThreshold } = c;
21821
21624
  return {
21822
21625
  name: c.traitName,
@@ -22027,17 +21830,17 @@ function buildTrait74(c) {
22027
21830
  }
22028
21831
  };
22029
21832
  }
22030
- function buildEntity82(c) {
21833
+ function buildEntity81(c) {
22031
21834
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
22032
21835
  }
22033
21836
  function stdAgentToolLoopEntity(params) {
22034
- return buildEntity82(resolve96(params));
21837
+ return buildEntity81(resolve95(params));
22035
21838
  }
22036
21839
  function stdAgentToolLoopTrait(params) {
22037
- return buildTrait74(resolve96(params));
21840
+ return buildTrait73(resolve95(params));
22038
21841
  }
22039
21842
  function stdAgentToolLoopPage(params) {
22040
- const c = resolve96(params);
21843
+ const c = resolve95(params);
22041
21844
  return {
22042
21845
  name: c.pageName,
22043
21846
  path: c.pagePath,
@@ -22045,7 +21848,6 @@ function stdAgentToolLoopPage(params) {
22045
21848
  traits: [
22046
21849
  { ref: c.traitName },
22047
21850
  { ref: "ToolLoopStepProgress" },
22048
- { ref: "ToolLoopActivityLog" },
22049
21851
  { ref: "ToolLoopCompletionFlow" },
22050
21852
  { ref: "ToolLoopToolCallFlow" },
22051
21853
  { ref: "ToolLoopContextMonitor" }
@@ -22053,9 +21855,9 @@ function stdAgentToolLoopPage(params) {
22053
21855
  };
22054
21856
  }
22055
21857
  function stdAgentToolLoop(params) {
22056
- const c = resolve96(params);
21858
+ const c = resolve95(params);
22057
21859
  const { entityName, fields } = c;
22058
- const loopTrait = buildTrait74(c);
21860
+ const loopTrait = buildTrait73(c);
22059
21861
  const completionTrait = extractTrait(stdAgentCompletion({
22060
21862
  entityName,
22061
21863
  fields,
@@ -22105,18 +21907,6 @@ function stdAgentToolLoop(params) {
22105
21907
  e.scope = "internal";
22106
21908
  }
22107
21909
  }
22108
- const activityLogTrait = extractTrait(stdAgentActivityLog({
22109
- entityName,
22110
- fields,
22111
- persistence: "runtime"
22112
- }));
22113
- activityLogTrait.name = "ToolLoopActivityLog";
22114
- activityLogTrait.listens = [];
22115
- if (activityLogTrait.emits) {
22116
- for (const e of activityLogTrait.emits) {
22117
- e.scope = "internal";
22118
- }
22119
- }
22120
21910
  const entity = makeEntity({ name: entityName, fields, persistence: c.persistence });
22121
21911
  const page = {
22122
21912
  name: c.pageName,
@@ -22125,7 +21915,6 @@ function stdAgentToolLoop(params) {
22125
21915
  traits: [
22126
21916
  { ref: loopTrait.name },
22127
21917
  { ref: stepProgressTrait.name },
22128
- { ref: activityLogTrait.name },
22129
21918
  { ref: completionTrait.name },
22130
21919
  { ref: toolCallTrait.name },
22131
21920
  { ref: contextTrait.name }
@@ -22134,11 +21923,11 @@ function stdAgentToolLoop(params) {
22134
21923
  return makeOrbital(
22135
21924
  `${entityName}Orbital`,
22136
21925
  entity,
22137
- [loopTrait, stepProgressTrait, activityLogTrait, completionTrait, toolCallTrait, contextTrait],
21926
+ [loopTrait, stepProgressTrait, completionTrait, toolCallTrait, contextTrait],
22138
21927
  [page]
22139
21928
  );
22140
21929
  }
22141
- function resolve97(params) {
21930
+ function resolve96(params) {
22142
21931
  const entityName = params.entityName ?? "FixLoop";
22143
21932
  const p = plural(entityName);
22144
21933
  const requiredFields = [
@@ -22334,7 +22123,7 @@ function succeededView() {
22334
22123
  { type: "divider" },
22335
22124
  {
22336
22125
  type: "simple-grid",
22337
- columns: 2,
22126
+ cols: 2,
22338
22127
  children: [
22339
22128
  { type: "stat-display", label: "Fix Attempts", value: `@entity.fixAttempts`, icon: "wrench" },
22340
22129
  { type: "stat-display", label: "Status", value: "Passed", icon: "check" }
@@ -22367,7 +22156,7 @@ function failedView2() {
22367
22156
  { type: "alert", variant: "error", message: `@entity.error` },
22368
22157
  {
22369
22158
  type: "simple-grid",
22370
- columns: 2,
22159
+ cols: 2,
22371
22160
  children: [
22372
22161
  { type: "stat-display", label: "Attempts Used", value: `@entity.fixAttempts`, icon: "wrench" },
22373
22162
  { type: "stat-display", label: "Remaining Errors", value: `@entity.errorCount`, icon: "alert-triangle" }
@@ -22389,7 +22178,7 @@ function failedView2() {
22389
22178
  ]
22390
22179
  };
22391
22180
  }
22392
- function buildTrait75(c) {
22181
+ function buildTrait74(c) {
22393
22182
  const { entityName, maxAttempts, validateTool, fixTool } = c;
22394
22183
  return {
22395
22184
  name: c.traitName,
@@ -22583,17 +22372,17 @@ function buildTrait75(c) {
22583
22372
  }
22584
22373
  };
22585
22374
  }
22586
- function buildEntity83(c) {
22375
+ function buildEntity82(c) {
22587
22376
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
22588
22377
  }
22589
22378
  function stdAgentFixLoopEntity(params) {
22590
- return buildEntity83(resolve97(params));
22379
+ return buildEntity82(resolve96(params));
22591
22380
  }
22592
22381
  function stdAgentFixLoopTrait(params) {
22593
- return buildTrait75(resolve97(params));
22382
+ return buildTrait74(resolve96(params));
22594
22383
  }
22595
22384
  function stdAgentFixLoopPage(params) {
22596
- const c = resolve97(params);
22385
+ const c = resolve96(params);
22597
22386
  return {
22598
22387
  name: c.pageName,
22599
22388
  path: c.pagePath,
@@ -22609,9 +22398,9 @@ function stdAgentFixLoopPage(params) {
22609
22398
  };
22610
22399
  }
22611
22400
  function stdAgentFixLoop(params) {
22612
- const c = resolve97(params);
22401
+ const c = resolve96(params);
22613
22402
  const { entityName, fields } = c;
22614
- const fixTrait = buildTrait75(c);
22403
+ const fixTrait = buildTrait74(c);
22615
22404
  const validateCallTrait = extractTrait(stdAgentToolCall({
22616
22405
  entityName,
22617
22406
  fields,
@@ -22694,7 +22483,7 @@ function stdAgentFixLoop(params) {
22694
22483
  [page]
22695
22484
  );
22696
22485
  }
22697
- function resolve98(params) {
22486
+ function resolve97(params) {
22698
22487
  const entityName = params.entityName ?? "Session";
22699
22488
  const p = plural(entityName);
22700
22489
  const requiredFields = [
@@ -22721,7 +22510,7 @@ function resolve98(params) {
22721
22510
  isInitial: params.isInitial ?? false
22722
22511
  };
22723
22512
  }
22724
- function buildEntity84(c) {
22513
+ function buildEntity83(c) {
22725
22514
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
22726
22515
  }
22727
22516
  function buildAgentTrait8(c) {
@@ -22874,13 +22663,13 @@ function buildAgentTrait8(c) {
22874
22663
  };
22875
22664
  }
22876
22665
  function stdAgentSessionEntity(params = {}) {
22877
- return buildEntity84(resolve98(params));
22666
+ return buildEntity83(resolve97(params));
22878
22667
  }
22879
22668
  function stdAgentSessionTrait(params = {}) {
22880
- return buildAgentTrait8(resolve98(params));
22669
+ return buildAgentTrait8(resolve97(params));
22881
22670
  }
22882
22671
  function stdAgentSessionPage(params = {}) {
22883
- const c = resolve98(params);
22672
+ const c = resolve97(params);
22884
22673
  return {
22885
22674
  name: c.pageName,
22886
22675
  path: c.pagePath,
@@ -22893,7 +22682,7 @@ function stdAgentSessionPage(params = {}) {
22893
22682
  };
22894
22683
  }
22895
22684
  function stdAgentSession(params = {}) {
22896
- const c = resolve98(params);
22685
+ const c = resolve97(params);
22897
22686
  const { entityName, fields } = c;
22898
22687
  const browseTrait = extractTrait(stdBrowse({
22899
22688
  entityName,
@@ -22952,7 +22741,7 @@ function stdAgentSession(params = {}) {
22952
22741
  emitOnSave: "LABELED"
22953
22742
  }));
22954
22743
  const agentTrait = buildAgentTrait8(c);
22955
- const entity = buildEntity84(c);
22744
+ const entity = buildEntity83(c);
22956
22745
  const page = {
22957
22746
  name: c.pageName,
22958
22747
  path: c.pagePath,
@@ -23091,7 +22880,7 @@ function stdAgentBuilder(params = {}) {
23091
22880
  fix: "wrench"
23092
22881
  }));
23093
22882
  }
23094
- function resolve99(params) {
22883
+ function resolve98(params) {
23095
22884
  const entityName = params.entityName ?? "SearchResult";
23096
22885
  const p = plural(entityName);
23097
22886
  const requiredFields = [
@@ -23117,7 +22906,7 @@ function resolve99(params) {
23117
22906
  isInitial: params.isInitial ?? false
23118
22907
  };
23119
22908
  }
23120
- function buildEntity85(c) {
22909
+ function buildEntity84(c) {
23121
22910
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
23122
22911
  }
23123
22912
  function buildAgentTrait9(c) {
@@ -23205,13 +22994,13 @@ function buildAgentTrait9(c) {
23205
22994
  };
23206
22995
  }
23207
22996
  function stdAgentSearchEntity(params = {}) {
23208
- return buildEntity85(resolve99(params));
22997
+ return buildEntity84(resolve98(params));
23209
22998
  }
23210
22999
  function stdAgentSearchTrait(params = {}) {
23211
- return buildAgentTrait9(resolve99(params));
23000
+ return buildAgentTrait9(resolve98(params));
23212
23001
  }
23213
23002
  function stdAgentSearchPage(params = {}) {
23214
- const c = resolve99(params);
23003
+ const c = resolve98(params);
23215
23004
  return {
23216
23005
  name: c.pageName,
23217
23006
  path: c.pagePath,
@@ -23223,7 +23012,7 @@ function stdAgentSearchPage(params = {}) {
23223
23012
  };
23224
23013
  }
23225
23014
  function stdAgentSearch(params = {}) {
23226
- const c = resolve99(params);
23015
+ const c = resolve98(params);
23227
23016
  const { entityName, fields } = c;
23228
23017
  const browseTrait = extractTrait(stdBrowse({
23229
23018
  entityName,
@@ -23244,7 +23033,7 @@ function stdAgentSearch(params = {}) {
23244
23033
  refreshEvents: ["SEARCHED"]
23245
23034
  }));
23246
23035
  const agentTrait = buildAgentTrait9(c);
23247
- const entity = buildEntity85(c);
23036
+ const entity = buildEntity84(c);
23248
23037
  const page = {
23249
23038
  name: c.pageName,
23250
23039
  path: c.pagePath,
@@ -23258,7 +23047,7 @@ function stdAgentSearch(params = {}) {
23258
23047
  }
23259
23048
 
23260
23049
  // behaviors/functions/molecules/std-agent-rag.ts
23261
- function resolve100(params) {
23050
+ function resolve99(params) {
23262
23051
  const entityName = params.entityName ?? "RagRequest";
23263
23052
  const p = plural(entityName);
23264
23053
  const requiredFields = [
@@ -23585,17 +23374,17 @@ function buildRagTrait(c) {
23585
23374
  }
23586
23375
  };
23587
23376
  }
23588
- function buildEntity86(c) {
23377
+ function buildEntity85(c) {
23589
23378
  return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
23590
23379
  }
23591
23380
  function stdAgentRagEntity(params) {
23592
- return buildEntity86(resolve100(params));
23381
+ return buildEntity85(resolve99(params));
23593
23382
  }
23594
23383
  function stdAgentRagTrait(params) {
23595
- return buildRagTrait(resolve100(params));
23384
+ return buildRagTrait(resolve99(params));
23596
23385
  }
23597
23386
  function stdAgentRagPage(params) {
23598
- const c = resolve100(params);
23387
+ const c = resolve99(params);
23599
23388
  return {
23600
23389
  name: c.pageName,
23601
23390
  path: c.pagePath,
@@ -23610,7 +23399,7 @@ function stdAgentRagPage(params) {
23610
23399
  };
23611
23400
  }
23612
23401
  function stdAgentRag(params) {
23613
- const c = resolve100(params);
23402
+ const c = resolve99(params);
23614
23403
  const { entityName, fields } = c;
23615
23404
  const ragTrait = buildRagTrait(c);
23616
23405
  const memoryTrait = extractTrait(stdAgentMemory({
@@ -24666,6 +24455,185 @@ function stdAgentTutor(params = {}) {
24666
24455
  concepts: "brain"
24667
24456
  }));
24668
24457
  }
24458
+ function resolve100(params) {
24459
+ const entityName = params.entityName ?? "ActivityEntry";
24460
+ const p = plural(entityName);
24461
+ const requiredFields = [
24462
+ { name: "action", type: "string", default: "" },
24463
+ { name: "detail", type: "string", default: "" },
24464
+ { name: "status", type: "string", default: "pending" },
24465
+ { name: "timestamp", type: "string", default: "" },
24466
+ { name: "duration", type: "number", default: 0 },
24467
+ { name: "icon", type: "string", default: "circle" }
24468
+ ];
24469
+ const baseFields = params.fields ?? [];
24470
+ const existingNames = new Set(baseFields.map((f) => f.name));
24471
+ const mergedFields = [
24472
+ ...baseFields,
24473
+ ...requiredFields.filter((f) => !existingNames.has(f.name))
24474
+ ];
24475
+ const fields = ensureIdField(mergedFields);
24476
+ return {
24477
+ entityName,
24478
+ fields,
24479
+ persistence: params.persistence ?? "persistent",
24480
+ traitName: `${entityName}Log`,
24481
+ pluralName: p,
24482
+ pageName: params.pageName ?? `${entityName}Page`,
24483
+ pagePath: params.pagePath ?? `/${p.toLowerCase()}`,
24484
+ isInitial: params.isInitial ?? false
24485
+ };
24486
+ }
24487
+ function buildEntity86(c) {
24488
+ return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence });
24489
+ }
24490
+ function buildTrait75(c) {
24491
+ const { entityName } = c;
24492
+ const loggingUI = {
24493
+ type: "stack",
24494
+ direction: "vertical",
24495
+ gap: "lg",
24496
+ children: [
24497
+ {
24498
+ type: "stack",
24499
+ direction: "horizontal",
24500
+ gap: "sm",
24501
+ justify: "space-between",
24502
+ align: "center",
24503
+ children: [
24504
+ {
24505
+ type: "stack",
24506
+ direction: "horizontal",
24507
+ gap: "sm",
24508
+ align: "center",
24509
+ children: [
24510
+ { type: "icon", name: "activity", size: "lg" },
24511
+ { type: "typography", content: "Activity Log", variant: "h2" }
24512
+ ]
24513
+ },
24514
+ { type: "button", label: "Clear", event: "CLEAR", variant: "ghost", icon: "trash" }
24515
+ ]
24516
+ },
24517
+ { type: "divider" },
24518
+ {
24519
+ type: "timeline",
24520
+ entity: entityName,
24521
+ emptyIcon: "activity",
24522
+ emptyTitle: "No activity yet",
24523
+ emptyDescription: "Agent actions will appear here as they occur.",
24524
+ renderItem: ["fn", "item", {
24525
+ type: "stack",
24526
+ direction: "vertical",
24527
+ gap: "xs",
24528
+ children: [
24529
+ {
24530
+ type: "stack",
24531
+ direction: "horizontal",
24532
+ gap: "sm",
24533
+ align: "center",
24534
+ children: [
24535
+ { type: "badge", label: "@item.status" },
24536
+ { type: "typography", variant: "h4", content: "@item.action" }
24537
+ ]
24538
+ },
24539
+ { type: "typography", variant: "body", color: "muted", content: "@item.detail" },
24540
+ {
24541
+ type: "stack",
24542
+ direction: "horizontal",
24543
+ gap: "sm",
24544
+ align: "center",
24545
+ children: [
24546
+ { type: "typography", variant: "caption", color: "muted", content: "@item.timestamp" },
24547
+ { type: "badge", label: "@item.duration", variant: "outline" }
24548
+ ]
24549
+ }
24550
+ ]
24551
+ }]
24552
+ }
24553
+ ]
24554
+ };
24555
+ return {
24556
+ name: c.traitName,
24557
+ linkedEntity: entityName,
24558
+ category: "interaction",
24559
+ emits: [
24560
+ { event: "LOG_ENTRY", scope: "external", payload: [
24561
+ { name: "action", type: "string" },
24562
+ { name: "detail", type: "string" },
24563
+ { name: "status", type: "string" }
24564
+ ] }
24565
+ ],
24566
+ listens: [
24567
+ { event: "LOG_ENTRY", triggers: "LOG_ENTRY", scope: "external" }
24568
+ ],
24569
+ stateMachine: {
24570
+ states: [
24571
+ { name: "logging", isInitial: true }
24572
+ ],
24573
+ events: [
24574
+ { key: "INIT", name: "Initialize" },
24575
+ { key: "LOG_ENTRY", name: "Log Entry", payload: [
24576
+ { name: "action", type: "string", required: true },
24577
+ { name: "detail", type: "string", required: true },
24578
+ { name: "status", type: "string", required: true }
24579
+ ] },
24580
+ { key: "CLEAR", name: "Clear Log" }
24581
+ ],
24582
+ transitions: [
24583
+ {
24584
+ from: "logging",
24585
+ to: "logging",
24586
+ event: "INIT",
24587
+ effects: [
24588
+ ["fetch", entityName],
24589
+ ["render-ui", "main", loggingUI]
24590
+ ]
24591
+ },
24592
+ {
24593
+ from: "logging",
24594
+ to: "logging",
24595
+ event: "LOG_ENTRY",
24596
+ effects: [
24597
+ ["persist", "create", entityName, {
24598
+ action: "@payload.action",
24599
+ detail: "@payload.detail",
24600
+ status: "@payload.status",
24601
+ timestamp: "@now"
24602
+ }],
24603
+ ["fetch", entityName],
24604
+ ["render-ui", "main", loggingUI]
24605
+ ]
24606
+ },
24607
+ {
24608
+ from: "logging",
24609
+ to: "logging",
24610
+ event: "CLEAR",
24611
+ effects: [
24612
+ ["persist", "delete", entityName],
24613
+ ["fetch", entityName],
24614
+ ["render-ui", "main", loggingUI]
24615
+ ]
24616
+ }
24617
+ ]
24618
+ }
24619
+ };
24620
+ }
24621
+ function buildPage73(c) {
24622
+ return makePage({ name: c.pageName, path: c.pagePath, traitName: c.traitName, isInitial: c.isInitial });
24623
+ }
24624
+ function stdAgentActivityLogEntity(params = {}) {
24625
+ return buildEntity86(resolve100(params));
24626
+ }
24627
+ function stdAgentActivityLogTrait(params = {}) {
24628
+ return buildTrait75(resolve100(params));
24629
+ }
24630
+ function stdAgentActivityLogPage(params = {}) {
24631
+ return buildPage73(resolve100(params));
24632
+ }
24633
+ function stdAgentActivityLog(params = {}) {
24634
+ const c = resolve100(params);
24635
+ return makeOrbital(`${c.entityName}Orbital`, buildEntity86(c), [buildTrait75(c)], [buildPage73(c)]);
24636
+ }
24669
24637
  function resolve101(params) {
24670
24638
  const entityName = params.entityName ?? "LearningRecord";
24671
24639
  const p = plural(entityName);
@@ -24696,7 +24664,8 @@ function resolve101(params) {
24696
24664
  { name: "action", type: "string", default: "" },
24697
24665
  { name: "detail", type: "string", default: "" },
24698
24666
  { name: "timestamp", type: "string", default: "" },
24699
- { name: "duration", type: "number", default: 0 }
24667
+ { name: "duration", type: "number", default: 0 },
24668
+ { name: "icon", type: "string", default: "circle" }
24700
24669
  ];
24701
24670
  const baseFields = ensureIdField(params.fields ?? []);
24702
24671
  const userFieldNames = new Set(baseFields.map((f) => f.name));
@@ -24736,7 +24705,7 @@ function idleView5(_entityName) {
24736
24705
  { type: "divider" },
24737
24706
  {
24738
24707
  type: "simple-grid",
24739
- columns: 3,
24708
+ cols: 3,
24740
24709
  children: [
24741
24710
  { type: "stat-display", label: "Successes", value: `@entity.totalSuccesses`, icon: "check-circle" },
24742
24711
  { type: "stat-display", label: "Failures", value: `@entity.totalFailures`, icon: "x-circle" },
@@ -25010,7 +24979,6 @@ function stdAgentLearnerPage(params) {
25010
24979
  ...c.isInitial ? { isInitial: true } : {},
25011
24980
  traits: [
25012
24981
  { ref: c.traitName },
25013
- { ref: "LearnerActivityLog" },
25014
24982
  { ref: "LearnerRecordsBrowse" },
25015
24983
  { ref: "LearnerMemoryLifecycle" },
25016
24984
  { ref: "LearnerCompletionFlow" },
@@ -25058,18 +25026,6 @@ function stdAgentLearner(params) {
25058
25026
  e.scope = "internal";
25059
25027
  }
25060
25028
  }
25061
- const activityLogTrait = extractTrait(stdAgentActivityLog({
25062
- entityName,
25063
- fields,
25064
- persistence: "runtime"
25065
- }));
25066
- activityLogTrait.name = "LearnerActivityLog";
25067
- activityLogTrait.listens = [];
25068
- if (activityLogTrait.emits) {
25069
- for (const e of activityLogTrait.emits) {
25070
- e.scope = "internal";
25071
- }
25072
- }
25073
25029
  const recordsBrowseTrait = extractTrait(stdBrowse({
25074
25030
  entityName,
25075
25031
  fields,
@@ -25089,7 +25045,6 @@ function stdAgentLearner(params) {
25089
25045
  ...c.isInitial ? { isInitial: true } : {},
25090
25046
  traits: [
25091
25047
  { ref: learnerTrait.name },
25092
- { ref: activityLogTrait.name },
25093
25048
  { ref: recordsBrowseTrait.name },
25094
25049
  { ref: memoryTrait.name },
25095
25050
  { ref: completionTrait.name },
@@ -25099,7 +25054,7 @@ function stdAgentLearner(params) {
25099
25054
  return makeOrbital(
25100
25055
  `${entityName}Orbital`,
25101
25056
  entity,
25102
- [learnerTrait, activityLogTrait, recordsBrowseTrait, memoryTrait, completionTrait, providerTrait],
25057
+ [learnerTrait, recordsBrowseTrait, memoryTrait, completionTrait, providerTrait],
25103
25058
  [page]
25104
25059
  );
25105
25060
  }