@jangts/agent-core 0.2.5 → 0.3.6
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/CHANGELOG.md +44 -0
- package/README.md +386 -50
- package/development/docs/api/README.en.md +4 -0
- package/development/docs/api/README.md +4 -0
- package/development/docs/api/decorators.en.md +83 -0
- package/development/docs/api/decorators.md +108 -0
- package/development/docs/api/observability.en.md +37 -11
- package/development/docs/api/observability.md +64 -11
- package/development/docs/api/reference.en.md +469 -348
- package/development/docs/api/reference.md +225 -137
- package/development/docs/api/types.en.md +1 -0
- package/development/docs/api/types.md +1 -0
- package/development/docs/api/workflow-views.en.md +64 -0
- package/development/docs/api/workflow-views.md +78 -0
- package/development/docs/api/workflow.en.md +6 -2
- package/development/docs/api/workflow.md +6 -2
- package/development/skills/agent-core-app/SKILL.md +16 -0
- package/dist/cjs/capabilities/invocation.js +21 -1
- package/dist/cjs/capabilities/tool-runtime.js +8 -1
- package/dist/cjs/capabilities/tools.js +12 -17
- package/dist/cjs/diagnostics/index.js +51 -3
- package/dist/cjs/diagnostics/native-sub-flow.js +106 -0
- package/dist/cjs/diagnostics/sub-flow.js +278 -32
- package/dist/cjs/execution/engine.js +3 -2
- package/dist/cjs/execution/events.js +5 -5
- package/dist/cjs/execution/reporting.js +18 -28
- package/dist/cjs/execution/workflow-chain.js +211 -0
- package/dist/cjs/execution/workflow-graph.js +72 -0
- package/dist/cjs/execution/workflow.js +34 -6
- package/dist/cjs/kits/aggregation.js +17 -14
- package/dist/cjs/kits/answering/checks.js +2 -1
- package/dist/cjs/kits/answering/flow.js +24 -21
- package/dist/cjs/kits/answering/tasks.js +25 -20
- package/dist/cjs/kits/delivery.js +36 -24
- package/dist/cjs/kits/knowledge/catalog.js +33 -30
- package/dist/cjs/kits/policies.js +3 -2
- package/dist/cjs/kits/presentation/outputs.js +2 -1
- package/dist/cjs/kits/retrieval.js +7 -1
- package/dist/cjs/kits/tools.js +1 -0
- package/dist/cjs/model/decision-retry.js +2 -1
- package/dist/cjs/model/runner.js +20 -5
- package/dist/cjs/structs/execution/workflow-views.js +2 -0
- package/dist/cjs/support/context/nodes.js +48 -45
- package/dist/cjs/support/context/processing.js +6 -3
- package/dist/cjs/support/decorators/definition.js +42 -0
- package/dist/cjs/support/decorators/index.js +63 -0
- package/dist/cjs/support/decorators/pool.js +87 -0
- package/dist/cjs/support/decorators/types.js +2 -0
- package/dist/cjs/utils/invocation.js +1 -0
- package/dist/esm/capabilities/invocation.js +21 -1
- package/dist/esm/capabilities/tool-runtime.js +8 -1
- package/dist/esm/capabilities/tools.js +12 -17
- package/dist/esm/diagnostics/index.d.ts +1 -0
- package/dist/esm/diagnostics/index.js +48 -2
- package/dist/esm/diagnostics/native-sub-flow.d.ts +94 -0
- package/dist/esm/diagnostics/native-sub-flow.js +101 -0
- package/dist/esm/diagnostics/sub-flow.d.ts +56 -4
- package/dist/esm/diagnostics/sub-flow.js +271 -32
- package/dist/esm/execution/engine.d.ts +1 -0
- package/dist/esm/execution/engine.js +3 -2
- package/dist/esm/execution/events.js +5 -5
- package/dist/esm/execution/reporting.d.ts +6 -12
- package/dist/esm/execution/reporting.js +19 -29
- package/dist/esm/execution/workflow-chain.d.ts +3 -0
- package/dist/esm/execution/workflow-chain.js +208 -0
- package/dist/esm/execution/workflow-graph.d.ts +7 -0
- package/dist/esm/execution/workflow-graph.js +68 -0
- package/dist/esm/execution/workflow.d.ts +6 -0
- package/dist/esm/execution/workflow.js +34 -6
- package/dist/esm/kits/aggregation.d.ts +1 -1
- package/dist/esm/kits/aggregation.js +17 -14
- package/dist/esm/kits/answering/checks.js +2 -1
- package/dist/esm/kits/answering/flow.js +24 -21
- package/dist/esm/kits/answering/tasks.js +25 -20
- package/dist/esm/kits/delivery.d.ts +0 -9
- package/dist/esm/kits/delivery.js +36 -24
- package/dist/esm/kits/knowledge/catalog.js +33 -30
- package/dist/esm/kits/policies.d.ts +1 -1
- package/dist/esm/kits/policies.js +3 -2
- package/dist/esm/kits/presentation/outputs.js +2 -1
- package/dist/esm/kits/retrieval.js +7 -1
- package/dist/esm/kits/tools.js +1 -0
- package/dist/esm/model/decision-retry.d.ts +2 -0
- package/dist/esm/model/decision-retry.js +2 -1
- package/dist/esm/model/runner.d.ts +2 -0
- package/dist/esm/model/runner.js +20 -5
- package/dist/esm/structs/capabilities/invocation.d.ts +2 -0
- package/dist/esm/structs/capabilities/tools.d.ts +7 -3
- package/dist/esm/structs/common.d.ts +2 -0
- package/dist/esm/structs/debug.d.ts +36 -20
- package/dist/esm/structs/execution/workflow-views.d.ts +123 -0
- package/dist/esm/structs/execution/workflow-views.js +1 -0
- package/dist/esm/structs/execution/workflow.d.ts +4 -3
- package/dist/esm/structs/index.d.ts +1 -0
- package/dist/esm/structs/model/runtime.d.ts +2 -0
- package/dist/esm/support/context/nodes.js +48 -45
- package/dist/esm/support/context/processing.js +6 -3
- package/dist/esm/support/decorators/definition.d.ts +19 -0
- package/dist/esm/support/decorators/definition.js +38 -0
- package/dist/esm/support/decorators/index.d.ts +39 -0
- package/dist/esm/support/decorators/index.js +48 -0
- package/dist/esm/support/decorators/pool.d.ts +97 -0
- package/dist/esm/support/decorators/pool.js +83 -0
- package/dist/esm/support/decorators/types.d.ts +22 -0
- package/dist/esm/support/decorators/types.js +1 -0
- package/dist/esm/utils/invocation.d.ts +1 -0
- package/dist/esm/utils/invocation.js +1 -0
- package/package.json +10 -2
- package/dist/cjs/utils/debug.js +0 -30
- package/dist/esm/utils/debug.d.ts +0 -27
- package/dist/esm/utils/debug.js +0 -27
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adapter between App-supplied debug loggers and the diagnostics pipeline.
|
|
3
|
-
*
|
|
4
|
-
* Sub-flow loggers are mutable, execution-owned objects. This module reads one at the
|
|
5
|
-
* moment a diagnostic fact is built and converts it into a frozen array of steps, so
|
|
6
|
-
* persisted observations never retain a live logger.
|
|
7
|
-
*
|
|
8
|
-
* Exports: `captureSubSteps`.
|
|
9
|
-
*/
|
|
10
|
-
import type { SubFlowLogger } from '../structs/debug.js';
|
|
11
|
-
import type { DiagnosticIdentity } from '../structs/diagnostics.js';
|
|
12
|
-
/**
|
|
13
|
-
* Read the current sub-step log of one execution visit.
|
|
14
|
-
*
|
|
15
|
-
* A missing reader or a logger that yields nothing produces the empty shape, which
|
|
16
|
-
* lets callers spread the result unconditionally. Failures are reported as one
|
|
17
|
-
* dropped step instead of propagating, because diagnostics must not break execution.
|
|
18
|
-
*
|
|
19
|
-
* @param read - Getter for the current logger; omitted when the caller has no logger.
|
|
20
|
-
* @param identity - Diagnostic identity copied onto each captured step.
|
|
21
|
-
* @returns Frozen `subSteps`, the number of dropped steps and whether the log was truncated.
|
|
22
|
-
*/
|
|
23
|
-
export declare function captureSubSteps(read: (() => SubFlowLogger | undefined) | undefined, identity?: Readonly<DiagnosticIdentity>): {
|
|
24
|
-
subSteps: readonly Readonly<import("../index.js").RecordedSubStep>[];
|
|
25
|
-
subStepsDropped: number;
|
|
26
|
-
subStepsTruncated: boolean;
|
|
27
|
-
};
|
package/dist/esm/utils/debug.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { readSubFlowLogger } from '../diagnostics/sub-flow.js';
|
|
2
|
-
import { synchronous } from './synchronous.js';
|
|
3
|
-
/**
|
|
4
|
-
* Read the current sub-step log of one execution visit.
|
|
5
|
-
*
|
|
6
|
-
* A missing reader or a logger that yields nothing produces the empty shape, which
|
|
7
|
-
* lets callers spread the result unconditionally. Failures are reported as one
|
|
8
|
-
* dropped step instead of propagating, because diagnostics must not break execution.
|
|
9
|
-
*
|
|
10
|
-
* @param read - Getter for the current logger; omitted when the caller has no logger.
|
|
11
|
-
* @param identity - Diagnostic identity copied onto each captured step.
|
|
12
|
-
* @returns Frozen `subSteps`, the number of dropped steps and whether the log was truncated.
|
|
13
|
-
*/
|
|
14
|
-
export function captureSubSteps(read, identity) {
|
|
15
|
-
const empty = { subSteps: Object.freeze([]), subStepsDropped: 0, subStepsTruncated: false };
|
|
16
|
-
if (!read)
|
|
17
|
-
return empty;
|
|
18
|
-
try {
|
|
19
|
-
const logger = synchronous(read(), 'Debug steps must be synchronous');
|
|
20
|
-
return logger === undefined
|
|
21
|
-
? empty
|
|
22
|
-
: { ...empty, subSteps: readSubFlowLogger(logger, undefined, identity) };
|
|
23
|
-
}
|
|
24
|
-
catch {
|
|
25
|
-
return { ...empty, subStepsDropped: 1 };
|
|
26
|
-
}
|
|
27
|
-
}
|