@ai-agent-forge/plugin-compaction-policy 0.88.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.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @agent-forge/plugin-compaction-policy
2
+
3
+ Agent Forge 出厂默认策略插件(bundled 分发):一个包承载两个默认策略注册——自动压缩策略(`prepareCompaction` / 阈值判定 / `compact`)与分支摘要策略(`generateBranchSummary`),策略名均为 `default`。机制实现保留在宿主 `core/compaction/`,插件经宿主供给键 `@agent-forge/host/compaction` 消费(D-082)。
@@ -0,0 +1,19 @@
1
+ {
2
+ "packageFormatVersion": 1,
3
+ "id": "agent-forge.plugin.compaction-policy",
4
+ "pluginVersion": "0.88.1",
5
+ "apiVersion": "1",
6
+ "minHostVersion": "0.88.0",
7
+ "platform": {
8
+ "os": [
9
+ "windows",
10
+ "macos",
11
+ "linux"
12
+ ],
13
+ "runtime": [
14
+ {
15
+ "name": "node"
16
+ }
17
+ ]
18
+ }
19
+ }
@@ -0,0 +1,6 @@
1
+ import type { CapabilityAPI, DisposableRegistration } from "@agent-forge/plugin-sdk";
2
+ /** Policy name the host resolves for branch summarization (host constant parity). */
3
+ export declare const DEFAULT_BRANCH_SUMMARY_POLICY_NAME = "default";
4
+ /** First-party adapter that keeps the legacy branch summarizer replaceable. */
5
+ export declare function registerDefaultBranchSummaryPolicy(api: CapabilityAPI): DisposableRegistration;
6
+ //# sourceMappingURL=branch-summary-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branch-summary-policy.d.ts","sourceRoot":"","sources":["../src/branch-summary-policy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAErF,qFAAqF;AACrF,eAAO,MAAM,kCAAkC,YAAY,CAAC;AAE5D,+EAA+E;AAC/E,wBAAgB,kCAAkC,CAAC,GAAG,EAAE,aAAa,GAAG,sBAAsB,CAa7F","sourcesContent":["import { generateBranchSummary } from \"@agent-forge/host/compaction\";\nimport type { CapabilityAPI, DisposableRegistration } from \"@agent-forge/plugin-sdk\";\n\n/** Policy name the host resolves for branch summarization (host constant parity). */\nexport const DEFAULT_BRANCH_SUMMARY_POLICY_NAME = \"default\";\n\n/** First-party adapter that keeps the legacy branch summarizer replaceable. */\nexport function registerDefaultBranchSummaryPolicy(api: CapabilityAPI): DisposableRegistration {\n\treturn api.registerBranchSummaryPolicy(DEFAULT_BRANCH_SUMMARY_POLICY_NAME, {\n\t\tasync summarize(request) {\n\t\t\treturn generateBranchSummary(request.entries as Parameters<typeof generateBranchSummary>[0], {\n\t\t\t\tinvocation: request.invocation,\n\t\t\t\tmodel: request.model,\n\t\t\t\tsignal: request.signal,\n\t\t\t\tcustomInstructions: request.customInstructions,\n\t\t\t\treplaceInstructions: request.replaceInstructions,\n\t\t\t\treserveTokens: request.reserveTokens,\n\t\t\t});\n\t\t},\n\t});\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import { generateBranchSummary } from "@agent-forge/host/compaction";
2
+ /** Policy name the host resolves for branch summarization (host constant parity). */
3
+ export const DEFAULT_BRANCH_SUMMARY_POLICY_NAME = "default";
4
+ /** First-party adapter that keeps the legacy branch summarizer replaceable. */
5
+ export function registerDefaultBranchSummaryPolicy(api) {
6
+ return api.registerBranchSummaryPolicy(DEFAULT_BRANCH_SUMMARY_POLICY_NAME, {
7
+ async summarize(request) {
8
+ return generateBranchSummary(request.entries, {
9
+ invocation: request.invocation,
10
+ model: request.model,
11
+ signal: request.signal,
12
+ customInstructions: request.customInstructions,
13
+ replaceInstructions: request.replaceInstructions,
14
+ reserveTokens: request.reserveTokens,
15
+ });
16
+ },
17
+ });
18
+ }
19
+ //# sourceMappingURL=branch-summary-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branch-summary-policy.js","sourceRoot":"","sources":["../src/branch-summary-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,qFAAqF;AACrF,MAAM,CAAC,MAAM,kCAAkC,GAAG,SAAS,CAAC;AAE5D,+EAA+E;AAC/E,MAAM,UAAU,kCAAkC,CAAC,GAAkB,EAA0B;IAC9F,OAAO,GAAG,CAAC,2BAA2B,CAAC,kCAAkC,EAAE;QAC1E,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE;YACxB,OAAO,qBAAqB,CAAC,OAAO,CAAC,OAAsD,EAAE;gBAC5F,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;gBAC9C,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;gBAChD,aAAa,EAAE,OAAO,CAAC,aAAa;aACpC,CAAC,CAAC;QAAA,CACH;KACD,CAAC,CAAC;AAAA,CACH","sourcesContent":["import { generateBranchSummary } from \"@agent-forge/host/compaction\";\nimport type { CapabilityAPI, DisposableRegistration } from \"@agent-forge/plugin-sdk\";\n\n/** Policy name the host resolves for branch summarization (host constant parity). */\nexport const DEFAULT_BRANCH_SUMMARY_POLICY_NAME = \"default\";\n\n/** First-party adapter that keeps the legacy branch summarizer replaceable. */\nexport function registerDefaultBranchSummaryPolicy(api: CapabilityAPI): DisposableRegistration {\n\treturn api.registerBranchSummaryPolicy(DEFAULT_BRANCH_SUMMARY_POLICY_NAME, {\n\t\tasync summarize(request) {\n\t\t\treturn generateBranchSummary(request.entries as Parameters<typeof generateBranchSummary>[0], {\n\t\t\t\tinvocation: request.invocation,\n\t\t\t\tmodel: request.model,\n\t\t\t\tsignal: request.signal,\n\t\t\t\tcustomInstructions: request.customInstructions,\n\t\t\t\treplaceInstructions: request.replaceInstructions,\n\t\t\t\treserveTokens: request.reserveTokens,\n\t\t\t});\n\t\t},\n\t});\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import type { CapabilityAPI, DisposableRegistration } from "@agent-forge/plugin-sdk";
2
+ /** Policy name the host resolves for automatic compaction (host constant parity). */
3
+ export declare const DEFAULT_COMPACTION_POLICY_NAME = "default";
4
+ /** Register the current automatic-compaction decision as a replaceable first-party policy. */
5
+ export declare function registerDefaultCompactionPolicy(api: CapabilityAPI): DisposableRegistration;
6
+ //# sourceMappingURL=compaction-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compaction-policy.d.ts","sourceRoot":"","sources":["../src/compaction-policy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAA4B,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAE/G,qFAAqF;AACrF,eAAO,MAAM,8BAA8B,YAAY,CAAC;AAExD,8FAA8F;AAC9F,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,aAAa,GAAG,sBAAsB,CAsC1F","sourcesContent":["import { type CompactionPreparation, compact, prepareCompaction } from \"@agent-forge/host/compaction\";\nimport type { CapabilityAPI, CompactionSummaryRequest, DisposableRegistration } from \"@agent-forge/plugin-sdk\";\n\n/** Policy name the host resolves for automatic compaction (host constant parity). */\nexport const DEFAULT_COMPACTION_POLICY_NAME = \"default\";\n\n/** Register the current automatic-compaction decision as a replaceable first-party policy. */\nexport function registerDefaultCompactionPolicy(api: CapabilityAPI): DisposableRegistration {\n\treturn api.registerCompactionPolicy(DEFAULT_COMPACTION_POLICY_NAME, {\n\t\tprepare: (request) =>\n\t\t\tprepareCompaction(\n\t\t\t\trequest.entries as Parameters<typeof prepareCompaction>[0],\n\t\t\t\trequest.settings as Parameters<typeof prepareCompaction>[1],\n\t\t\t),\n\t\tdecide: (request) => {\n\t\t\tif (request.reason === \"threshold\") {\n\t\t\t\tconst usage = request.contextUsage;\n\t\t\t\tconst overBudget =\n\t\t\t\t\tusage !== undefined &&\n\t\t\t\t\tusage.contextWindow > 0 &&\n\t\t\t\t\tusage.contextTokens > usage.contextWindow - usage.reserveTokens;\n\t\t\t\treturn { compact: overBudget, retry: false };\n\t\t\t}\n\t\t\tif (request.recoveryAttempted) {\n\t\t\t\treturn {\n\t\t\t\t\tcompact: false,\n\t\t\t\t\tfailureMessage: request.contextOverflow\n\t\t\t\t\t\t? \"Context overflow recovery failed after one compact-and-retry attempt. Try reducing context or switching to a larger-context model.\"\n\t\t\t\t\t\t: \"Truncated response recovery failed after one compact-and-retry attempt.\",\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tcompact: request.contextOverflow || request.recoverableLength,\n\t\t\t\tretry: request.canContinue,\n\t\t\t};\n\t\t},\n\t\tsummarize: async (request: CompactionSummaryRequest) =>\n\t\t\tcompact(request.preparation as CompactionPreparation, {\n\t\t\t\tinvocation: request.invocation,\n\t\t\t\tmodel: request.model,\n\t\t\t\tcustomInstructions: request.customInstructions,\n\t\t\t\tthinkingLevel: request.thinkingLevel,\n\t\t\t\tsignal: request.signal,\n\t\t\t}),\n\t});\n}\n"]}
@@ -0,0 +1,38 @@
1
+ import { compact, prepareCompaction } from "@agent-forge/host/compaction";
2
+ /** Policy name the host resolves for automatic compaction (host constant parity). */
3
+ export const DEFAULT_COMPACTION_POLICY_NAME = "default";
4
+ /** Register the current automatic-compaction decision as a replaceable first-party policy. */
5
+ export function registerDefaultCompactionPolicy(api) {
6
+ return api.registerCompactionPolicy(DEFAULT_COMPACTION_POLICY_NAME, {
7
+ prepare: (request) => prepareCompaction(request.entries, request.settings),
8
+ decide: (request) => {
9
+ if (request.reason === "threshold") {
10
+ const usage = request.contextUsage;
11
+ const overBudget = usage !== undefined &&
12
+ usage.contextWindow > 0 &&
13
+ usage.contextTokens > usage.contextWindow - usage.reserveTokens;
14
+ return { compact: overBudget, retry: false };
15
+ }
16
+ if (request.recoveryAttempted) {
17
+ return {
18
+ compact: false,
19
+ failureMessage: request.contextOverflow
20
+ ? "Context overflow recovery failed after one compact-and-retry attempt. Try reducing context or switching to a larger-context model."
21
+ : "Truncated response recovery failed after one compact-and-retry attempt.",
22
+ };
23
+ }
24
+ return {
25
+ compact: request.contextOverflow || request.recoverableLength,
26
+ retry: request.canContinue,
27
+ };
28
+ },
29
+ summarize: async (request) => compact(request.preparation, {
30
+ invocation: request.invocation,
31
+ model: request.model,
32
+ customInstructions: request.customInstructions,
33
+ thinkingLevel: request.thinkingLevel,
34
+ signal: request.signal,
35
+ }),
36
+ });
37
+ }
38
+ //# sourceMappingURL=compaction-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compaction-policy.js","sourceRoot":"","sources":["../src/compaction-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtG,qFAAqF;AACrF,MAAM,CAAC,MAAM,8BAA8B,GAAG,SAAS,CAAC;AAExD,8FAA8F;AAC9F,MAAM,UAAU,+BAA+B,CAAC,GAAkB,EAA0B;IAC3F,OAAO,GAAG,CAAC,wBAAwB,CAAC,8BAA8B,EAAE;QACnE,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CACpB,iBAAiB,CAChB,OAAO,CAAC,OAAkD,EAC1D,OAAO,CAAC,QAAmD,CAC3D;QACF,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC;YACpB,IAAI,OAAO,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;gBACpC,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC;gBACnC,MAAM,UAAU,GACf,KAAK,KAAK,SAAS;oBACnB,KAAK,CAAC,aAAa,GAAG,CAAC;oBACvB,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;gBACjE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;YAC9C,CAAC;YACD,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;gBAC/B,OAAO;oBACN,OAAO,EAAE,KAAK;oBACd,cAAc,EAAE,OAAO,CAAC,eAAe;wBACtC,CAAC,CAAC,oIAAoI;wBACtI,CAAC,CAAC,yEAAyE;iBAC5E,CAAC;YACH,CAAC;YACD,OAAO;gBACN,OAAO,EAAE,OAAO,CAAC,eAAe,IAAI,OAAO,CAAC,iBAAiB;gBAC7D,KAAK,EAAE,OAAO,CAAC,WAAW;aAC1B,CAAC;QAAA,CACF;QACD,SAAS,EAAE,KAAK,EAAE,OAAiC,EAAE,EAAE,CACtD,OAAO,CAAC,OAAO,CAAC,WAAoC,EAAE;YACrD,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;YAC9C,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,MAAM,EAAE,OAAO,CAAC,MAAM;SACtB,CAAC;KACH,CAAC,CAAC;AAAA,CACH","sourcesContent":["import { type CompactionPreparation, compact, prepareCompaction } from \"@agent-forge/host/compaction\";\nimport type { CapabilityAPI, CompactionSummaryRequest, DisposableRegistration } from \"@agent-forge/plugin-sdk\";\n\n/** Policy name the host resolves for automatic compaction (host constant parity). */\nexport const DEFAULT_COMPACTION_POLICY_NAME = \"default\";\n\n/** Register the current automatic-compaction decision as a replaceable first-party policy. */\nexport function registerDefaultCompactionPolicy(api: CapabilityAPI): DisposableRegistration {\n\treturn api.registerCompactionPolicy(DEFAULT_COMPACTION_POLICY_NAME, {\n\t\tprepare: (request) =>\n\t\t\tprepareCompaction(\n\t\t\t\trequest.entries as Parameters<typeof prepareCompaction>[0],\n\t\t\t\trequest.settings as Parameters<typeof prepareCompaction>[1],\n\t\t\t),\n\t\tdecide: (request) => {\n\t\t\tif (request.reason === \"threshold\") {\n\t\t\t\tconst usage = request.contextUsage;\n\t\t\t\tconst overBudget =\n\t\t\t\t\tusage !== undefined &&\n\t\t\t\t\tusage.contextWindow > 0 &&\n\t\t\t\t\tusage.contextTokens > usage.contextWindow - usage.reserveTokens;\n\t\t\t\treturn { compact: overBudget, retry: false };\n\t\t\t}\n\t\t\tif (request.recoveryAttempted) {\n\t\t\t\treturn {\n\t\t\t\t\tcompact: false,\n\t\t\t\t\tfailureMessage: request.contextOverflow\n\t\t\t\t\t\t? \"Context overflow recovery failed after one compact-and-retry attempt. Try reducing context or switching to a larger-context model.\"\n\t\t\t\t\t\t: \"Truncated response recovery failed after one compact-and-retry attempt.\",\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tcompact: request.contextOverflow || request.recoverableLength,\n\t\t\t\tretry: request.canContinue,\n\t\t\t};\n\t\t},\n\t\tsummarize: async (request: CompactionSummaryRequest) =>\n\t\t\tcompact(request.preparation as CompactionPreparation, {\n\t\t\t\tinvocation: request.invocation,\n\t\t\t\tmodel: request.model,\n\t\t\t\tcustomInstructions: request.customInstructions,\n\t\t\t\tthinkingLevel: request.thinkingLevel,\n\t\t\t\tsignal: request.signal,\n\t\t\t}),\n\t});\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import type { CapabilityAPI } from "@agent-forge/plugin-sdk";
2
+ /**
3
+ * Default-export factory consumed by the host's `loadCapabilityPluginFromManifest`.
4
+ *
5
+ * Registers both default policies carried by this package — automatic
6
+ * compaction and branch summarization — as one replaceable unit, and disposes
7
+ * them in reverse order on plugin teardown (same disposal semantics as the
8
+ * host's embedded `syncRegistrationFactory`).
9
+ */
10
+ export default function createCompactionPolicyPluginEntry(api: CapabilityAPI): Promise<{
11
+ dispose: () => void;
12
+ }>;
13
+ //# sourceMappingURL=entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../src/entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAI7D;;;;;;;GAOG;AACH,wBAA8B,iCAAiC,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC,CAWpH","sourcesContent":["import type { CapabilityAPI } from \"@agent-forge/plugin-sdk\";\nimport { registerDefaultBranchSummaryPolicy } from \"./branch-summary-policy.ts\";\nimport { registerDefaultCompactionPolicy } from \"./compaction-policy.ts\";\n\n/**\n * Default-export factory consumed by the host's `loadCapabilityPluginFromManifest`.\n *\n * Registers both default policies carried by this package — automatic\n * compaction and branch summarization — as one replaceable unit, and disposes\n * them in reverse order on plugin teardown (same disposal semantics as the\n * host's embedded `syncRegistrationFactory`).\n */\nexport default async function createCompactionPolicyPluginEntry(api: CapabilityAPI): Promise<{ dispose: () => void }> {\n\tconst compaction = registerDefaultCompactionPolicy(api);\n\tconst branchSummary = registerDefaultBranchSummaryPolicy(api);\n\treturn {\n\t\tdispose: () => {\n\t\t\t// Registration disposal in the capability runtime is synchronous;\n\t\t\t// void consumes the declared Promise possibility of the contract.\n\t\t\tvoid branchSummary.dispose();\n\t\t\tvoid compaction.dispose();\n\t\t},\n\t};\n}\n"]}
package/dist/entry.js ADDED
@@ -0,0 +1,23 @@
1
+ import { registerDefaultBranchSummaryPolicy } from "./branch-summary-policy.js";
2
+ import { registerDefaultCompactionPolicy } from "./compaction-policy.js";
3
+ /**
4
+ * Default-export factory consumed by the host's `loadCapabilityPluginFromManifest`.
5
+ *
6
+ * Registers both default policies carried by this package — automatic
7
+ * compaction and branch summarization — as one replaceable unit, and disposes
8
+ * them in reverse order on plugin teardown (same disposal semantics as the
9
+ * host's embedded `syncRegistrationFactory`).
10
+ */
11
+ export default async function createCompactionPolicyPluginEntry(api) {
12
+ const compaction = registerDefaultCompactionPolicy(api);
13
+ const branchSummary = registerDefaultBranchSummaryPolicy(api);
14
+ return {
15
+ dispose: () => {
16
+ // Registration disposal in the capability runtime is synchronous;
17
+ // void consumes the declared Promise possibility of the contract.
18
+ void branchSummary.dispose();
19
+ void compaction.dispose();
20
+ },
21
+ };
22
+ }
23
+ //# sourceMappingURL=entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry.js","sourceRoot":"","sources":["../src/entry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kCAAkC,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAEzE;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,iCAAiC,CAAC,GAAkB,EAAoC;IACrH,MAAM,UAAU,GAAG,+BAA+B,CAAC,GAAG,CAAC,CAAC;IACxD,MAAM,aAAa,GAAG,kCAAkC,CAAC,GAAG,CAAC,CAAC;IAC9D,OAAO;QACN,OAAO,EAAE,GAAG,EAAE,CAAC;YACd,kEAAkE;YAClE,kEAAkE;YAClE,KAAK,aAAa,CAAC,OAAO,EAAE,CAAC;YAC7B,KAAK,UAAU,CAAC,OAAO,EAAE,CAAC;QAAA,CAC1B;KACD,CAAC;AAAA,CACF","sourcesContent":["import type { CapabilityAPI } from \"@agent-forge/plugin-sdk\";\nimport { registerDefaultBranchSummaryPolicy } from \"./branch-summary-policy.ts\";\nimport { registerDefaultCompactionPolicy } from \"./compaction-policy.ts\";\n\n/**\n * Default-export factory consumed by the host's `loadCapabilityPluginFromManifest`.\n *\n * Registers both default policies carried by this package — automatic\n * compaction and branch summarization — as one replaceable unit, and disposes\n * them in reverse order on plugin teardown (same disposal semantics as the\n * host's embedded `syncRegistrationFactory`).\n */\nexport default async function createCompactionPolicyPluginEntry(api: CapabilityAPI): Promise<{ dispose: () => void }> {\n\tconst compaction = registerDefaultCompactionPolicy(api);\n\tconst branchSummary = registerDefaultBranchSummaryPolicy(api);\n\treturn {\n\t\tdispose: () => {\n\t\t\t// Registration disposal in the capability runtime is synchronous;\n\t\t\t// void consumes the declared Promise possibility of the contract.\n\t\t\tvoid branchSummary.dispose();\n\t\t\tvoid compaction.dispose();\n\t\t},\n\t};\n}\n"]}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@ai-agent-forge/plugin-compaction-policy",
3
+ "version": "0.88.1",
4
+ "description": "Default compaction and branch summary policy plugin for Agent Forge",
5
+ "type": "module",
6
+ "main": "./dist/entry.js",
7
+ "types": "./dist/entry.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/entry.d.ts",
11
+ "import": "./dist/entry.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "agent-forge.json",
17
+ "plugin.json",
18
+ "README.md"
19
+ ],
20
+ "scripts": {
21
+ "clean": "shx rm -rf dist",
22
+ "build": "tsgo -p tsconfig.build.json",
23
+ "test": "vitest --run",
24
+ "prepublishOnly": "npm run clean && npm run build"
25
+ },
26
+ "keywords": [
27
+ "agent-forge",
28
+ "plugin",
29
+ "compaction-policy"
30
+ ],
31
+ "author": "Agent Forge contributors",
32
+ "license": "MIT",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/agent-forge/agent-forge.git",
36
+ "directory": "plugins/compaction-policy"
37
+ },
38
+ "bugs": {
39
+ "url": "https://github.com/agent-forge/agent-forge/issues"
40
+ },
41
+ "homepage": "https://github.com/agent-forge/agent-forge#readme",
42
+ "engines": {
43
+ "node": ">=22.19.0"
44
+ },
45
+ "dependencies": {},
46
+ "devDependencies": {
47
+ "shx": "0.4.0",
48
+ "vitest": "4.1.11"
49
+ }
50
+ }
package/plugin.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "id": "agent-forge.plugin.compaction-policy",
3
+ "version": "0.88.1",
4
+ "apiVersion": "1-draft",
5
+ "entry": "./dist/entry.js",
6
+ "hostVersion": ">=0.88.0",
7
+ "requiredCapabilities": [
8
+ "compaction-policy"
9
+ ]
10
+ }