opencode-acp 1.18.2-pr.471.205 → 1.18.2-pr.474.208
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/index.d.ts.map +1 -1
- package/dist/index.js +40 -12
- package/dist/index.js.map +1 -1
- package/dist/lib/host-permissions.d.ts +20 -0
- package/dist/lib/host-permissions.d.ts.map +1 -1
- package/dist/lib/messages/truncate-tools.d.ts +1 -0
- package/dist/lib/messages/truncate-tools.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -8,4 +8,24 @@ export interface HostPermissionSnapshot {
|
|
|
8
8
|
export declare const compressDisabledByOpencode: (...permissionConfigs: PermissionConfig[]) => boolean;
|
|
9
9
|
export declare const resolveEffectiveCompressPermission: (basePermission: PermissionAction, hostPermissions: HostPermissionSnapshot, agentName?: string) => PermissionAction;
|
|
10
10
|
export declare const hasExplicitToolPermission: (permissionConfig: PermissionConfig, tool: string) => boolean;
|
|
11
|
+
/**
|
|
12
|
+
* True when the user has made any decision that resolves `tool` in this map:
|
|
13
|
+
* an exact key in any value form (scalar or nested pattern object — including
|
|
14
|
+
* a degenerate empty object, which produces no rules but still counts as key
|
|
15
|
+
* presence), or a wildcard key (`"*"`, `"acp*"`) matching via the same rule
|
|
16
|
+
* machinery the host resolution models ([#465]).
|
|
17
|
+
*/
|
|
18
|
+
export declare const anyRuleResolves: (permissionConfig: PermissionConfig, tool: string) => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Merge ACP's tool permissions into the host map. An explicit user `compress`
|
|
21
|
+
* rule means the user owns the map (returned unchanged). Otherwise write
|
|
22
|
+
* `compress` + default `acp_status: "allow"` — but never override a user
|
|
23
|
+
* decision on `acp_status`, whether an exact key ([#457]: it used to be
|
|
24
|
+
* silently rewritten to `"allow"`, inverting the decision; the host reads its
|
|
25
|
+
* own permissions from this same map) or a wildcard like `"*"` / `"acp*"`
|
|
26
|
+
* ([#465]: appended after the user's rules it would win last-match and erase
|
|
27
|
+
* their decision). The default write is strictly additive over [#457]: it only
|
|
28
|
+
* stops where a user rule already resolves the tool.
|
|
29
|
+
*/
|
|
30
|
+
export declare const applyAcpToolPermissions: (permissionConfig: PermissionConfig, compressPermission: PermissionAction) => Record<string, PermissionValue>;
|
|
11
31
|
//# sourceMappingURL=host-permissions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-permissions.d.ts","sourceRoot":"","sources":["../../lib/host-permissions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAA;AAEvD,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;AAEjF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,SAAS,CAAA;AAE1E,MAAM,WAAW,sBAAsB;IACnC,MAAM,EAAE,gBAAgB,CAAA;IACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;CAC3C;AA6DD,eAAO,MAAM,0BAA0B,GAAI,GAAG,mBAAmB,gBAAgB,EAAE,KAAG,OAMrF,CAAA;AAED,eAAO,MAAM,kCAAkC,GAC3C,gBAAgB,gBAAgB,EAChC,iBAAiB,sBAAsB,EACvC,YAAY,MAAM,KACnB,gBAWF,CAAA;AAED,eAAO,MAAM,yBAAyB,GAClC,kBAAkB,gBAAgB,EAClC,MAAM,MAAM,KACb,OAEF,CAAA"}
|
|
1
|
+
{"version":3,"file":"host-permissions.d.ts","sourceRoot":"","sources":["../../lib/host-permissions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAA;AAEvD,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;AAEjF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,SAAS,CAAA;AAE1E,MAAM,WAAW,sBAAsB;IACnC,MAAM,EAAE,gBAAgB,CAAA;IACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;CAC3C;AA6DD,eAAO,MAAM,0BAA0B,GAAI,GAAG,mBAAmB,gBAAgB,EAAE,KAAG,OAMrF,CAAA;AAED,eAAO,MAAM,kCAAkC,GAC3C,gBAAgB,gBAAgB,EAChC,iBAAiB,sBAAsB,EACvC,YAAY,MAAM,KACnB,gBAWF,CAAA;AAED,eAAO,MAAM,yBAAyB,GAClC,kBAAkB,gBAAgB,EAClC,MAAM,MAAM,KACb,OAEF,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,kBAAkB,gBAAgB,EAAE,MAAM,MAAM,KAAG,OAUlF,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,GAChC,kBAAkB,gBAAgB,EAClC,oBAAoB,gBAAgB,KACrC,MAAM,CAAC,MAAM,EAAE,eAAe,CAehC,CAAA"}
|
|
@@ -2,6 +2,7 @@ import { SessionState, WithParts } from "../state";
|
|
|
2
2
|
import type { PluginConfig } from "../config";
|
|
3
3
|
import { Logger } from "../logger";
|
|
4
4
|
export declare const OUTPUT_RESERVE_TOKENS = 16384;
|
|
5
|
+
export declare const MAX_OVERHEAD_ERROR_SESSIONS = 1024;
|
|
5
6
|
/**
|
|
6
7
|
* When context reaches the GC threshold, truncate the largest visible tool outputs
|
|
7
8
|
* (keeping prefix + suffix) to free space. Summaries are never touched — they contain
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"truncate-tools.d.ts","sourceRoot":"","sources":["../../../lib/messages/truncate-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAgBlC,eAAO,MAAM,qBAAqB,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"truncate-tools.d.ts","sourceRoot":"","sources":["../../../lib/messages/truncate-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAgBlC,eAAO,MAAM,qBAAqB,QAAQ,CAAA;AAS1C,eAAO,MAAM,2BAA2B,OAAO,CAAA;AAyB/C;;;;GAIG;AACH,wBAAgB,wBAAwB,CACpC,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,SAAS,EAAE,GACtB,IAAI,CAkGN"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "opencode-acp",
|
|
4
|
-
"version": "1.18.2-pr.
|
|
4
|
+
"version": "1.18.2-pr.474.208",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Active Context Pruning — model-driven context management for OpenCode (hardened fork of DCP with 35 bug fixes)",
|
|
7
7
|
"main": "./dist/index.js",
|