@linnlabs/linnkit 0.45.0 → 0.47.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/CHANGELOG.md +60 -0
- package/dist/cli.cjs +65 -243
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +65 -243
- package/dist/cli.js.map +1 -1
- package/dist/context-manager.cjs +7 -6
- package/dist/context-manager.cjs.map +1 -1
- package/dist/context-manager.js +7 -6
- package/dist/context-manager.js.map +1 -1
- package/dist/index.cjs +75 -253
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +75 -253
- package/dist/index.js.map +1 -1
- package/dist/ports/llm-call.d.cts +2 -16
- package/dist/ports/llm-call.d.ts +2 -16
- package/dist/quickstart.cjs +65 -243
- package/dist/quickstart.cjs.map +1 -1
- package/dist/quickstart.js +65 -243
- package/dist/quickstart.js.map +1 -1
- package/dist/runtime-kernel/graph-engine/executor.d.cts +0 -2
- package/dist/runtime-kernel/graph-engine/executor.d.ts +0 -2
- package/dist/runtime-kernel/graph-engine/types.d.cts +1 -4
- package/dist/runtime-kernel/graph-engine/types.d.ts +1 -4
- package/dist/runtime-kernel/llm/definitions/llmFallbackObserver.d.cts +1 -2
- package/dist/runtime-kernel/llm/definitions/llmFallbackObserver.d.ts +1 -2
- package/dist/runtime-kernel/llm/modelCatalog.d.cts +2 -3
- package/dist/runtime-kernel/llm/modelCatalog.d.ts +2 -3
- package/dist/runtime-kernel.cjs +75 -253
- package/dist/runtime-kernel.cjs.map +1 -1
- package/dist/runtime-kernel.js +75 -253
- package/dist/runtime-kernel.js.map +1 -1
- package/dist/testkit.cjs +83 -261
- package/dist/testkit.cjs.map +1 -1
- package/dist/testkit.js +83 -261
- package/dist/testkit.js.map +1 -1
- package/docs/integration/agent-registration-guide.md +1 -1
- package/docs/integration/context-engineering.md +5 -5
- package/docs/integration/llm-provider.md +1 -1
- package/docs/integration/tool-development-guide.md +4 -2
- package/package.json +2 -1
|
@@ -18,7 +18,6 @@ export { AgentStepDecision } from './tick-pipeline/types.cjs';
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
interface GraphAgentExecutorOptions {
|
|
21
|
-
cloudQuotaFallbackModelId?: string;
|
|
22
21
|
modelCatalog?: ModelCatalogLike;
|
|
23
22
|
modelResolver?: Pick<ModelResolverLike, 'resolveModelId'>;
|
|
24
23
|
}
|
|
@@ -43,7 +42,6 @@ declare class GraphAgentExecutor {
|
|
|
43
42
|
private readonly llmCaller;
|
|
44
43
|
private readonly toolRuntime;
|
|
45
44
|
private readonly contextBuilder;
|
|
46
|
-
private readonly cloudQuotaFallbackModelId?;
|
|
47
45
|
private readonly modelResolver;
|
|
48
46
|
private readonly modelCatalog;
|
|
49
47
|
private readonly telemetryPort;
|
|
@@ -18,7 +18,6 @@ export { AgentStepDecision } from './tick-pipeline/types.js';
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
interface GraphAgentExecutorOptions {
|
|
21
|
-
cloudQuotaFallbackModelId?: string;
|
|
22
21
|
modelCatalog?: ModelCatalogLike;
|
|
23
22
|
modelResolver?: Pick<ModelResolverLike, 'resolveModelId'>;
|
|
24
23
|
}
|
|
@@ -43,7 +42,6 @@ declare class GraphAgentExecutor {
|
|
|
43
42
|
private readonly llmCaller;
|
|
44
43
|
private readonly toolRuntime;
|
|
45
44
|
private readonly contextBuilder;
|
|
46
|
-
private readonly cloudQuotaFallbackModelId?;
|
|
47
45
|
private readonly modelResolver;
|
|
48
46
|
private readonly modelCatalog;
|
|
49
47
|
private readonly telemetryPort;
|
|
@@ -20,9 +20,6 @@ interface ExecutorLocalState {
|
|
|
20
20
|
lastStepsHintThreshold?: number;
|
|
21
21
|
systemReminderPolicy?: AgentSpecSystemReminderPolicy;
|
|
22
22
|
toolObservationPolicy?: AgentSpecToolObservationGovernancePolicy;
|
|
23
|
-
runLockedModelId?: string;
|
|
24
|
-
/** 最近一次成功产生当前工具调用决策的真实 provider model。 */
|
|
25
|
-
lastSuccessfulLlmModelId?: string;
|
|
26
23
|
/**
|
|
27
24
|
* 当前这一次 LLM 调用的业务来源。
|
|
28
25
|
*
|
|
@@ -55,7 +52,7 @@ interface ExecutorLocalState {
|
|
|
55
52
|
lastCommittedFingerprint?: string;
|
|
56
53
|
};
|
|
57
54
|
}
|
|
58
|
-
type ExecutorLocalPatch = Partial<Pick<ExecutorLocalState, '
|
|
55
|
+
type ExecutorLocalPatch = Partial<Pick<ExecutorLocalState, 'contextCompaction'>>;
|
|
59
56
|
interface EngineLocalState extends Record<string, unknown> {
|
|
60
57
|
runId?: RunId;
|
|
61
58
|
parentRunId?: RunId;
|
|
@@ -20,9 +20,6 @@ interface ExecutorLocalState {
|
|
|
20
20
|
lastStepsHintThreshold?: number;
|
|
21
21
|
systemReminderPolicy?: AgentSpecSystemReminderPolicy;
|
|
22
22
|
toolObservationPolicy?: AgentSpecToolObservationGovernancePolicy;
|
|
23
|
-
runLockedModelId?: string;
|
|
24
|
-
/** 最近一次成功产生当前工具调用决策的真实 provider model。 */
|
|
25
|
-
lastSuccessfulLlmModelId?: string;
|
|
26
23
|
/**
|
|
27
24
|
* 当前这一次 LLM 调用的业务来源。
|
|
28
25
|
*
|
|
@@ -55,7 +52,7 @@ interface ExecutorLocalState {
|
|
|
55
52
|
lastCommittedFingerprint?: string;
|
|
56
53
|
};
|
|
57
54
|
}
|
|
58
|
-
type ExecutorLocalPatch = Partial<Pick<ExecutorLocalState, '
|
|
55
|
+
type ExecutorLocalPatch = Partial<Pick<ExecutorLocalState, 'contextCompaction'>>;
|
|
59
56
|
interface EngineLocalState extends Record<string, unknown> {
|
|
60
57
|
runId?: RunId;
|
|
61
58
|
parentRunId?: RunId;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModelInputPlacement } from '../input-capabilities/definitions/modelInputCapability.cjs';
|
|
2
2
|
import { ContextUsageSnapshot } from '../../../contracts/token-usage.cjs';
|
|
3
3
|
|
|
4
|
-
type ModelFallbackPolicy = 'policy-switch'
|
|
4
|
+
type ModelFallbackPolicy = 'policy-switch';
|
|
5
5
|
interface ModelFallbackAppliedInfo {
|
|
6
6
|
readonly fromModelId: string;
|
|
7
7
|
readonly toModelId: string;
|
|
@@ -18,7 +18,6 @@ interface ModelFallbackRejectedInfo {
|
|
|
18
18
|
interface LlmFallbackObserver {
|
|
19
19
|
/** 每次调用只在最终真实 provider attempt 成功后触发一次。 */
|
|
20
20
|
readonly onLlmAttemptSucceeded?: (activeModelId: string, contextUsage?: ContextUsageSnapshot) => void;
|
|
21
|
-
readonly onCloudQuotaFallbackApplied?: (fallbackModelId: string) => void;
|
|
22
21
|
readonly onModelFallbackApplied?: (info: ModelFallbackAppliedInfo) => void;
|
|
23
22
|
readonly onModelFallbackRejected?: (info: ModelFallbackRejectedInfo) => void;
|
|
24
23
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModelInputPlacement } from '../input-capabilities/definitions/modelInputCapability.js';
|
|
2
2
|
import { ContextUsageSnapshot } from '../../../contracts/token-usage.js';
|
|
3
3
|
|
|
4
|
-
type ModelFallbackPolicy = 'policy-switch'
|
|
4
|
+
type ModelFallbackPolicy = 'policy-switch';
|
|
5
5
|
interface ModelFallbackAppliedInfo {
|
|
6
6
|
readonly fromModelId: string;
|
|
7
7
|
readonly toModelId: string;
|
|
@@ -18,7 +18,6 @@ interface ModelFallbackRejectedInfo {
|
|
|
18
18
|
interface LlmFallbackObserver {
|
|
19
19
|
/** 每次调用只在最终真实 provider attempt 成功后触发一次。 */
|
|
20
20
|
readonly onLlmAttemptSucceeded?: (activeModelId: string, contextUsage?: ContextUsageSnapshot) => void;
|
|
21
|
-
readonly onCloudQuotaFallbackApplied?: (fallbackModelId: string) => void;
|
|
22
21
|
readonly onModelFallbackApplied?: (info: ModelFallbackAppliedInfo) => void;
|
|
23
22
|
readonly onModelFallbackRejected?: (info: ModelFallbackRejectedInfo) => void;
|
|
24
23
|
}
|
|
@@ -14,13 +14,12 @@ interface ModelCatalogEntry {
|
|
|
14
14
|
id: string;
|
|
15
15
|
enabled?: boolean;
|
|
16
16
|
api_key?: string;
|
|
17
|
-
billing_mode?: 'byok' | 'cloud';
|
|
18
17
|
/**
|
|
19
18
|
* 是否允许客户端侧重试。
|
|
20
19
|
*
|
|
21
20
|
* 说明:
|
|
22
|
-
* -
|
|
23
|
-
* -
|
|
21
|
+
* - 每次请求都会单独计费、或由服务端自行重试的模型,Host 应设为 false;
|
|
22
|
+
* - 计费方式等产品概念由 Host 自己换算成这个开关,runtime-kernel 不解释。
|
|
24
23
|
*/
|
|
25
24
|
enable_client_retry?: boolean;
|
|
26
25
|
model_name?: string;
|
|
@@ -14,13 +14,12 @@ interface ModelCatalogEntry {
|
|
|
14
14
|
id: string;
|
|
15
15
|
enabled?: boolean;
|
|
16
16
|
api_key?: string;
|
|
17
|
-
billing_mode?: 'byok' | 'cloud';
|
|
18
17
|
/**
|
|
19
18
|
* 是否允许客户端侧重试。
|
|
20
19
|
*
|
|
21
20
|
* 说明:
|
|
22
|
-
* -
|
|
23
|
-
* -
|
|
21
|
+
* - 每次请求都会单独计费、或由服务端自行重试的模型,Host 应设为 false;
|
|
22
|
+
* - 计费方式等产品概念由 Host 自己换算成这个开关,runtime-kernel 不解释。
|
|
24
23
|
*/
|
|
25
24
|
enable_client_retry?: boolean;
|
|
26
25
|
model_name?: string;
|