agentfootprint 3.1.2 → 5.0.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.
- package/dist/adapters/llm/AnthropicProvider.js +1 -1
- package/dist/adapters/llm/OpenAIProvider.js +2 -2
- package/dist/adapters/memory/agentcore.js +2 -6
- package/dist/adapters/memory/agentcore.js.map +1 -1
- package/dist/adapters/memory/redis.js +2 -6
- package/dist/adapters/memory/redis.js.map +1 -1
- package/dist/core/RunnerBase.js +0 -4
- package/dist/core/RunnerBase.js.map +1 -1
- package/dist/core/agent/AgentBuilder.js +2 -2
- package/dist/core/agent/AgentBuilder.js.map +1 -1
- package/dist/core/slots/buildToolsSlot.js +2 -2
- package/dist/core/slots/buildToolsSlot.js.map +1 -1
- package/dist/esm/adapters/llm/AnthropicProvider.js +1 -1
- package/dist/esm/adapters/llm/OpenAIProvider.js +2 -2
- package/dist/esm/adapters/memory/agentcore.js +2 -6
- package/dist/esm/adapters/memory/agentcore.js.map +1 -1
- package/dist/esm/adapters/memory/redis.js +2 -6
- package/dist/esm/adapters/memory/redis.js.map +1 -1
- package/dist/esm/core/RunnerBase.js +0 -4
- package/dist/esm/core/RunnerBase.js.map +1 -1
- package/dist/esm/core/agent/AgentBuilder.js +3 -3
- package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
- package/dist/esm/core/slots/buildToolsSlot.js +2 -2
- package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
- package/dist/esm/index.js +24 -34
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/injection-engine/factories/defineInjection.js +46 -0
- package/dist/esm/lib/injection-engine/factories/defineInjection.js.map +1 -0
- package/dist/esm/lib/injection-engine/index.js +4 -0
- package/dist/esm/lib/injection-engine/index.js.map +1 -1
- package/dist/esm/llm-providers.js +0 -4
- package/dist/esm/llm-providers.js.map +1 -1
- package/dist/esm/locales/index.js +4 -4
- package/dist/esm/locales/index.js.map +1 -1
- package/dist/esm/memory-providers.js +1 -5
- package/dist/esm/memory-providers.js.map +1 -1
- package/dist/esm/observe.js +5 -2
- package/dist/esm/observe.js.map +1 -1
- package/dist/esm/providers.js +5 -10
- package/dist/esm/providers.js.map +1 -1
- package/dist/esm/recorders/observability/BoundaryRecorder.js +1 -1
- package/dist/esm/recorders/observability/LiveStateRecorder.js +5 -5
- package/dist/esm/recorders/observability/LoggingRecorder.js +6 -3
- package/dist/esm/recorders/observability/LoggingRecorder.js.map +1 -1
- package/dist/esm/recorders/observability/RunStepRecorder.js +2 -2
- package/dist/esm/recorders/observability/{ThinkingRecorder.js → StatusRecorder.js} +9 -7
- package/dist/esm/recorders/observability/StatusRecorder.js.map +1 -0
- package/dist/esm/recorders/observability/thinking/thinkingTemplates.js +3 -3
- package/dist/esm/recorders/observability/thinking/thinkingTemplates.js.map +1 -1
- package/dist/esm/resilience/fallbackProvider.js +1 -1
- package/dist/esm/status.js +3 -3
- package/dist/esm/status.js.map +1 -1
- package/dist/esm/strategies/attach.js +5 -5
- package/dist/esm/strategies/attach.js.map +1 -1
- package/dist/index.js +28 -63
- package/dist/index.js.map +1 -1
- package/dist/lib/injection-engine/factories/defineInjection.js +50 -0
- package/dist/lib/injection-engine/factories/defineInjection.js.map +1 -0
- package/dist/lib/injection-engine/index.js +6 -1
- package/dist/lib/injection-engine/index.js.map +1 -1
- package/dist/llm-providers.js +0 -4
- package/dist/llm-providers.js.map +1 -1
- package/dist/locales/index.js +3 -3
- package/dist/locales/index.js.map +1 -1
- package/dist/memory-providers.js +1 -5
- package/dist/memory-providers.js.map +1 -1
- package/dist/observe.js +12 -4
- package/dist/observe.js.map +1 -1
- package/dist/providers.js +5 -10
- package/dist/providers.js.map +1 -1
- package/dist/recorders/observability/BoundaryRecorder.js +1 -1
- package/dist/recorders/observability/LiveStateRecorder.js +5 -5
- package/dist/recorders/observability/LoggingRecorder.js +6 -3
- package/dist/recorders/observability/LoggingRecorder.js.map +1 -1
- package/dist/recorders/observability/RunStepRecorder.js +2 -2
- package/dist/recorders/observability/{ThinkingRecorder.js → StatusRecorder.js} +11 -9
- package/dist/recorders/observability/StatusRecorder.js.map +1 -0
- package/dist/recorders/observability/thinking/thinkingTemplates.js +6 -6
- package/dist/recorders/observability/thinking/thinkingTemplates.js.map +1 -1
- package/dist/resilience/fallbackProvider.js +1 -1
- package/dist/status.js +6 -6
- package/dist/status.js.map +1 -1
- package/dist/strategies/attach.js +4 -4
- package/dist/strategies/attach.js.map +1 -1
- package/dist/types/adapters/llm/AnthropicProvider.d.ts +1 -1
- package/dist/types/adapters/llm/OpenAIProvider.d.ts +2 -2
- package/dist/types/adapters/memory/agentcore.d.ts +2 -6
- package/dist/types/adapters/memory/agentcore.d.ts.map +1 -1
- package/dist/types/adapters/memory/redis.d.ts +2 -6
- package/dist/types/adapters/memory/redis.d.ts.map +1 -1
- package/dist/types/adapters/types.d.ts +4 -3
- package/dist/types/adapters/types.d.ts.map +1 -1
- package/dist/types/core/RunnerBase.d.ts.map +1 -1
- package/dist/types/core/agent/AgentBuilder.d.ts +1 -1
- package/dist/types/core/runner.d.ts +1 -14
- package/dist/types/core/runner.d.ts.map +1 -1
- package/dist/types/events/payloads.d.ts +3 -4
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -20
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/injection-engine/factories/defineInjection.d.ts +42 -0
- package/dist/types/lib/injection-engine/factories/defineInjection.d.ts.map +1 -0
- package/dist/types/lib/injection-engine/index.d.ts +1 -0
- package/dist/types/lib/injection-engine/index.d.ts.map +1 -1
- package/dist/types/llm-providers.d.ts +0 -4
- package/dist/types/llm-providers.d.ts.map +1 -1
- package/dist/types/locales/index.d.ts +2 -2
- package/dist/types/locales/index.d.ts.map +1 -1
- package/dist/types/memory-providers.d.ts +1 -5
- package/dist/types/memory-providers.d.ts.map +1 -1
- package/dist/types/observe.d.ts +6 -3
- package/dist/types/observe.d.ts.map +1 -1
- package/dist/types/providers.d.ts +5 -10
- package/dist/types/providers.d.ts.map +1 -1
- package/dist/types/recorders/observability/BoundaryRecorder.d.ts +1 -1
- package/dist/types/recorders/observability/LiveStateRecorder.d.ts +5 -5
- package/dist/types/recorders/observability/LoggingRecorder.d.ts +6 -3
- package/dist/types/recorders/observability/LoggingRecorder.d.ts.map +1 -1
- package/dist/types/recorders/observability/RunStepRecorder.d.ts +3 -3
- package/dist/types/recorders/observability/StatusRecorder.d.ts +37 -0
- package/dist/types/recorders/observability/StatusRecorder.d.ts.map +1 -0
- package/dist/types/recorders/observability/thinking/thinkingTemplates.d.ts +8 -8
- package/dist/types/recorders/observability/thinking/thinkingTemplates.d.ts.map +1 -1
- package/dist/types/resilience/fallbackProvider.d.ts +1 -1
- package/dist/types/status.d.ts +3 -3
- package/dist/types/status.d.ts.map +1 -1
- package/dist/types/strategies/attach.d.ts +2 -2
- package/dist/types/strategies/attach.d.ts.map +1 -1
- package/dist/types/strategies/defaults/chatBubbleLiveStatus.d.ts +2 -2
- package/dist/types/strategies/types.d.ts +3 -3
- package/dist/types/strategies/types.d.ts.map +1 -1
- package/package.json +8 -18
- package/dist/esm/recorders/observability/ThinkingRecorder.js.map +0 -1
- package/dist/recorders/observability/ThinkingRecorder.js.map +0 -1
- package/dist/types/recorders/observability/ThinkingRecorder.d.ts +0 -35
- package/dist/types/recorders/observability/ThinkingRecorder.d.ts.map +0 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -10,39 +10,23 @@ import './cache/strategies/OpenAICacheStrategy.js';
|
|
|
10
10
|
import './cache/strategies/BedrockCacheStrategy.js';
|
|
11
11
|
export type { CombinedRecorder, ScopeRecorder, FlowRecorder, EmitRecorder, WriteEvent, ReadEvent, CommitEvent, StageEvent, ErrorEvent, FlowStageEvent, FlowNextEvent, FlowDecisionEvent, FlowForkEvent, FlowSelectedEvent, FlowSubflowEvent, FlowSubflowRegisteredEvent, FlowLoopEvent, FlowBreakEvent, FlowErrorEvent, TraversalContext, EmitEvent, RedactionPolicy, RedactionReport, } from 'footprintjs';
|
|
12
12
|
export * from './events/types.js';
|
|
13
|
-
export * from './events/payloads.js';
|
|
13
|
+
export type * as Payloads from './events/payloads.js';
|
|
14
14
|
export { EVENT_NAMES, ALL_EVENT_TYPES, type AgentfootprintEvent, type AgentfootprintEventMap, type AgentfootprintEventType, } from './events/registry.js';
|
|
15
15
|
export { EventDispatcher, type EventListener, type WildcardListener, type ListenOptions, type Unsubscribe, type DomainWildcard, type AllWildcard, type WildcardSubscription, } from './events/dispatcher.js';
|
|
16
16
|
export * from './adapters/types.js';
|
|
17
17
|
export { INJECTION_KEYS, injectionKeyForSlot, isInjectionKey, type InjectionKey, stageRole, type StageRole, milestoneFor, type Milestone, type MilestoneKind, } from './conventions.js';
|
|
18
18
|
export { COMPOSITION_KEYS, type BudgetPressureRecord, type CompositionKey, type EvictionRecord, type InjectionRecord, type SlotComposition, } from './recorders/core/types.js';
|
|
19
19
|
export { buildEventMeta, parseSubflowPath, type RunContext } from './bridge/eventMeta.js';
|
|
20
|
-
export { ContextRecorder, type ContextRecorderOptions } from './recorders/core/ContextRecorder.js';
|
|
21
20
|
export { contextEngineering, isEngineeredSource, isBaselineSource, ENGINEERED_SOURCES, BASELINE_SOURCES, type ContextEngineeringHandle, type ContextEngineeringUnsubscribe, type ContextInjectedEvent, type ContextInjectedListener, } from './recorders/core/contextEngineering.js';
|
|
22
21
|
export { EmitBridge, type EmitBridgeOptions } from './recorders/core/EmitBridge.js';
|
|
23
|
-
export { streamRecorder, type StreamRecorderOptions } from './recorders/core/StreamRecorder.js';
|
|
24
|
-
export { agentRecorder, type AgentRecorderOptions } from './recorders/core/AgentRecorder.js';
|
|
25
|
-
export { contextEvaluatedRecorder, type ContextEvaluatedRecorderOptions, } from './recorders/core/ContextEvaluatedRecorder.js';
|
|
26
|
-
export { compositionRecorder, type CompositionRecorderOptions, } from './recorders/core/CompositionRecorder.js';
|
|
27
|
-
export { costRecorder, type CostRecorderOptions } from './recorders/core/CostRecorder.js';
|
|
28
|
-
export { permissionRecorder, type PermissionRecorderOptions, } from './recorders/core/PermissionRecorder.js';
|
|
29
|
-
export { evalRecorder, type EvalRecorderOptions } from './recorders/core/EvalRecorder.js';
|
|
30
|
-
export { memoryRecorder, type MemoryRecorderOptions } from './recorders/core/MemoryRecorder.js';
|
|
31
|
-
export { skillRecorder, type SkillRecorderOptions } from './recorders/core/SkillRecorder.js';
|
|
32
|
-
export { toolsRecorder, type ToolsRecorderOptions } from './recorders/core/ToolsRecorder.js';
|
|
33
22
|
export { typedEmit } from './recorders/core/typedEmit.js';
|
|
34
23
|
export type { EmittedEvent, EnableNamespace, Runner } from './core/runner.js';
|
|
35
24
|
export { RunnerBase, makeRunId } from './core/RunnerBase.js';
|
|
36
25
|
export type { GroupKind, GroupMember, GroupMetadata, GroupTranslator } from './core/translator.js';
|
|
37
26
|
export { pauseHere, askHuman, isPauseRequest, isPaused, type RunnerPauseOutcome, } from './core/pause.js';
|
|
38
|
-
export {
|
|
39
|
-
export { attachLogging, LoggingDomains, type LoggingDomain, type LoggingLogger, type LoggingOptions, } from './recorders/observability/LoggingRecorder.js';
|
|
40
|
-
export { attachFlowchart, type ContextInjection, type FlowchartHandle, type FlowchartOptions, type StepEdge, type StepGraph, type StepNode, } from './recorders/observability/FlowchartRecorder.js';
|
|
41
|
-
export { buildRunSteps, RunStepRecorder, runStepRecorder, type BuildRunStepsOptions, type RunStep, type RunStepGraph, type RunStepKind, type RunStepMeta, type RunStepRecorderOptions, type RunStepTransition, } from './recorders/observability/RunStepRecorder.js';
|
|
42
|
-
export { BoundaryRecorder, boundaryRecorder, type ActorArrow, type BoundaryAggregate, type BoundaryRangeLabel, type BoundaryRecorderOptions, type DomainContextInjectedEvent, type DomainDecisionBranchEvent, type DomainEvent, type DomainForkBranchEvent, type DomainLLMEndEvent, type DomainLLMStartEvent, type DomainLoopIterationEvent, type DomainRunEvent, type DomainSubflowEvent, type DomainToolEndEvent, type DomainToolStartEvent, } from './recorders/observability/BoundaryRecorder.js';
|
|
43
|
-
export { liveStateRecorder, LiveStateRecorder, LiveLLMTracker, LiveToolTracker, LiveAgentTurnTracker, type LLMLiveState, type ToolLiveState, type AgentTurnLiveState, type LiveStateRunnerLike, } from './recorders/observability/LiveStateRecorder.js';
|
|
27
|
+
export type { FlowchartHandle, FlowchartOptions, } from './recorders/observability/FlowchartRecorder.js';
|
|
44
28
|
export { defaultCommentaryTemplates, extractAgentName, extractCommentaryVars, renderCommentary, selectCommentaryKey, type CommentaryContext, type CommentaryTemplates, } from './recorders/observability/commentary/commentaryTemplates.js';
|
|
45
|
-
export {
|
|
29
|
+
export { defaultStatusTemplates, selectStatus, renderStatusLine, type StatusContext, type StatusState, type StatusKind, type StatusTemplates, } from './recorders/observability/thinking/thinkingTemplates.js';
|
|
46
30
|
export { LLMCall, LLMCallBuilder, type LLMCallInput, type LLMCallOptions, type LLMCallOutput, } from './core/LLMCall.js';
|
|
47
31
|
export { buildMessageApiChart, type MessageApiChartDeps, } from './core/agent/buildMessageApiChart.js';
|
|
48
32
|
export { buildAgentMessageApiChart, type AgentMessageApiChartDeps, } from './core/agent/buildAgentMessageApiChart.js';
|
|
@@ -62,7 +46,7 @@ export { browserAnthropic, BrowserAnthropicProvider, type BrowserAnthropicProvid
|
|
|
62
46
|
export { browserOpenai, BrowserOpenAIProvider, type BrowserOpenAIProviderOptions, } from './adapters/llm/BrowserOpenAIProvider.js';
|
|
63
47
|
export { createProvider, type ProviderKind, type CreateProviderOptions, } from './adapters/llm/createProvider.js';
|
|
64
48
|
export { toSSE, SSEFormatter, encodeSSE, type ToSSEOptions } from './stream.js';
|
|
65
|
-
export { type Injection, type InjectionTrigger, type InjectionContent, type InjectionContext, type InjectionEvaluation, evaluateInjections, buildInjectionEngineSubflow, projectActiveInjection, type InjectionEngineConfig, type ActiveInjection, defineInstruction, type DefineInstructionOptions, defineSkill, resolveSurfaceMode, SkillRegistry, type SkillRegistryOptions, buildListSkillsTool, buildReadSkillTool, type SkillToolPair, type DefineSkillOptions, type SurfaceMode, type RefreshPolicy, type AutoActivateMode, defineSteering, type DefineSteeringOptions, defineFact, type DefineFactOptions, } from './lib/injection-engine/index.js';
|
|
49
|
+
export { type Injection, type InjectionTrigger, type InjectionContent, type InjectionContext, type InjectionEvaluation, evaluateInjections, buildInjectionEngineSubflow, projectActiveInjection, type InjectionEngineConfig, type ActiveInjection, defineInstruction, type DefineInstructionOptions, defineSkill, resolveSurfaceMode, SkillRegistry, type SkillRegistryOptions, buildListSkillsTool, buildReadSkillTool, type SkillToolPair, type DefineSkillOptions, type SurfaceMode, type RefreshPolicy, type AutoActivateMode, defineSteering, type DefineSteeringOptions, defineFact, type DefineFactOptions, defineInjection, type DefineInjectionOptions, type InjectionFlavor, } from './lib/injection-engine/index.js';
|
|
66
50
|
export * from './patterns/index.js';
|
|
67
51
|
export { defaultPipeline, ephemeralPipeline, factPipeline, narrativePipeline, semanticPipeline, autoPipeline, } from './memory/pipeline/index.js';
|
|
68
52
|
export { heuristicExtractor, llmExtractor, } from './memory/beats/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,OAAO,8CAA8C,CAAC;AACtD,OAAO,2CAA2C,CAAC;AACnD,OAAO,4CAA4C,CAAC;AAOpD,YAAY,EAEV,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,YAAY,EAEZ,UAAU,EACV,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EAEV,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,aAAa,EACb,cAAc,EACd,cAAc,EACd,gBAAgB,EAEhB,SAAS,EAET,eAAe,EACf,eAAe,GAChB,MAAM,aAAa,CAAC;AAGrB,cAAc,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mapp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,CAAC;AACjC,OAAO,EAEL,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EAIxB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,QAAQ,GACd,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EACL,SAAS,EACT,KAAK,gBAAgB,EACrB,cAAc,EACd,KAAK,qBAAqB,EAC1B,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC;AAM5B,OAAO,EACL,SAAS,EACT,aAAa,EACb,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC;AAO5B,OAAO,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,MAAM,2BAA2B,CAAC;AAKnC,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,uBAAuB,GAC7B,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EAChB,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* defineInjection — the unified injection factory (one factory, a `type`
|
|
3
|
+
* discriminant for the flavor).
|
|
4
|
+
*
|
|
5
|
+
* The named factories (`defineInstruction`, `defineSkill`, `defineSteering`,
|
|
6
|
+
* `defineFact`) are self-documenting sugar — prefer them when you know the
|
|
7
|
+
* flavor at author time. `defineInjection` is for the cases where the flavor is
|
|
8
|
+
* chosen *programmatically* (config-driven pipelines, a UI that lets users add
|
|
9
|
+
* any flavor, table-driven tests) — pass `type` and the same options the named
|
|
10
|
+
* factory takes:
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // these two are equivalent
|
|
14
|
+
* defineInstruction({ id: 'calm', prompt: '…', activeWhen });
|
|
15
|
+
* defineInjection({ type: 'instruction', id: 'calm', prompt: '…', activeWhen });
|
|
16
|
+
*
|
|
17
|
+
* @example // flavor decided at runtime
|
|
18
|
+
* const inj = defineInjection({ type: cfg.flavor, id: cfg.id, ...cfg.opts });
|
|
19
|
+
*
|
|
20
|
+
* All four flavors return the same `Injection` primitive — `type` simply routes
|
|
21
|
+
* to the matching named factory. RAG and Memory are NOT covered here: they are
|
|
22
|
+
* separate subsystems (retrieval + stores), not plain Injections.
|
|
23
|
+
*/
|
|
24
|
+
import type { Injection } from '../types.js';
|
|
25
|
+
import { type DefineFactOptions } from './defineFact.js';
|
|
26
|
+
import { type DefineInstructionOptions } from './defineInstruction.js';
|
|
27
|
+
import { type DefineSkillOptions } from './defineSkill.js';
|
|
28
|
+
import { type DefineSteeringOptions } from './defineSteering.js';
|
|
29
|
+
/** Discriminated union — `type` picks the flavor; the rest are that flavor's options. */
|
|
30
|
+
export type DefineInjectionOptions = ({
|
|
31
|
+
type: 'instruction';
|
|
32
|
+
} & DefineInstructionOptions) | ({
|
|
33
|
+
type: 'skill';
|
|
34
|
+
} & DefineSkillOptions) | ({
|
|
35
|
+
type: 'steering';
|
|
36
|
+
} & DefineSteeringOptions) | ({
|
|
37
|
+
type: 'fact';
|
|
38
|
+
} & DefineFactOptions);
|
|
39
|
+
/** The flavor discriminants `defineInjection` accepts. */
|
|
40
|
+
export type InjectionFlavor = DefineInjectionOptions['type'];
|
|
41
|
+
export declare function defineInjection(opts: DefineInjectionOptions): Injection;
|
|
42
|
+
//# sourceMappingURL=defineInjection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineInjection.d.ts","sourceRoot":"","sources":["../../../../../src/lib/injection-engine/factories/defineInjection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAqB,KAAK,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAe,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAkB,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjF,yFAAyF;AACzF,MAAM,MAAM,sBAAsB,GAC9B,CAAC;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GAAG,wBAAwB,CAAC,GACpD,CAAC;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG,kBAAkB,CAAC,GACxC,CAAC;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG,qBAAqB,CAAC,GAC9C,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,iBAAiB,CAAC,CAAC;AAE3C,0DAA0D;AAC1D,MAAM,MAAM,eAAe,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAE7D,wBAAgB,eAAe,CAAC,IAAI,EAAE,sBAAsB,GAAG,SAAS,CAqBvE"}
|
|
@@ -15,4 +15,5 @@ export { SkillRegistry, type SkillRegistryOptions } from './SkillRegistry.js';
|
|
|
15
15
|
export { buildListSkillsTool, buildReadSkillTool, type SkillToolPair } from './skillTools.js';
|
|
16
16
|
export { defineSteering, type DefineSteeringOptions } from './factories/defineSteering.js';
|
|
17
17
|
export { defineFact, type DefineFactOptions } from './factories/defineFact.js';
|
|
18
|
+
export { defineInjection, type DefineInjectionOptions, type InjectionFlavor, } from './factories/defineInjection.js';
|
|
18
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/injection-engine/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,GAChB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAGpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EACL,2BAA2B,EAC3B,KAAK,qBAAqB,GAC3B,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAE,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAEpG,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,gBAAgB,GACtB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAM9E,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE9F,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAE3F,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/injection-engine/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,GAChB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAGpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EACL,2BAA2B,EAC3B,KAAK,qBAAqB,GAC3B,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAE,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAEpG,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,gBAAgB,GACtB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAM9E,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE9F,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAE3F,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAK/E,OAAO,EACL,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACrB,MAAM,gCAAgC,CAAC"}
|
|
@@ -21,11 +21,7 @@
|
|
|
21
21
|
* knows nothing about vendor specifics.
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
|
-
* // New canonical import
|
|
25
24
|
* import { mock, AnthropicProvider } from 'agentfootprint/llm-providers';
|
|
26
|
-
*
|
|
27
|
-
* // Legacy alias (still works through v2.x)
|
|
28
|
-
* import { mock, AnthropicProvider } from 'agentfootprint/providers';
|
|
29
25
|
*/
|
|
30
26
|
export * from './providers.js';
|
|
31
27
|
//# sourceMappingURL=llm-providers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-providers.d.ts","sourceRoot":"","sources":["../../src/llm-providers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"llm-providers.d.ts","sourceRoot":"","sources":["../../src/llm-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,cAAc,gBAAgB,CAAC"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* "Looking up your order…"
|
|
12
12
|
*
|
|
13
13
|
* v2.4 shipped these as `defaultCommentaryTemplates` and
|
|
14
|
-
* `
|
|
14
|
+
* `defaultStatusTemplates` (flat `Record<string, string>` maps with
|
|
15
15
|
* `{{var}}` substitution). The names worked but the framing was
|
|
16
16
|
* generic — "templates" collides with TypeScript / templating-engine
|
|
17
17
|
* terminology, and there was no first-class place to ship locale
|
|
@@ -70,7 +70,7 @@ export type { CommentaryTemplates as MessageCatalog } from '../recorders/observa
|
|
|
70
70
|
export declare const defaultCommentaryMessages: Readonly<Record<string, string>>;
|
|
71
71
|
/**
|
|
72
72
|
* Canonical English thinking bundle. Alias of v2.4's
|
|
73
|
-
* `
|
|
73
|
+
* `defaultStatusTemplates`.
|
|
74
74
|
*
|
|
75
75
|
* Keys mirror agentfootprint event types; values may contain
|
|
76
76
|
* `{{var}}` placeholders for runtime substitution.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locales/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAKH,YAAY,EAAE,mBAAmB,IAAI,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAE1H;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,kCAA6B,CAAC;AAEpE;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locales/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAKH,YAAY,EAAE,mBAAmB,IAAI,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAE1H;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,kCAA6B,CAAC;AAEpE;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,kCAAyB,CAAC;AAE9D;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACxE,QAAQ,EAAE,CAAC,EACX,SAAS,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM,GAC/C,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAElC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACzC,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,IAAI,GAAE,uBAAuB,GAAG,MAAW,GAC1C,IAAI,CAwBN"}
|
|
@@ -30,11 +30,7 @@
|
|
|
30
30
|
* actually instantiate pull their SDK in.
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
|
-
*
|
|
34
|
-
* import { RedisStore } from 'agentfootprint/memory-providers';
|
|
35
|
-
*
|
|
36
|
-
* // Legacy per-adapter alias (still works through v2.x)
|
|
37
|
-
* import { RedisStore } from 'agentfootprint/memory-redis';
|
|
33
|
+
* import { RedisStore, AgentCoreStore } from 'agentfootprint/memory-providers';
|
|
38
34
|
*/
|
|
39
35
|
export { RedisStore, type RedisStoreOptions, type RedisLikeClient, type RedisLikePipeline, } from './adapters/memory/redis.js';
|
|
40
36
|
export { AgentCoreStore, type AgentCoreStoreOptions, type AgentCoreLikeClient, } from './adapters/memory/agentcore.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-providers.d.ts","sourceRoot":"","sources":["../../src/memory-providers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"memory-providers.d.ts","sourceRoot":"","sources":["../../src/memory-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAKH,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,cAAc,EACd,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB,MAAM,gCAAgC,CAAC"}
|
package/dist/types/observe.d.ts
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* • PermissionRecorder — permission decisions + denials
|
|
26
26
|
* • SkillRecorder — skill activations
|
|
27
27
|
* • LoggingRecorder — structured log lines per event
|
|
28
|
-
* •
|
|
28
|
+
* • StatusRecorder — chat-bubble first-person status
|
|
29
29
|
*
|
|
30
30
|
* Domain-flavored consumers (Lens, Grafana, Datadog) compose Tier 1+2
|
|
31
31
|
* directly; Tier 3 dashboards are opt-in.
|
|
@@ -34,15 +34,18 @@ export { ContextRecorder, type ContextRecorderOptions } from './recorders/core/C
|
|
|
34
34
|
export { streamRecorder, type StreamRecorderOptions } from './recorders/core/StreamRecorder.js';
|
|
35
35
|
export { compositionRecorder, type CompositionRecorderOptions, } from './recorders/core/CompositionRecorder.js';
|
|
36
36
|
export { agentRecorder, type AgentRecorderOptions } from './recorders/core/AgentRecorder.js';
|
|
37
|
-
export { boundaryRecorder, BoundaryRecorder, type BoundaryAggregate, type BoundaryRecorderOptions, type BoundaryRangeLabel, type DomainEvent, type DomainLLMEndEvent, type DomainLLMStartEvent, type
|
|
37
|
+
export { boundaryRecorder, BoundaryRecorder, type ActorArrow, type BoundaryAggregate, type BoundaryRecorderOptions, type BoundaryRangeLabel, type DomainContextInjectedEvent, type DomainDecisionBranchEvent, type DomainEvent, type DomainForkBranchEvent, type DomainLLMEndEvent, type DomainLLMStartEvent, type DomainLoopIterationEvent, type DomainRunEvent, type DomainSubflowEvent, type DomainToolStartEvent, type DomainToolEndEvent, } from './recorders/observability/BoundaryRecorder.js';
|
|
38
|
+
export { buildRunSteps, RunStepRecorder, runStepRecorder, type BuildRunStepsOptions, type RunStep, type RunStepGraph, type RunStepKind, type RunStepMeta, type RunStepRecorderOptions, type RunStepTransition, } from './recorders/observability/RunStepRecorder.js';
|
|
38
39
|
export { attachFlowchart, buildStepGraph, type StepGraph, type StepNode, type StepEdge, type SlotBoundary, type ContextInjection, type FlowchartOptions, type FlowchartHandle, } from './recorders/observability/FlowchartRecorder.js';
|
|
39
40
|
export { liveStateRecorder, LiveStateRecorder, LiveLLMTracker, LiveToolTracker, LiveAgentTurnTracker, type LLMLiveState, type ToolLiveState, type AgentTurnLiveState, type LiveStateRunnerLike, } from './recorders/observability/LiveStateRecorder.js';
|
|
40
41
|
export { costRecorder, type CostRecorderOptions } from './recorders/core/CostRecorder.js';
|
|
42
|
+
export { toolsRecorder, type ToolsRecorderOptions } from './recorders/core/ToolsRecorder.js';
|
|
43
|
+
export { contextEvaluatedRecorder, type ContextEvaluatedRecorderOptions, } from './recorders/core/ContextEvaluatedRecorder.js';
|
|
41
44
|
export { evalRecorder, type EvalRecorderOptions } from './recorders/core/EvalRecorder.js';
|
|
42
45
|
export { memoryRecorder, type MemoryRecorderOptions } from './recorders/core/MemoryRecorder.js';
|
|
43
46
|
export { permissionRecorder, type PermissionRecorderOptions, } from './recorders/core/PermissionRecorder.js';
|
|
44
47
|
export { skillRecorder, type SkillRecorderOptions } from './recorders/core/SkillRecorder.js';
|
|
45
48
|
export { attachLogging, LoggingDomains, type LoggingLogger, type LoggingDomain, type LoggingOptions, } from './recorders/observability/LoggingRecorder.js';
|
|
46
|
-
export {
|
|
49
|
+
export { attachStatus, type StatusEvent, type StatusOptions, } from './recorders/observability/StatusRecorder.js';
|
|
47
50
|
export { typedEmit } from './recorders/core/typedEmit.js';
|
|
48
51
|
//# sourceMappingURL=observe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAGhG,OAAO,EACL,mBAAmB,EACnB,KAAK,0BAA0B,GAChC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,
|
|
1
|
+
{"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAGhG,OAAO,EACL,mBAAmB,EACnB,KAAK,0BAA0B,GAChC,MAAM,yCAAyC,CAA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AC;AACtD,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChG,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,GAC/B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EACL,aAAa,EACb,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,aAAa,GACnB,MAAM,6CAA6C,CAAC;AAGrD,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* LLM provider adapters — implementation behind the `agentfootprint/llm-providers`
|
|
3
|
+
* subpath (which re-exports this file).
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* matching the parallel structure (`tool-providers` /
|
|
7
|
-
* `memory-providers` / `security`). Existing imports keep working
|
|
8
|
-
* unchanged through the v2.x line; the alias is removed in v3.0.
|
|
5
|
+
* The standalone `agentfootprint/providers` subpath alias was removed in 4.0.0.
|
|
6
|
+
* Import from the canonical subpath:
|
|
9
7
|
*
|
|
10
|
-
*
|
|
11
|
-
* import { mock } from 'agentfootprint/providers';
|
|
12
|
-
* // New canonical:
|
|
13
|
-
* import { mock } from 'agentfootprint/llm-providers';
|
|
8
|
+
* import { mock, anthropic, openai } from 'agentfootprint/llm-providers';
|
|
14
9
|
*
|
|
15
10
|
* Pattern: Adapter (GoF) — concrete `LLMProvider` implementations that
|
|
16
11
|
* translate the agentfootprint port to a specific vendor SDK.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/providers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,KAAK,mBAAmB,EACxB,KAAK,SAAS,GACf,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,KAAK,wBAAwB,GAC9B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACL,MAAM,EACN,cAAc,EACd,MAAM,EACN,KAAK,qBAAqB,GAC3B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,OAAO,EACP,eAAe,EACf,KAAK,sBAAsB,GAC5B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,KAAK,+BAA+B,GACrC,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,KAAK,4BAA4B,GAClC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EACL,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,qBAAqB,GAC3B,MAAM,kCAAkC,CAAC;AAE1C,YAAY,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,UAAU,EACV,aAAa,GACd,MAAM,qBAAqB,CAAC"}
|
|
@@ -362,7 +362,7 @@ export declare function boundaryRecorder(options?: BoundaryRecorderOptions): Bou
|
|
|
362
362
|
* to wire to the agentfootprint typed-event dispatcher.
|
|
363
363
|
*
|
|
364
364
|
* v5: composes a `SequenceStore<DomainEvent>` (storage) instead of
|
|
365
|
-
* extending the deprecated `
|
|
365
|
+
* extending the deprecated `SequenceStore<T>` base. Time-travel
|
|
366
366
|
* utilities (`getEntryRanges`, `accumulate`) are accessed through the
|
|
367
367
|
* store via the public read API on this class.
|
|
368
368
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* LiveStateRecorder — domain trackers built on the footprintjs
|
|
3
|
-
* `
|
|
3
|
+
* `BoundaryStateStore<TState>` storage primitive (v4.17.2+).
|
|
4
4
|
*
|
|
5
5
|
* **What this answers:** "Right now, mid-run, what's happening?"
|
|
6
6
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* **Mental model — observers vs. bookkeepers:**
|
|
16
16
|
*
|
|
17
|
-
* `
|
|
17
|
+
* `BoundaryStateStore<TState>` (footprintjs) = STORAGE shelf.
|
|
18
18
|
* `EventDispatcher.on(...)` (agentfootprint) = OBSERVER source.
|
|
19
19
|
*
|
|
20
20
|
* Each domain tracker (`LiveLLMTracker`, `LiveToolTracker`,
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* **Tier 1 (live) only.** Past states are not stored — when a boundary
|
|
26
26
|
* closes, its transient state clears. For time-travel queries, snapshot
|
|
27
|
-
* to a `
|
|
27
|
+
* to a `SequenceStore<TState>` instead. See the BoundaryStateStore
|
|
28
28
|
* JSDoc for the rationale.
|
|
29
29
|
*
|
|
30
30
|
* @example Use the bundled façade — one attach, three live views:
|
|
@@ -198,11 +198,11 @@ export declare class LiveAgentTurnTracker {
|
|
|
198
198
|
*
|
|
199
199
|
* **What this is NOT for:**
|
|
200
200
|
* - Time-travel queries (Tier 1 only — live state)
|
|
201
|
-
* - Aggregations (use
|
|
201
|
+
* - Aggregations (use SequenceStore.aggregate)
|
|
202
202
|
* - Stage-level observation (use Recorder.onStageStart/End)
|
|
203
203
|
*
|
|
204
204
|
* **Composition over inheritance:** the façade does NOT extend
|
|
205
|
-
* `
|
|
205
|
+
* `BoundaryStateStore` itself — different boundary kinds need
|
|
206
206
|
* separate active maps to avoid key collisions between LLM and tool
|
|
207
207
|
* boundaries. Each sub-tracker keeps its own state.
|
|
208
208
|
*/
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
* LoggingRecorder — firehose-style structured logging of every event.
|
|
3
3
|
*
|
|
4
4
|
* Pattern: Facade over EventDispatcher's wildcard subscription.
|
|
5
|
-
* Role: Tier 3 observability —
|
|
5
|
+
* Role: Tier 3 observability — the low-level helper behind
|
|
6
|
+
* `attachLogging(dispatcher, {...})` (exported from
|
|
7
|
+
* `agentfootprint/observe`). For the high-level, uniform path use
|
|
8
|
+
* `agent.enable.observability({ strategy: consoleObservability() })`.
|
|
6
9
|
* Developer debugging tool; production typically uses an OTEL
|
|
7
10
|
* recorder instead.
|
|
8
11
|
* Emits: Does NOT emit; READS the dispatcher and writes to the logger.
|
|
@@ -27,8 +30,8 @@ export interface LoggingLogger {
|
|
|
27
30
|
* Raw strings still work (backed by the same literal union type below).
|
|
28
31
|
*
|
|
29
32
|
* @example
|
|
30
|
-
*
|
|
31
|
-
*
|
|
33
|
+
* attachLogging(dispatcher, { domains: [LoggingDomains.CONTEXT, LoggingDomains.STREAM] });
|
|
34
|
+
* attachLogging(dispatcher, { domains: ['context', 'stream'] }); // equivalent
|
|
32
35
|
*/
|
|
33
36
|
export declare const LoggingDomains: {
|
|
34
37
|
/** Context-engineering events (the 3-slot model). THE DEBUG CORE. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoggingRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/LoggingRecorder.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"LoggingRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/LoggingRecorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC5C;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;IACzB,qEAAqE;;IAErE,0CAA0C;;IAE1C,2EAA2E;;IAE3E,oEAAoE;;IAEpE,0CAA0C;;IAE1C,8CAA8C;;IAE9C,uCAAuC;;IAEvC,iCAAiC;;IAEjC,mCAAmC;;IAEnC,iDAAiD;;IAEjD,8BAA8B;;IAE9B,yCAAyC;;IAEzC,kCAAkC;;IAElC,+BAA+B;;IAE/B,4BAA4B;;CAEpB,CAAC;AAEX;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEjF,MAAM,WAAW,cAAc;IAC7B,wCAAwC;IACxC,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,aAAa,EAAE,GAAG,KAAK,CAAC;IACpD,oDAAoD;IACpD,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,MAAM,CAAC;CAC1D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,cAAmB,GAC3B,WAAW,CAab"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* RunStepRecorder — slider-ready ordered list of RunSteps, BUILT
|
|
3
3
|
* INCREMENTALLY during traversal. Real-time recorder, not a walker.
|
|
4
4
|
*
|
|
5
|
-
* Pattern: extends `
|
|
5
|
+
* Pattern: extends `SequenceStore<RunStep>` (shared storage shelf)
|
|
6
6
|
* and implements `CombinedRecorder` (FlowRecorder hooks).
|
|
7
7
|
* Subscribes to the agentfootprint typed-event dispatcher
|
|
8
8
|
* for actor-arrow events. Each event handler decides whether
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* the playground triggered a full walk on every flowchart update,
|
|
20
20
|
* yielding O(N²) total work for a streaming run. The recorder pattern
|
|
21
21
|
* is O(N) — one handler call per event — and matches BoundaryRecorder /
|
|
22
|
-
* FlowchartRecorder /
|
|
22
|
+
* FlowchartRecorder / KeyedStore idioms throughout the library.
|
|
23
23
|
*
|
|
24
24
|
* The `buildRunSteps(...)` function is RETAINED as a thin compatibility
|
|
25
25
|
* shim that constructs a fresh recorder, replays events through it,
|
|
@@ -49,7 +49,7 @@ export interface RunStep {
|
|
|
49
49
|
readonly kind: RunStepKind;
|
|
50
50
|
readonly transitions: readonly RunStepTransition[];
|
|
51
51
|
/**
|
|
52
|
-
* Per-step key — required by `
|
|
52
|
+
* Per-step key — required by `SequenceStore<T>` for time-travel
|
|
53
53
|
* utilities (`getEntriesForStep`, `getEntryRanges`). Mirrors
|
|
54
54
|
* `anchor.runtimeStageId`; both fields point at the same value.
|
|
55
55
|
* Top-level placement satisfies the recorder's storage contract.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StatusRecorder — Claude Code-style live status line for Agent runs.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: Facade over EventDispatcher's wildcard subscription.
|
|
5
|
+
* Role: Tier 3 observability — the low-level helper behind
|
|
6
|
+
* `attachStatus(dispatcher, { onStatus })` (exported from
|
|
7
|
+
* `agentfootprint/observe`). For the high-level, uniform path use
|
|
8
|
+
* `agent.enable.liveStatus({ strategy: chatBubbleLiveStatus({ onLine }) })`.
|
|
9
|
+
* One callback receives a human-readable status string at every
|
|
10
|
+
* meaningful moment.
|
|
11
|
+
* Emits: Does NOT emit; READS core events via the dispatcher and calls
|
|
12
|
+
* `onStatus`.
|
|
13
|
+
*/
|
|
14
|
+
import type { EventDispatcher, Unsubscribe } from '../../events/dispatcher.js';
|
|
15
|
+
import type { AgentfootprintEventMap } from '../../events/registry.js';
|
|
16
|
+
export interface StatusOptions {
|
|
17
|
+
/**
|
|
18
|
+
* Called with a human-readable status string at each meaningful moment
|
|
19
|
+
* (iteration start, tool start/end, route decision, turn end).
|
|
20
|
+
*/
|
|
21
|
+
readonly onStatus: (status: string) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Custom formatter. Return `null` to skip an event; return a string
|
|
24
|
+
* to emit that status. Omit for the built-in renderer.
|
|
25
|
+
*/
|
|
26
|
+
readonly format?: (event: StatusEvent) => string | null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Subset of events the thinking renderer formats. Discriminated on `type`.
|
|
30
|
+
*/
|
|
31
|
+
export type StatusEvent = AgentfootprintEventMap['agentfootprint.agent.turn_start'] | AgentfootprintEventMap['agentfootprint.agent.turn_end'] | AgentfootprintEventMap['agentfootprint.agent.iteration_start'] | AgentfootprintEventMap['agentfootprint.agent.route_decided'] | AgentfootprintEventMap['agentfootprint.stream.tool_start'] | AgentfootprintEventMap['agentfootprint.stream.tool_end'];
|
|
32
|
+
/**
|
|
33
|
+
* Attach a thinking-status subscription to the event dispatcher.
|
|
34
|
+
* Returns an Unsubscribe — call to detach.
|
|
35
|
+
*/
|
|
36
|
+
export declare function attachStatus(dispatcher: EventDispatcher, options: StatusOptions): Unsubscribe;
|
|
37
|
+
//# sourceMappingURL=StatusRecorder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusRecorder.d.ts","sourceRoot":"","sources":["../../../../src/recorders/observability/StatusRecorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EAEV,sBAAsB,EAEvB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,MAAM,GAAG,IAAI,CAAC;CACzD;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,sBAAsB,CAAC,iCAAiC,CAAC,GACzD,sBAAsB,CAAC,+BAA+B,CAAC,GACvD,sBAAsB,CAAC,sCAAsC,CAAC,GAC9D,sBAAsB,CAAC,oCAAoC,CAAC,GAC5D,sBAAsB,CAAC,kCAAkC,CAAC,GAC1D,sBAAsB,CAAC,gCAAgC,CAAC,CAAC;AAW7D;;;GAGG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,aAAa,GAAG,WAAW,CAO7F"}
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
*/
|
|
41
41
|
import type { AgentfootprintEvent } from '../../../events/registry.js';
|
|
42
42
|
/** The four mid-call states a chat bubble might render. */
|
|
43
|
-
export type
|
|
43
|
+
export type StatusKind = 'idle' | 'tool' | 'streaming' | 'paused';
|
|
44
44
|
/**
|
|
45
45
|
* What the selector returns. The chat-bubble consumer feeds this into
|
|
46
46
|
* the renderer to get the final string.
|
|
47
47
|
*/
|
|
48
|
-
export interface
|
|
49
|
-
readonly state:
|
|
48
|
+
export interface StatusState {
|
|
49
|
+
readonly state: StatusKind;
|
|
50
50
|
/** Vars for `{{name}}` substitution in the matched template. */
|
|
51
51
|
readonly vars: Readonly<Record<string, string>>;
|
|
52
52
|
/** When `state === 'tool'`, the resolving toolName. The renderer
|
|
@@ -54,9 +54,9 @@ export interface ThinkingState {
|
|
|
54
54
|
readonly toolName?: string;
|
|
55
55
|
}
|
|
56
56
|
/** Flat template map. Keys: state kinds + per-tool overrides. */
|
|
57
|
-
export type
|
|
57
|
+
export type StatusTemplates = Readonly<Record<string, string>>;
|
|
58
58
|
/** Render context — what the consumer's app config injects. */
|
|
59
|
-
export interface
|
|
59
|
+
export interface StatusContext {
|
|
60
60
|
/** Active actor's name. Substituted as `{{appName}}` in templates. */
|
|
61
61
|
readonly appName: string;
|
|
62
62
|
}
|
|
@@ -65,7 +65,7 @@ export interface ThinkingContext {
|
|
|
65
65
|
* `.thinkingTemplates({...})`. Per-tool overrides go via
|
|
66
66
|
* `tool.<toolName>` keys.
|
|
67
67
|
*/
|
|
68
|
-
export declare const
|
|
68
|
+
export declare const defaultStatusTemplates: StatusTemplates;
|
|
69
69
|
/**
|
|
70
70
|
* Derive the current thinking state from the event log.
|
|
71
71
|
*
|
|
@@ -90,7 +90,7 @@ export declare const defaultThinkingTemplates: ThinkingTemplates;
|
|
|
90
90
|
* cancels its matching opener so a completed tool.start/tool.end
|
|
91
91
|
* pair leaves the state quiescent.
|
|
92
92
|
*/
|
|
93
|
-
export declare function
|
|
93
|
+
export declare function selectStatus(events: readonly AgentfootprintEvent[]): StatusState | null;
|
|
94
94
|
/**
|
|
95
95
|
* Resolve the matched template + substitute vars.
|
|
96
96
|
*
|
|
@@ -103,5 +103,5 @@ export declare function selectThinkingState(events: readonly AgentfootprintEvent
|
|
|
103
103
|
* keeps the contract honest (consumer can detect "no template" and
|
|
104
104
|
* fall back to its own default).
|
|
105
105
|
*/
|
|
106
|
-
export declare function
|
|
106
|
+
export declare function renderStatusLine(state: StatusState | null, ctx: StatusContext, templates?: StatusTemplates): string | null;
|
|
107
107
|
//# sourceMappingURL=thinkingTemplates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thinkingTemplates.d.ts","sourceRoot":"","sources":["../../../../../src/recorders/observability/thinking/thinkingTemplates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAIvE,2DAA2D;AAC3D,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"thinkingTemplates.d.ts","sourceRoot":"","sources":["../../../../../src/recorders/observability/thinking/thinkingTemplates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAIvE,2DAA2D;AAC3D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAElE;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAChD;4EACwE;IACxE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,iEAAiE;AACjE,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAE/D,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC5B,sEAAsE;IACtE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAID;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,eAKpC,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,mBAAmB,EAAE,GAAG,WAAW,GAAG,IAAI,CAkFvF;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,WAAW,GAAG,IAAI,EACzB,GAAG,EAAE,aAAa,EAClB,SAAS,GAAE,eAAwC,GAClD,MAAM,GAAG,IAAI,CAaf"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* predicate. The first success wins; if all fail, the last error throws.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
|
-
* import { anthropic, openai, mock } from 'agentfootprint/providers';
|
|
13
|
+
* import { anthropic, openai, mock } from 'agentfootprint/llm-providers';
|
|
14
14
|
* import { fallbackProvider } from 'agentfootprint/resilience';
|
|
15
15
|
*
|
|
16
16
|
* const provider = fallbackProvider(
|
package/dist/types/status.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* agentfootprint/status — chat-bubble status surface.
|
|
3
3
|
*
|
|
4
|
-
* Pattern: pure projection. `
|
|
4
|
+
* Pattern: pure projection. `selectStatus` walks the typed
|
|
5
5
|
* event log forward, tracking active pause / tool / LLM state,
|
|
6
6
|
* and returns the CURRENT thinking state (or null when the
|
|
7
7
|
* bubble should hide).
|
|
8
8
|
* Role: Outer ring. Consumers (Lens, custom chat UIs, embedded
|
|
9
9
|
* widgets) call this to drive a "what is the agent doing
|
|
10
|
-
* right now?" indicator. Output feeds `
|
|
10
|
+
* right now?" indicator. Output feeds `renderStatusLine`
|
|
11
11
|
* which resolves a template + variables to a final string.
|
|
12
12
|
*
|
|
13
13
|
* Why a subpath:
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
*
|
|
46
46
|
* (null) run done / between calls → bubble hidden
|
|
47
47
|
*/
|
|
48
|
-
export {
|
|
48
|
+
export { defaultStatusTemplates, selectStatus, renderStatusLine, type StatusState, type StatusKind, type StatusTemplates, type StatusContext, } from './recorders/observability/thinking/thinkingTemplates.js';
|
|
49
49
|
//# sourceMappingURL=status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,yDAAyD,CAAC"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import type { EventDispatcher, Unsubscribe } from '../events/dispatcher.js';
|
|
20
20
|
import type { ObservabilityStrategy, CostStrategy, LiveStatusStrategy, CommonStrategyOptions, ObservabilityTier } from './types.js';
|
|
21
|
-
import { type
|
|
21
|
+
import { type StatusTemplates } from '../recorders/observability/thinking/thinkingTemplates.js';
|
|
22
22
|
export interface ObservabilityEnableOptions extends CommonStrategyOptions {
|
|
23
23
|
/** Cost-of-on knob. `'minimal'` → only error + lifecycle events.
|
|
24
24
|
* `'standard'` → most domains. `'firehose'` → every event including
|
|
@@ -40,7 +40,7 @@ export interface LiveStatusEnableOptions extends CommonStrategyOptions {
|
|
|
40
40
|
/** Override the bundled English thinking templates with locale /
|
|
41
41
|
* per-tool / per-skill overrides. Same shape as
|
|
42
42
|
* `agent.thinkingTemplates(...)`. */
|
|
43
|
-
readonly templates?:
|
|
43
|
+
readonly templates?: StatusTemplates;
|
|
44
44
|
/** App name woven into `{{appName}}` template var. */
|
|
45
45
|
readonly appName?: string;
|
|
46
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attach.d.ts","sourceRoot":"","sources":["../../../src/strategies/attach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,KAAK,EACV,qBAAqB,EACrB,YAAY,EAEZ,kBAAkB,EAElB,qBAAqB,EACrB,iBAAiB,EAElB,MAAM,YAAY,CAAC;AACpB,OAAO,EAIL,KAAK,
|
|
1
|
+
{"version":3,"file":"attach.d.ts","sourceRoot":"","sources":["../../../src/strategies/attach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,KAAK,EACV,qBAAqB,EACrB,YAAY,EAEZ,kBAAkB,EAElB,qBAAqB,EACrB,iBAAiB,EAElB,MAAM,YAAY,CAAC;AACpB,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,0DAA0D,CAAC;AA+IlE,MAAM,WAAW,0BAA2B,SAAQ,qBAAqB;IACvE;;mDAE+C;IAC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,qBAAqB,CAAC;CAC3C;AAQD,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,eAAe,EAC3B,IAAI,GAAE,0BAA+B,GACpC,WAAW,CA2Bb;AAID,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;CAClC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,eAAe,EAC3B,IAAI,GAAE,iBAAsB,GAC3B,WAAW,CAiCb;AAID,MAAM,WAAW,uBAAwB,SAAQ,qBAAqB;IACpE,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC;;0CAEsC;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,eAAe,CAAC;IACrC,sDAAsD;IACtD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAgBD,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,eAAe,EAC3B,IAAI,EAAE,uBAAuB,GAC5B,WAAW,CA0Bb"}
|
|
@@ -24,10 +24,10 @@ export interface ChatBubbleLiveStatusOptions {
|
|
|
24
24
|
* whose job is "show this line in the chat bubble."
|
|
25
25
|
*
|
|
26
26
|
* NOTE: this is INTENTIONALLY the only callback. If you need access
|
|
27
|
-
* to the underlying `
|
|
27
|
+
* to the underlying `StatusState` (for color-per-state, animation
|
|
28
28
|
* triggers, etc.), build your own `LiveStatusStrategy` directly OR
|
|
29
29
|
* use `compose([chatBubbleLiveStatus({onLine}), customStrategy])`.
|
|
30
|
-
* We don't surface `
|
|
30
|
+
* We don't surface `StatusState` here because it's an INTERNAL
|
|
31
31
|
* shape — exposing it would couple consumer UIs to changes in the
|
|
32
32
|
* state machine.
|
|
33
33
|
*/
|