@intutic/shared-types 2.2.0 → 2.3.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/anomaly.d.ts +6 -10
- package/dist/anomaly.d.ts.map +1 -1
- package/dist/anomaly.js +0 -2
- package/dist/anomaly.js.map +1 -1
- package/dist/api-contracts.d.ts +1 -1
- package/dist/api-contracts.js +1 -1
- package/dist/attenuation.d.ts +1 -1
- package/dist/attenuation.js +1 -1
- package/dist/auth.d.ts +10 -9
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +3 -4
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +1 -1
- package/dist/billing.js +1 -1
- package/dist/destructiveSql.d.ts +48 -0
- package/dist/destructiveSql.d.ts.map +1 -0
- package/dist/destructiveSql.js +43 -0
- package/dist/destructiveSql.js.map +1 -0
- package/dist/devInventory.d.ts +120 -0
- package/dist/devInventory.d.ts.map +1 -0
- package/dist/devInventory.js +80 -0
- package/dist/devInventory.js.map +1 -0
- package/dist/enums.d.ts +18 -21
- package/dist/enums.d.ts.map +1 -1
- package/dist/enums.js +24 -28
- package/dist/enums.js.map +1 -1
- package/dist/errors.js +3 -3
- package/dist/errors.js.map +1 -1
- package/dist/finops.d.ts +14 -2
- package/dist/finops.d.ts.map +1 -1
- package/dist/finops.js +15 -1
- package/dist/finops.js.map +1 -1
- package/dist/gateDecisions.d.ts +18 -0
- package/dist/gateDecisions.d.ts.map +1 -0
- package/dist/gateDecisions.js +20 -0
- package/dist/gateDecisions.js.map +1 -0
- package/dist/gateIdentity.d.ts +23 -0
- package/dist/gateIdentity.d.ts.map +1 -0
- package/dist/gateIdentity.js +32 -0
- package/dist/gateIdentity.js.map +1 -0
- package/dist/gateKind.d.ts +172 -0
- package/dist/gateKind.d.ts.map +1 -0
- package/dist/gateKind.js +160 -0
- package/dist/gateKind.js.map +1 -0
- package/dist/gateLimits.d.ts +170 -0
- package/dist/gateLimits.d.ts.map +1 -0
- package/dist/gateLimits.js +96 -0
- package/dist/gateLimits.js.map +1 -0
- package/dist/gitRemote.d.ts +17 -0
- package/dist/gitRemote.d.ts.map +1 -0
- package/dist/gitRemote.js +71 -0
- package/dist/gitRemote.js.map +1 -0
- package/dist/governanceCoverage.d.ts +1 -1
- package/dist/governanceCoverage.js +1 -1
- package/dist/guardrailIr.d.ts +3 -3
- package/dist/guardrailIr.d.ts.map +1 -1
- package/dist/guardrailIr.js +3 -3
- package/dist/guardrailIr.js.map +1 -1
- package/dist/guardrailRender.d.ts +1 -1
- package/dist/guardrailRender.js +1 -1
- package/dist/harnessRules.d.ts +74 -0
- package/dist/harnessRules.d.ts.map +1 -0
- package/dist/harnessRules.js +142 -0
- package/dist/harnessRules.js.map +1 -0
- package/dist/holdMessages.d.ts +25 -0
- package/dist/holdMessages.d.ts.map +1 -0
- package/dist/holdMessages.js +34 -0
- package/dist/holdMessages.js.map +1 -0
- package/dist/identity.d.ts +1 -1
- package/dist/identity.js +2 -2
- package/dist/identity.js.map +1 -1
- package/dist/index.d.ts +33 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +132 -10
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +1 -1
- package/dist/mcpBudgets.d.ts +191 -0
- package/dist/mcpBudgets.d.ts.map +1 -0
- package/dist/mcpBudgets.js +144 -0
- package/dist/mcpBudgets.js.map +1 -0
- package/dist/mcpRegistryRecord.d.ts +143 -0
- package/dist/mcpRegistryRecord.d.ts.map +1 -0
- package/dist/mcpRegistryRecord.js +229 -0
- package/dist/mcpRegistryRecord.js.map +1 -0
- package/dist/mcpToolRisk.d.ts +82 -0
- package/dist/mcpToolRisk.d.ts.map +1 -0
- package/dist/mcpToolRisk.js +334 -0
- package/dist/mcpToolRisk.js.map +1 -0
- package/dist/modelCatalog.d.ts +2 -2
- package/dist/modelCatalog.generated.js +1 -1
- package/dist/modelCatalog.generated.js.map +1 -1
- package/dist/modelCatalog.js +2 -2
- package/dist/notifications.d.ts +8 -150
- package/dist/notifications.d.ts.map +1 -1
- package/dist/notifications.js +241 -1
- package/dist/notifications.js.map +1 -1
- package/dist/phrases.d.ts +87 -0
- package/dist/phrases.d.ts.map +1 -0
- package/dist/phrases.js +241 -0
- package/dist/phrases.js.map +1 -0
- package/dist/piiDetectors.d.ts +97 -0
- package/dist/piiDetectors.d.ts.map +1 -0
- package/dist/piiDetectors.js +96 -0
- package/dist/piiDetectors.js.map +1 -0
- package/dist/piiDetectors.json +71 -0
- package/dist/policy.d.ts +1 -1
- package/dist/policy.js +1 -1
- package/dist/policyGuardrails.d.ts +127 -10
- package/dist/policyGuardrails.d.ts.map +1 -1
- package/dist/policyGuardrails.js +59 -6
- package/dist/policyGuardrails.js.map +1 -1
- package/dist/posturePresets.js +1 -1
- package/dist/posturePresets.js.map +1 -1
- package/dist/providerVerification.d.ts +2 -2
- package/dist/providerVerification.js +2 -2
- package/dist/providers.d.ts +4 -4
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +11 -6
- package/dist/providers.js.map +1 -1
- package/dist/regoBuiltins.d.ts +42 -0
- package/dist/regoBuiltins.d.ts.map +1 -0
- package/dist/regoBuiltins.js +732 -0
- package/dist/regoBuiltins.js.map +1 -0
- package/dist/regoRules.d.ts +105 -0
- package/dist/regoRules.d.ts.map +1 -0
- package/dist/regoRules.js +407 -0
- package/dist/regoRules.js.map +1 -0
- package/dist/ruleLoadFailures.d.ts +15 -0
- package/dist/ruleLoadFailures.d.ts.map +1 -0
- package/dist/ruleLoadFailures.js +26 -0
- package/dist/ruleLoadFailures.js.map +1 -0
- package/dist/scriptScan.d.ts +5 -5
- package/dist/scriptScan.js +3 -3
- package/dist/sequence.d.ts +52 -0
- package/dist/sequence.d.ts.map +1 -0
- package/dist/sequence.js +127 -0
- package/dist/sequence.js.map +1 -0
- package/dist/session.d.ts +1 -1
- package/dist/session.js +1 -1
- package/dist/skillScan.d.ts +3 -3
- package/dist/skillScan.d.ts.map +1 -1
- package/dist/skillScan.js +26 -4
- package/dist/skillScan.js.map +1 -1
- package/dist/sop.d.ts +5 -5
- package/dist/sop.js +2 -2
- package/dist/sourceProviders.d.ts +1 -8
- package/dist/sourceProviders.d.ts.map +1 -1
- package/dist/sourceProviders.js +2 -9
- package/dist/sourceProviders.js.map +1 -1
- package/dist/ssoGroupClearance.d.ts +18 -2
- package/dist/ssoGroupClearance.d.ts.map +1 -1
- package/dist/ssoGroupClearance.js +43 -4
- package/dist/ssoGroupClearance.js.map +1 -1
- package/dist/sync.d.ts +0 -1
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +0 -1
- package/dist/sync.js.map +1 -1
- package/dist/taskManagement.d.ts +0 -2
- package/dist/taskManagement.d.ts.map +1 -1
- package/dist/taskManagement.js +0 -2
- package/dist/taskManagement.js.map +1 -1
- package/dist/toolPoison.d.ts +33 -0
- package/dist/toolPoison.d.ts.map +1 -0
- package/dist/toolPoison.js +85 -0
- package/dist/toolPoison.js.map +1 -0
- package/dist/usage.d.ts +186 -0
- package/dist/usage.d.ts.map +1 -1
- package/dist/wasmBinary.d.ts +25 -0
- package/dist/wasmBinary.d.ts.map +1 -0
- package/dist/wasmBinary.js +111 -0
- package/dist/wasmBinary.js.map +1 -0
- package/dist/wasmFuel.d.ts +52 -0
- package/dist/wasmFuel.d.ts.map +1 -0
- package/dist/wasmFuel.js +320 -0
- package/dist/wasmFuel.js.map +1 -0
- package/dist/wasmMemoryCap.d.ts +21 -0
- package/dist/wasmMemoryCap.d.ts.map +1 -0
- package/dist/wasmMemoryCap.js +58 -0
- package/dist/wasmMemoryCap.js.map +1 -0
- package/dist/workspaceSettings.d.ts +58 -17
- package/dist/workspaceSettings.d.ts.map +1 -1
- package/dist/workspaceSettings.js +2 -1
- package/dist/workspaceSettings.js.map +1 -1
- package/package.json +2 -2
|
@@ -23,7 +23,10 @@
|
|
|
23
23
|
*
|
|
24
24
|
* Names and groups match exactly — no case folding, no patterns — because
|
|
25
25
|
* that is what the server has always done and a gate that matched more loosely
|
|
26
|
-
* would refuse calls the server allows.
|
|
26
|
+
* would refuse calls the server allows. The one widening is MCP's two names
|
|
27
|
+
* for one tool ({@link ssoGroupToolMatches}): an entry naming the tool as its
|
|
28
|
+
* server declares it (`run_query`) also matches the name a harness hook sees
|
|
29
|
+
* (`mcp__postgres__run_query`), at every gate.
|
|
27
30
|
*
|
|
28
31
|
* @module
|
|
29
32
|
*/
|
|
@@ -31,6 +34,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
31
34
|
exports.SSO_GROUP_RECORD_TAG = exports.SsoGroupPolicySchema = void 0;
|
|
32
35
|
exports.parseSsoGroupPolicy = parseSsoGroupPolicy;
|
|
33
36
|
exports.ssoGroupRuleId = ssoGroupRuleId;
|
|
37
|
+
exports.ssoGroupToolMatches = ssoGroupToolMatches;
|
|
34
38
|
exports.evaluateSsoGroupClearance = evaluateSsoGroupClearance;
|
|
35
39
|
exports.encodeSsoGroupRecord = encodeSsoGroupRecord;
|
|
36
40
|
exports.decodeSsoGroupRecord = decodeSsoGroupRecord;
|
|
@@ -79,17 +83,52 @@ function parseSsoGroupPolicy(value) {
|
|
|
79
83
|
function ssoGroupRuleId(kind, toolName) {
|
|
80
84
|
return `sso_group.${kind}.${toolName.replace(/[^A-Za-z0-9_.:-]/g, '_')}`;
|
|
81
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Whether a call that goes by `name` is the tool a policy entry names.
|
|
88
|
+
*
|
|
89
|
+
* Exactly, or — for an entry that is an MCP tool's own name, not starting
|
|
90
|
+
* with `mcp__` — as the name a harness hook gives that tool on any server:
|
|
91
|
+
* `mcp__<server>__<entry>`, the server part non-empty. The MCP proxy sees
|
|
92
|
+
* `run_query` where Claude Code's hook sees `mcp__postgres__run_query`, so
|
|
93
|
+
* without this an entry written one way held at one gate and not the other.
|
|
94
|
+
* An entry that already names the harness form (`mcp__postgres__run_query`)
|
|
95
|
+
* matches only that server's tool.
|
|
96
|
+
*/
|
|
97
|
+
function ssoGroupToolMatches(entry, name) {
|
|
98
|
+
if (name === entry)
|
|
99
|
+
return true;
|
|
100
|
+
if (entry.startsWith('mcp__') || !name.startsWith('mcp__'))
|
|
101
|
+
return false;
|
|
102
|
+
const suffix = `__${entry}`;
|
|
103
|
+
return name.length > 'mcp__'.length + suffix.length && name.endsWith(suffix);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The first entry of `list` a call matches: an exact match on any of its
|
|
107
|
+
* names first, then an MCP tool's own name matching a harness name.
|
|
108
|
+
*/
|
|
109
|
+
function matchingEntry(list, names) {
|
|
110
|
+
const exact = names.find((n) => list.includes(n));
|
|
111
|
+
if (exact !== undefined)
|
|
112
|
+
return exact;
|
|
113
|
+
for (const n of names) {
|
|
114
|
+
const entry = list.find((e) => ssoGroupToolMatches(e, n));
|
|
115
|
+
if (entry !== undefined)
|
|
116
|
+
return entry;
|
|
117
|
+
}
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
82
120
|
/**
|
|
83
121
|
* Decides one tool call. `toolNames` is every name the call goes by — the MCP
|
|
84
122
|
* proxy sees `create_issue` where a harness hook sees
|
|
85
|
-
* `mcp__github__create_issue` — and a policy entry naming any of them applies
|
|
123
|
+
* `mcp__github__create_issue` — and a policy entry naming any of them applies
|
|
124
|
+
* ({@link ssoGroupToolMatches}). The rule id and reason name the entry.
|
|
86
125
|
* `memberGroups` null means the caller does not know the member's groups.
|
|
87
126
|
*/
|
|
88
127
|
function evaluateSsoGroupClearance(policy, toolNames, memberGroups) {
|
|
89
128
|
if (!policy)
|
|
90
129
|
return { clearance: 'GRANTED', ruleId: null, reason: '' };
|
|
91
130
|
const names = typeof toolNames === 'string' ? [toolNames] : toolNames;
|
|
92
|
-
const obo =
|
|
131
|
+
const obo = matchingEntry(policy.requireOboFor, names);
|
|
93
132
|
if (obo !== undefined) {
|
|
94
133
|
return {
|
|
95
134
|
clearance: 'REQUIRES_OBO',
|
|
@@ -97,7 +136,7 @@ function evaluateSsoGroupClearance(policy, toolNames, memberGroups) {
|
|
|
97
136
|
reason: `SSO group policy: ${obo} is on-behalf-of only, and a tool-call gate has no OBO token to present`,
|
|
98
137
|
};
|
|
99
138
|
}
|
|
100
|
-
const risky =
|
|
139
|
+
const risky = matchingEntry(policy.highRiskTools, names);
|
|
101
140
|
if (risky === undefined)
|
|
102
141
|
return { clearance: 'GRANTED', ruleId: null, reason: '' };
|
|
103
142
|
if (memberGroups && policy.requiredGroups.some((g) => memberGroups.includes(g))) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssoGroupClearance.js","sourceRoot":"","sources":["../src/ssoGroupClearance.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"ssoGroupClearance.js","sourceRoot":"","sources":["../src/ssoGroupClearance.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;;;AA4CH,kDAUC;AAGD,wCAEC;AAaD,kDAKC;AAuBD,8DA+BC;AAsCD,oDAEC;AAGD,oDAgBC;AA5LD,6BAAuB;AAYvB,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AAC5F,CAAC;AAED,gFAAgF;AAChF,MAAM,kBAAkB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AACrD,MAAM,sBAAsB,GAAG,OAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;AAE/E;;;;;GAKG;AACU,QAAA,oBAAoB,GAAG,OAAC;KAClC,MAAM,CAAC;IACN,aAAa,EAAE,sBAAsB;IACrC,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AAE,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,UAAU,CAAC,EAAE,CAAA;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
|
package/dist/sync.d.ts
CHANGED
package/dist/sync.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAG/D,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAK7C,oDAAoD;AACpD,MAAM,WAAW,YAAY;IAC3B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAA;IACf,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAA;IACnB,0DAA0D;IAC1D,cAAc,EAAE,WAAW,EAAE,CAAA;IAC7B,6FAA6F;IAC7F,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,6DAA6D;AAC7D,MAAM,WAAW,iBAAiB;IAChC,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAA;IACnB,yEAAyE;IACzE,aAAa,EAAE,MAAM,CAAA;IACrB,oDAAoD;IACpD,IAAI,EAAE,YAAY,EAAE,CAAA;IACpB,sEAAsE;IACtE,QAAQ,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,sDAAsD;IACtD,YAAY,CAAC,EAAE,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,CAAC;CACJ,CAAC,CAAA"}
|
package/dist/taskManagement.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Task Management Adapter — Generic interface for external task/issue trackers.
|
|
3
3
|
*
|
|
4
|
-
* TD-022 item 3.9: TaskManagementAdapter interface
|
|
5
|
-
*
|
|
6
4
|
* Provides a unified abstraction over external task management tools
|
|
7
5
|
* (Jira, Linear, GitHub Issues, etc.) so the control plane can
|
|
8
6
|
* create/update tasks based on governance events.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskManagement.d.ts","sourceRoot":"","sources":["../src/taskManagement.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"taskManagement.d.ts","sourceRoot":"","sources":["../src/taskManagement.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,2CAA2C;AAC3C,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,CAAA;AAE/E,+CAA+C;AAC/C,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAA;AAEjE,iDAAiD;AACjD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,aAAa,GAAG,UAAU,GAAG,QAAQ,CAAA;AAEvE,gEAAgE;AAChE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,YAAY,CAAA;IACtB,+EAA+E;IAC/E,OAAO,EAAE,MAAM,CAAA;IACf,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAA;IACjB,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAA;IAClB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACnC;AAED,uCAAuC;AACvC,MAAM,WAAW,iBAAiB;IAChC,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,wCAAwC;IACxC,W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,YAAY,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAID;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACpC,sCAAsC;IACtC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAA;IAE/B;;;OAGG;IACH,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC,CAAA;IAElC;;;;OAIG;IACH,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAEjE;;;;OAIG;IACH,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAEjE;;;;OAIG;IACH,OAAO,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAA;IAE7D;;;;;OAKG;IACH,WAAW,CACT,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,UAAU,CAAC;QAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GAC5E,OAAO,CAAC,YAAY,EAAE,CAAC,CAAA;CAC3B"}
|
package/dist/taskManagement.js
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Task Management Adapter — Generic interface for external task/issue trackers.
|
|
4
4
|
*
|
|
5
|
-
* TD-022 item 3.9: TaskManagementAdapter interface
|
|
6
|
-
*
|
|
7
5
|
* Provides a unified abstraction over external task management tools
|
|
8
6
|
* (Jira, Linear, GitHub Issues, etc.) so the control plane can
|
|
9
7
|
* create/update tasks based on governance events.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskManagement.js","sourceRoot":"","sources":["../src/taskManagement.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"taskManagement.js","sourceRoot":"","sources":["../src/taskManagement.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* toolPoison.ts — Tool-description poisoning patterns.
|
|
3
|
+
*
|
|
4
|
+
* Direct TypeScript port of `packages/proxy/src/tool_poison.rs`'s `scan`
|
|
5
|
+
* function and its seven named patterns. This is a SEPARATE pattern set from
|
|
6
|
+
* the MCP proxy's `injection.ts`, on purpose: `tool_poison.rs`'s own module
|
|
7
|
+
* doc records that it tried reusing `injection::scan` for this and measured
|
|
8
|
+
* that its five patterns match ZERO of the tool-poisoning payloads — they are
|
|
9
|
+
* tuned for conversational jailbreak phrasing ("ignore previous
|
|
10
|
+
* instructions"), while a poisoned tool description reads like documentation,
|
|
11
|
+
* not a jailbreak.
|
|
12
|
+
*
|
|
13
|
+
* Two consumers, which is why it lives here: the MCP proxy's
|
|
14
|
+
* `tool_poisoning` detector (`packages/mcp-proxy/src/anomaly/detectors.ts`)
|
|
15
|
+
* and the tool-change risk score (`mcpToolRisk.ts`), which the control plane
|
|
16
|
+
* computes when a server's tool set changes.
|
|
17
|
+
*
|
|
18
|
+
* The Rust source gates each pattern behind a cheap substring pre-check
|
|
19
|
+
* (`GATES`) before running the regex. That optimization is not ported — it is
|
|
20
|
+
* a performance detail proven equivalent to the plain regex loop (the Rust
|
|
21
|
+
* module's own `gating_never_changes_a_verdict` test), and the volume of tool
|
|
22
|
+
* descriptions scanned here is orders of magnitude below the Rust proxy's
|
|
23
|
+
* request path. The pattern SOURCE TEXT below is unchanged from the Rust
|
|
24
|
+
* `PATTERNS` array.
|
|
25
|
+
*
|
|
26
|
+
@module
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* Pattern names matching this tool description, deduplicated, empty when it
|
|
30
|
+
* looks like ordinary prose (the overwhelmingly common case).
|
|
31
|
+
*/
|
|
32
|
+
export declare function scanToolDescription(description: string): string[];
|
|
33
|
+
//# sourceMappingURL=toolPoison.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolPoison.d.ts","sourceRoot":"","sources":["../src/toolPoison.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAkDH;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAOjE"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* toolPoison.ts — Tool-description poisoning patterns.
|
|
4
|
+
*
|
|
5
|
+
* Direct TypeScript port of `packages/proxy/src/tool_poison.rs`'s `scan`
|
|
6
|
+
* function and its seven named patterns. This is a SEPARATE pattern set from
|
|
7
|
+
* the MCP proxy's `injection.ts`, on purpose: `tool_poison.rs`'s own module
|
|
8
|
+
* doc records that it tried reusing `injection::scan` for this and measured
|
|
9
|
+
* that its five patterns match ZERO of the tool-poisoning payloads — they are
|
|
10
|
+
* tuned for conversational jailbreak phrasing ("ignore previous
|
|
11
|
+
* instructions"), while a poisoned tool description reads like documentation,
|
|
12
|
+
* not a jailbreak.
|
|
13
|
+
*
|
|
14
|
+
* Two consumers, which is why it lives here: the MCP proxy's
|
|
15
|
+
* `tool_poisoning` detector (`packages/mcp-proxy/src/anomaly/detectors.ts`)
|
|
16
|
+
* and the tool-change risk score (`mcpToolRisk.ts`), which the control plane
|
|
17
|
+
* computes when a server's tool set changes.
|
|
18
|
+
*
|
|
19
|
+
* The Rust source gates each pattern behind a cheap substring pre-check
|
|
20
|
+
* (`GATES`) before running the regex. That optimization is not ported — it is
|
|
21
|
+
* a performance detail proven equivalent to the plain regex loop (the Rust
|
|
22
|
+
* module's own `gating_never_changes_a_verdict` test), and the volume of tool
|
|
23
|
+
* descriptions scanned here is orders of magnitude below the Rust proxy's
|
|
24
|
+
* request path. The pattern SOURCE TEXT below is unchanged from the Rust
|
|
25
|
+
* `PATTERNS` array.
|
|
26
|
+
*
|
|
27
|
+
@module
|
|
28
|
+
*/
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.scanToolDescription = scanToolDescription;
|
|
31
|
+
/**
|
|
32
|
+
* Ported verbatim from `tool_poison.rs`'s `PATTERNS` const. All bounded
|
|
33
|
+
* repetitions here are small fixed-width gaps (`{0,40}`, `{0,60}`, `{0,80}`)
|
|
34
|
+
* over a handful of alternations — the same "no wide bounded repetition, no
|
|
35
|
+
* RegexSet performance regression" shape the MCP proxy's `injection.ts` documents, not the
|
|
36
|
+
* `dlp.rs` shape that regressed.
|
|
37
|
+
*/
|
|
38
|
+
const PATTERNS = [
|
|
39
|
+
{
|
|
40
|
+
name: 'hidden-instruction-block',
|
|
41
|
+
regex: /<\s*(important|secret|system|hidden|instructions?)\s*>/i,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'conceal-from-user',
|
|
45
|
+
regex: /\bdo\s+not\s+(mention|tell|inform|reveal|disclose|show)\b[^.!?]{0,40}\buser\b|\bwithout\s+(informing|telling|notifying|alerting)\s+the\s+user\b/i,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'sidechannel-exfil',
|
|
49
|
+
regex: /\b(pass|send|include|append|forward|provide)\b[^.!?]{0,60}\b(content|value|text)s?\s+of\b[^.!?]{0,40}(~\/|\.env|\.ssh|id_rsa|credential|secret|token|api[_ ]?key)/i,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'read-sensitive-path',
|
|
53
|
+
// Rust's own comment: no `\b` before the alternation, because a word
|
|
54
|
+
// boundary cannot exist before a literal `.` — `\b\.env` matches
|
|
55
|
+
// nothing. Preserved exactly, including that absence.
|
|
56
|
+
regex: /\b(read|open|cat|load|access)\b[^.!?]{0,30}(~\/\.\w+|\.ssh\/|id_rsa|\.env\b|\.aws\/|mcp\.json|\/etc\/passwd)/i,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'cross-tool-shadowing',
|
|
60
|
+
regex: /\buse\s+this\s+tool\s+instead\s+of\b|\bdo\s+not\s+use\s+the\s+\w+\s+tool\b|\bthis\s+tool\s+supersedes\b/i,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'agent-directed-precondition',
|
|
64
|
+
regex: /\bbefore\s+(using|calling|invoking)\s+(this|the)\s+tool\b[^.!?]{0,80}\b(you\s+must|first\s+read|first\s+call)\b/i,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'tool-scoped-instruction-override',
|
|
68
|
+
regex: /\b(ignore|disregard|override)\b[^.!?]{0,40}\b(other\s+tools?|previous\s+tools?|system\s+prompt)\b/i,
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
/**
|
|
72
|
+
* Pattern names matching this tool description, deduplicated, empty when it
|
|
73
|
+
* looks like ordinary prose (the overwhelmingly common case).
|
|
74
|
+
*/
|
|
75
|
+
function scanToolDescription(description) {
|
|
76
|
+
if (!description)
|
|
77
|
+
return [];
|
|
78
|
+
const found = [];
|
|
79
|
+
for (const { name, regex } of PATTERNS) {
|
|
80
|
+
if (regex.test(description))
|
|
81
|
+
found.push(name);
|
|
82
|
+
}
|
|
83
|
+
return found;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=toolPoison.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolPoison.js","sourceRoot":"","sources":["../src/toolPoison.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;;AAsDH,kDAOC;AAtDD;;;;;;GAMG;AACH,MAAM,QAAQ,GAAiC;IAC7C;QACE,IAAI,EAAE,0BAA0B;QAChC,KAAK,EAAE,yDAAyD;KACjE;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,KAAK,EACH,kJAAkJ;KACrJ;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,KAAK,EACH,oKAAoK;KACvK;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,qEAAqE;QACrE,iEAAiE;QACjE,sDAAsD;QACtD,KAAK,EAAE,+GAA+G;KACvH;IACD;QACE,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE,0GAA0G;KAClH;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,KAAK,EAAE,kHAAkH;KAC1H;IACD;QACE,IAAI,EAAE,kCAAkC;QACxC,KAAK,EAAE,oGAAoG;KAC5G;CACF,CAAA;AAED;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,WAAmB;IACrD,IAAI,CAAC,WAAW;QAAE,OAAO,EAAE,CAAA;IAC3B,MAAM,KAAK,GAAa,EAAE,CAAA;IAC1B,KAAK,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,QAAQ,EAAE,CAAC;QACvC,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC/C,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
|
package/dist/usage.d.ts
CHANGED
|
@@ -54,4 +54,190 @@ export interface VirtualKeyBreakdown {
|
|
|
54
54
|
totalOutputTokens: number;
|
|
55
55
|
traceCount: number;
|
|
56
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* One developer's usage for a period (`GET /api/v1/usage/members`).
|
|
59
|
+
*
|
|
60
|
+
* A call is attributed to the workspace member who owns the virtual key that
|
|
61
|
+
* authenticated it. `memberId: null` is the unattributed bucket: calls with no
|
|
62
|
+
* virtual-key auth context, and calls whose key prefix no single member owns.
|
|
63
|
+
*/
|
|
64
|
+
export interface MemberUsage {
|
|
65
|
+
memberId: string | null;
|
|
66
|
+
/** Null for the unattributed bucket, and for a member since removed. */
|
|
67
|
+
displayName: string | null;
|
|
68
|
+
email: string | null;
|
|
69
|
+
totalCostUsd: number;
|
|
70
|
+
totalRawCostUsd: number;
|
|
71
|
+
totalInputTokens: number;
|
|
72
|
+
totalOutputTokens: number;
|
|
73
|
+
traceCount: number;
|
|
74
|
+
/** Distinct requested models, sorted. */
|
|
75
|
+
models: string[];
|
|
76
|
+
/** Distinct UTC calendar days with at least one call. */
|
|
77
|
+
activeDays: number;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* `GET /api/v1/usage/members`. `scope: 'self'` when the caller may only see
|
|
81
|
+
* their own row (DEVELOPER and VIEWER); `'workspace'` for OWNER, ADMIN and EM.
|
|
82
|
+
*/
|
|
83
|
+
export interface MemberUsageResponse {
|
|
84
|
+
scope: 'workspace' | 'self';
|
|
85
|
+
members: MemberUsage[];
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* One SCIM group's usage for a period (`GET /api/v1/usage/teams`): the sum over
|
|
89
|
+
* every member in the group, directly or through nested groups. A member in
|
|
90
|
+
* several groups counts in each, so team totals can add up to more than the
|
|
91
|
+
* workspace total.
|
|
92
|
+
*/
|
|
93
|
+
export interface TeamUsage {
|
|
94
|
+
groupId: string;
|
|
95
|
+
displayName: string;
|
|
96
|
+
/** Members in the group, transitively. */
|
|
97
|
+
memberCount: number;
|
|
98
|
+
/** Members of the group with at least one attributed call in the period. */
|
|
99
|
+
activeMembers: number;
|
|
100
|
+
totalCostUsd: number;
|
|
101
|
+
totalRawCostUsd: number;
|
|
102
|
+
totalInputTokens: number;
|
|
103
|
+
totalOutputTokens: number;
|
|
104
|
+
traceCount: number;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* `GET /api/v1/usage/teams`. `scimGroups: false` means the workspace has no
|
|
108
|
+
* SCIM groups, so there are no teams to roll up to; per-member usage is the
|
|
109
|
+
* finest grouping available.
|
|
110
|
+
*/
|
|
111
|
+
export interface TeamUsageResponse {
|
|
112
|
+
scimGroups: boolean;
|
|
113
|
+
teams: TeamUsage[];
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Usage per repository and branch (`GET /api/v1/usage/branches`), from the git
|
|
117
|
+
* context copied onto each trace when it was recorded. `repo` and `branch` are
|
|
118
|
+
* both null on the row for calls made with no git context.
|
|
119
|
+
*/
|
|
120
|
+
export interface BranchUsage {
|
|
121
|
+
/** Normalised `origin` remote, host/path. Null when the directory had no `origin`. */
|
|
122
|
+
repo: string | null;
|
|
123
|
+
branch: string | null;
|
|
124
|
+
/** Distinct HEAD commits the calls were made at. */
|
|
125
|
+
commitCount: number;
|
|
126
|
+
totalCostUsd: number;
|
|
127
|
+
totalRawCostUsd: number;
|
|
128
|
+
totalInputTokens: number;
|
|
129
|
+
totalOutputTokens: number;
|
|
130
|
+
traceCount: number;
|
|
131
|
+
/** Latest call, ISO 8601. */
|
|
132
|
+
lastCallAt: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Usage per HEAD commit (`GET /api/v1/usage/commits`): the calls made while
|
|
136
|
+
* that commit was checked out, which is the work that led to the next commit,
|
|
137
|
+
* not the work that produced this one.
|
|
138
|
+
*/
|
|
139
|
+
export interface CommitUsage {
|
|
140
|
+
repo: string | null;
|
|
141
|
+
branch: string | null;
|
|
142
|
+
commit: string | null;
|
|
143
|
+
totalCostUsd: number;
|
|
144
|
+
totalRawCostUsd: number;
|
|
145
|
+
totalInputTokens: number;
|
|
146
|
+
totalOutputTokens: number;
|
|
147
|
+
traceCount: number;
|
|
148
|
+
/** First and latest call at this commit, ISO 8601. */
|
|
149
|
+
firstCallAt: string;
|
|
150
|
+
lastCallAt: string;
|
|
151
|
+
}
|
|
152
|
+
/** `scope` as on {@link MemberUsageResponse}: `'self'` counts only the caller's own calls. */
|
|
153
|
+
export interface BranchUsageResponse {
|
|
154
|
+
scope: 'workspace' | 'self';
|
|
155
|
+
branches: BranchUsage[];
|
|
156
|
+
}
|
|
157
|
+
export interface CommitUsageResponse {
|
|
158
|
+
scope: 'workspace' | 'self';
|
|
159
|
+
commits: CommitUsage[];
|
|
160
|
+
}
|
|
161
|
+
export type PullRequestState = 'open' | 'closed' | 'merged';
|
|
162
|
+
/**
|
|
163
|
+
* One pull request's usage for a period (`GET /api/v1/usage/pull-requests`):
|
|
164
|
+
* the calls made on its head branch, in its repository, between the end of
|
|
165
|
+
* the previous pull request from that branch (or the branch's first call) and
|
|
166
|
+
* this one's merge or close. A call belongs to one pull request at most.
|
|
167
|
+
*/
|
|
168
|
+
export interface PullRequestUsage {
|
|
169
|
+
/** Normalised host/owner/name, lower-cased. */
|
|
170
|
+
repo: string;
|
|
171
|
+
number: number;
|
|
172
|
+
title: string;
|
|
173
|
+
/** GitHub login of whoever opened it. */
|
|
174
|
+
author: string | null;
|
|
175
|
+
state: PullRequestState;
|
|
176
|
+
headBranch: string;
|
|
177
|
+
baseBranch: string | null;
|
|
178
|
+
/** The pull request on GitHub. */
|
|
179
|
+
url: string;
|
|
180
|
+
/** ISO 8601. */
|
|
181
|
+
openedAt: string;
|
|
182
|
+
mergedAt: string | null;
|
|
183
|
+
closedAt: string | null;
|
|
184
|
+
totalCostUsd: number;
|
|
185
|
+
totalRawCostUsd: number;
|
|
186
|
+
totalInputTokens: number;
|
|
187
|
+
totalOutputTokens: number;
|
|
188
|
+
traceCount: number;
|
|
189
|
+
/** Members with an attributed call on it in the period. */
|
|
190
|
+
memberCount: number;
|
|
191
|
+
/** First and latest call in the period, ISO 8601. */
|
|
192
|
+
firstCallAt: string;
|
|
193
|
+
lastCallAt: string;
|
|
194
|
+
}
|
|
195
|
+
/** Where pull requests come from, and whether that is working, for the empty states. */
|
|
196
|
+
export interface PullRequestSources {
|
|
197
|
+
/** The workspace has a GitHub source connector whose token lists pull requests. */
|
|
198
|
+
connector: boolean;
|
|
199
|
+
/** The pull-request webhook is set up. */
|
|
200
|
+
webhook: boolean;
|
|
201
|
+
/** The GitHub host the connector's token is used against, e.g. `github.com`. */
|
|
202
|
+
apiHost: string;
|
|
203
|
+
/** Repositories whose pull requests the connector's token was refused (missing scope or access). */
|
|
204
|
+
noAccessRepos: string[];
|
|
205
|
+
/** Pull requests mapped in the workspace, any period. */
|
|
206
|
+
mappedPullRequests: number;
|
|
207
|
+
/** Last time a branch was looked up through the connector, ISO 8601. */
|
|
208
|
+
lastCheckedAt: string | null;
|
|
209
|
+
}
|
|
210
|
+
/** `scope` as on {@link MemberUsageResponse}: `'self'` counts only the caller's own calls. */
|
|
211
|
+
export interface PullRequestUsageResponse {
|
|
212
|
+
scope: 'workspace' | 'self';
|
|
213
|
+
github: PullRequestSources;
|
|
214
|
+
pullRequests: PullRequestUsage[];
|
|
215
|
+
}
|
|
216
|
+
/** `POST /api/v1/usage/pull-requests/refresh`. */
|
|
217
|
+
export interface PullRequestRefreshResult {
|
|
218
|
+
/** Branches looked up. */
|
|
219
|
+
checked: number;
|
|
220
|
+
/** Answered 304: the ETag matched and nothing changed. */
|
|
221
|
+
notModified: number;
|
|
222
|
+
/** Pull requests written or updated. */
|
|
223
|
+
pullRequests: number;
|
|
224
|
+
/** Branches the token could not list. */
|
|
225
|
+
noAccess: number;
|
|
226
|
+
/** True when GitHub's rate limit stopped the run early. */
|
|
227
|
+
rateLimited: boolean;
|
|
228
|
+
}
|
|
229
|
+
/** `GET /api/v1/integrations/github/webhook`. The secret is never returned here. */
|
|
230
|
+
export interface GitHubWebhookInfo {
|
|
231
|
+
configured: boolean;
|
|
232
|
+
/** Payload URL to paste into GitHub. Null until a secret has been made. */
|
|
233
|
+
url: string | null;
|
|
234
|
+
createdAt: string | null;
|
|
235
|
+
secretRotatedAt: string | null;
|
|
236
|
+
lastDeliveryAt: string | null;
|
|
237
|
+
}
|
|
238
|
+
/** `POST /api/v1/integrations/github/webhook/secret`: the new secret, shown once. */
|
|
239
|
+
export interface GitHubWebhookSecret {
|
|
240
|
+
url: string;
|
|
241
|
+
secret: string;
|
|
242
|
+
}
|
|
57
243
|
//# sourceMappingURL=usage.d.ts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;IAC3D,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,oFAAoF;AACpF,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,OAAO,CAAA;IACnB,2EAA2E;IAC3E,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED,qFAAqF;AACrF,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The few pieces of the WebAssembly binary format the load-time rewrites
|
|
3
|
+
* (`wasmMemoryCap.ts`, `wasmFuel.ts`) share: LEB128 integers, the section list, and
|
|
4
|
+
* reassembly. Not a general decoder; each rewrite parses only what it changes.
|
|
5
|
+
*/
|
|
6
|
+
export interface Section {
|
|
7
|
+
id: number;
|
|
8
|
+
payload: Uint8Array<ArrayBuffer>;
|
|
9
|
+
}
|
|
10
|
+
export declare function malformed(what: string): Error;
|
|
11
|
+
export declare function readU32(bytes: Uint8Array, at: number): {
|
|
12
|
+
value: number;
|
|
13
|
+
next: number;
|
|
14
|
+
};
|
|
15
|
+
/** Skip any LEB128 integer, signed or unsigned, up to 64 bits. */
|
|
16
|
+
export declare function skipLeb(bytes: Uint8Array, at: number): number;
|
|
17
|
+
export declare function writeU32(value: number): number[];
|
|
18
|
+
/** Signed LEB128, for `i32.const` immediates. */
|
|
19
|
+
export declare function writeS32(value: number): number[];
|
|
20
|
+
export declare function readSections(bytes: Uint8Array<ArrayBuffer>): Section[];
|
|
21
|
+
/** Replace the section with `id`, or insert it where the spec's order puts it. */
|
|
22
|
+
export declare function putSection(sections: Section[], id: number, payload: Uint8Array<ArrayBuffer>): void;
|
|
23
|
+
export declare function assembleModule(header: Uint8Array, sections: Section[]): Uint8Array<ArrayBuffer>;
|
|
24
|
+
export declare function concat(parts: Uint8Array[]): Uint8Array<ArrayBuffer>;
|
|
25
|
+
//# sourceMappingURL=wasmBinary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasmBinary.d.ts","sourceRoot":"","sources":["../src/wasmBinary.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,CAAA;CACjC;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAE7C;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAUtF;AAED,kEAAkE;AAClE,wBAAgB,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAK7D;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAShD;AAED,iDAAiD;AACjD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAShD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,GAAG,OAAO,EAAE,CAYtE;AAKD,kFAAkF;AAClF,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAYlG;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAM/F;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAQnE"}
|