@intutic/anomaly-taxonomy 1.8.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/LICENSE +21 -0
- package/README.md +41 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -0
- package/package.json +26 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Intutic Community
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# @intutic/anomaly-taxonomy
|
|
2
|
+
|
|
3
|
+
The twelve runtime anomaly categories Intutic classifies against, and the
|
|
4
|
+
severity each carries. Types and constants only — no detection logic, no
|
|
5
|
+
thresholds, no probes.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @intutic/anomaly-taxonomy
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import {
|
|
13
|
+
AnomalyType,
|
|
14
|
+
ANOMALY_SEVERITY_MAP,
|
|
15
|
+
isAnomalyType,
|
|
16
|
+
} from '@intutic/anomaly-taxonomy'
|
|
17
|
+
|
|
18
|
+
ANOMALY_SEVERITY_MAP[AnomalyType.DATA_EXFILTRATION] // 'CRITICAL'
|
|
19
|
+
isAnomalyType(notification.category) // narrow an untrusted string
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Why this is a package
|
|
23
|
+
|
|
24
|
+
The taxonomy is declared in two languages. The Rust proxy raises these
|
|
25
|
+
categories inline on the request path and cannot call into TypeScript, so it
|
|
26
|
+
keeps its own copy; the control plane classifies against them asynchronously in
|
|
27
|
+
TypeScript.
|
|
28
|
+
|
|
29
|
+
Two hand-maintained lists drift, and drift here is silent — a renamed category
|
|
30
|
+
simply stops being classified downstream, with no error raised anywhere. This
|
|
31
|
+
package is the source of truth, and the proxy's test suite parses it and fails
|
|
32
|
+
the build on any divergence.
|
|
33
|
+
|
|
34
|
+
## What it deliberately does not contain
|
|
35
|
+
|
|
36
|
+
Detection. Deciding *whether* a request is anomalous involves thresholds,
|
|
37
|
+
sequence analysis, baselines and probes; sharing the vocabulary should not
|
|
38
|
+
require sharing any of that. Keeping them apart is what lets the vocabulary be
|
|
39
|
+
used by anything that needs to read an Intutic verdict.
|
|
40
|
+
|
|
41
|
+
Apache-2.0.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Intutic runtime anomaly taxonomy.
|
|
3
|
+
*
|
|
4
|
+
* Twelve categories describing how an agent run can go wrong, with the
|
|
5
|
+
* severity each carries. This is the shared vocabulary: the Rust proxy raises
|
|
6
|
+
* these on the hot path, the control plane classifies against them
|
|
7
|
+
* asynchronously, and governance notifications carry the value in `category`.
|
|
8
|
+
*
|
|
9
|
+
* It is a package rather than a constant in one service because it is declared
|
|
10
|
+
* in two languages. The proxy has its own copy in Rust — the hot path cannot
|
|
11
|
+
* call into TypeScript — and two hand-maintained lists drift. Drift here is
|
|
12
|
+
* silent: a renamed category simply stops being classified downstream, with no
|
|
13
|
+
* error raised anywhere. The proxy therefore parses this file at test time and
|
|
14
|
+
* fails its build on any divergence.
|
|
15
|
+
*
|
|
16
|
+
* Deliberately **types and constants only**. No detection logic, no
|
|
17
|
+
* thresholds, no probes. Detection is a separate concern with a separate
|
|
18
|
+
* licence, and mixing them here would make the vocabulary impossible to share.
|
|
19
|
+
*
|
|
20
|
+
* @packageDocumentation
|
|
21
|
+
*/
|
|
22
|
+
/** The twelve runtime anomaly categories. */
|
|
23
|
+
export declare const AnomalyType: {
|
|
24
|
+
/** Tool use inconsistent with any plausible task. */
|
|
25
|
+
readonly TOOL_ABUSE: "TOOL_ABUSE";
|
|
26
|
+
/** Spend without progress — context growth, repetition, no advancement. */
|
|
27
|
+
readonly TOKEN_WASTE: "TOKEN_WASTE";
|
|
28
|
+
/** A cycle: a spin, an alternation, or runaway recursion. */
|
|
29
|
+
readonly LOOP_DETECTED: "LOOP_DETECTED";
|
|
30
|
+
/** A tool or harness the policy in force does not permit. */
|
|
31
|
+
readonly UNAUTHORIZED_TOOL: "UNAUTHORIZED_TOOL";
|
|
32
|
+
/** Secrets or personal data leaving the boundary. */
|
|
33
|
+
readonly DATA_EXFILTRATION: "DATA_EXFILTRATION";
|
|
34
|
+
/** Text attempting to override the instructions the agent operates under. */
|
|
35
|
+
readonly PROMPT_INJECTION: "PROMPT_INJECTION";
|
|
36
|
+
/** Work proceeding on a premise that no longer holds. */
|
|
37
|
+
readonly HALLUCINATION: "HALLUCINATION";
|
|
38
|
+
/** Action outside the bounds the task was scoped to. */
|
|
39
|
+
readonly SCOPE_VIOLATION: "SCOPE_VIOLATION";
|
|
40
|
+
/** A session past its spending ceiling. */
|
|
41
|
+
readonly BUDGET_BREACH: "BUDGET_BREACH";
|
|
42
|
+
/** A fan-out costing far more than any single node was budgeted. */
|
|
43
|
+
readonly SPAWN_BUDGET_BREACH: "SPAWN_BUDGET_BREACH";
|
|
44
|
+
/** A workflow past the ceiling it was started with. */
|
|
45
|
+
readonly WORKFLOW_BUDGET_BREACH: "WORKFLOW_BUDGET_BREACH";
|
|
46
|
+
/** A run no longer pursuing the goal it was given. */
|
|
47
|
+
readonly WORKFLOW_GOAL_DRIFT: "WORKFLOW_GOAL_DRIFT";
|
|
48
|
+
};
|
|
49
|
+
/** Union of every anomaly category. */
|
|
50
|
+
export type AnomalyType = (typeof AnomalyType)[keyof typeof AnomalyType];
|
|
51
|
+
/** How urgently a category needs attention. */
|
|
52
|
+
export type AnomalySeverity = 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | 'INFORMATIONAL';
|
|
53
|
+
/**
|
|
54
|
+
* Severity per category.
|
|
55
|
+
*
|
|
56
|
+
* `CRITICAL` is reserved for categories where the damage is done the moment
|
|
57
|
+
* the request succeeds — data leaving the boundary, or the agent's
|
|
58
|
+
* instructions being replaced. Everything else is recoverable by stopping.
|
|
59
|
+
*/
|
|
60
|
+
export declare const ANOMALY_SEVERITY_MAP: Record<AnomalyType, AnomalySeverity>;
|
|
61
|
+
/** Every category, for exhaustive iteration. */
|
|
62
|
+
export declare const ALL_ANOMALY_TYPES: AnomalyType[];
|
|
63
|
+
/** Whether an arbitrary string is a known category. */
|
|
64
|
+
export declare function isAnomalyType(value: string): value is AnomalyType;
|
|
65
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,6CAA6C;AAC7C,eAAO,MAAM,WAAW;IACtB,qDAAqD;;IAErD,2EAA2E;;IAE3E,6DAA6D;;IAE7D,6DAA6D;;IAE7D,qDAAqD;;IAErD,6EAA6E;;IAE7E,yDAAyD;;IAEzD,wDAAwD;;IAExD,2CAA2C;;IAE3C,oEAAoE;;IAEpE,uDAAuD;;IAEvD,sDAAsD;;CAE9C,CAAA;AAEV,uCAAuC;AACvC,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAA;AAExE,+CAA+C;AAC/C,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,MAAM,GACN,QAAQ,GACR,KAAK,GACL,eAAe,CAAA;AAEnB;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,WAAW,EAAE,eAAe,CAa5D,CAAA;AAEV,gDAAgD;AAChD,eAAO,MAAM,iBAAiB,EAAiC,WAAW,EAAE,CAAA;AAE5E,uDAAuD;AACvD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAEjE"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The Intutic runtime anomaly taxonomy.
|
|
4
|
+
*
|
|
5
|
+
* Twelve categories describing how an agent run can go wrong, with the
|
|
6
|
+
* severity each carries. This is the shared vocabulary: the Rust proxy raises
|
|
7
|
+
* these on the hot path, the control plane classifies against them
|
|
8
|
+
* asynchronously, and governance notifications carry the value in `category`.
|
|
9
|
+
*
|
|
10
|
+
* It is a package rather than a constant in one service because it is declared
|
|
11
|
+
* in two languages. The proxy has its own copy in Rust — the hot path cannot
|
|
12
|
+
* call into TypeScript — and two hand-maintained lists drift. Drift here is
|
|
13
|
+
* silent: a renamed category simply stops being classified downstream, with no
|
|
14
|
+
* error raised anywhere. The proxy therefore parses this file at test time and
|
|
15
|
+
* fails its build on any divergence.
|
|
16
|
+
*
|
|
17
|
+
* Deliberately **types and constants only**. No detection logic, no
|
|
18
|
+
* thresholds, no probes. Detection is a separate concern with a separate
|
|
19
|
+
* licence, and mixing them here would make the vocabulary impossible to share.
|
|
20
|
+
*
|
|
21
|
+
* @packageDocumentation
|
|
22
|
+
*/
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.ALL_ANOMALY_TYPES = exports.ANOMALY_SEVERITY_MAP = exports.AnomalyType = void 0;
|
|
25
|
+
exports.isAnomalyType = isAnomalyType;
|
|
26
|
+
/** The twelve runtime anomaly categories. */
|
|
27
|
+
exports.AnomalyType = {
|
|
28
|
+
/** Tool use inconsistent with any plausible task. */
|
|
29
|
+
TOOL_ABUSE: 'TOOL_ABUSE',
|
|
30
|
+
/** Spend without progress — context growth, repetition, no advancement. */
|
|
31
|
+
TOKEN_WASTE: 'TOKEN_WASTE',
|
|
32
|
+
/** A cycle: a spin, an alternation, or runaway recursion. */
|
|
33
|
+
LOOP_DETECTED: 'LOOP_DETECTED',
|
|
34
|
+
/** A tool or harness the policy in force does not permit. */
|
|
35
|
+
UNAUTHORIZED_TOOL: 'UNAUTHORIZED_TOOL',
|
|
36
|
+
/** Secrets or personal data leaving the boundary. */
|
|
37
|
+
DATA_EXFILTRATION: 'DATA_EXFILTRATION',
|
|
38
|
+
/** Text attempting to override the instructions the agent operates under. */
|
|
39
|
+
PROMPT_INJECTION: 'PROMPT_INJECTION',
|
|
40
|
+
/** Work proceeding on a premise that no longer holds. */
|
|
41
|
+
HALLUCINATION: 'HALLUCINATION',
|
|
42
|
+
/** Action outside the bounds the task was scoped to. */
|
|
43
|
+
SCOPE_VIOLATION: 'SCOPE_VIOLATION',
|
|
44
|
+
/** A session past its spending ceiling. */
|
|
45
|
+
BUDGET_BREACH: 'BUDGET_BREACH',
|
|
46
|
+
/** A fan-out costing far more than any single node was budgeted. */
|
|
47
|
+
SPAWN_BUDGET_BREACH: 'SPAWN_BUDGET_BREACH',
|
|
48
|
+
/** A workflow past the ceiling it was started with. */
|
|
49
|
+
WORKFLOW_BUDGET_BREACH: 'WORKFLOW_BUDGET_BREACH',
|
|
50
|
+
/** A run no longer pursuing the goal it was given. */
|
|
51
|
+
WORKFLOW_GOAL_DRIFT: 'WORKFLOW_GOAL_DRIFT',
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Severity per category.
|
|
55
|
+
*
|
|
56
|
+
* `CRITICAL` is reserved for categories where the damage is done the moment
|
|
57
|
+
* the request succeeds — data leaving the boundary, or the agent's
|
|
58
|
+
* instructions being replaced. Everything else is recoverable by stopping.
|
|
59
|
+
*/
|
|
60
|
+
exports.ANOMALY_SEVERITY_MAP = {
|
|
61
|
+
TOOL_ABUSE: 'HIGH',
|
|
62
|
+
TOKEN_WASTE: 'MEDIUM',
|
|
63
|
+
LOOP_DETECTED: 'HIGH',
|
|
64
|
+
UNAUTHORIZED_TOOL: 'HIGH',
|
|
65
|
+
DATA_EXFILTRATION: 'CRITICAL',
|
|
66
|
+
PROMPT_INJECTION: 'CRITICAL',
|
|
67
|
+
HALLUCINATION: 'HIGH',
|
|
68
|
+
SCOPE_VIOLATION: 'MEDIUM',
|
|
69
|
+
BUDGET_BREACH: 'HIGH',
|
|
70
|
+
SPAWN_BUDGET_BREACH: 'HIGH',
|
|
71
|
+
WORKFLOW_BUDGET_BREACH: 'HIGH',
|
|
72
|
+
WORKFLOW_GOAL_DRIFT: 'MEDIUM',
|
|
73
|
+
};
|
|
74
|
+
/** Every category, for exhaustive iteration. */
|
|
75
|
+
exports.ALL_ANOMALY_TYPES = Object.values(exports.AnomalyType);
|
|
76
|
+
/** Whether an arbitrary string is a known category. */
|
|
77
|
+
function isAnomalyType(value) {
|
|
78
|
+
return exports.ALL_ANOMALY_TYPES.includes(value);
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","s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ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@intutic/anomaly-taxonomy",
|
|
3
|
+
"version": "1.8.0",
|
|
4
|
+
"description": "The Intutic runtime anomaly taxonomy — category enum and severity map. Type-only, zero dependencies.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/intutic/intutic",
|
|
9
|
+
"directory": "packages/anomaly-taxonomy"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"./dist"
|
|
18
|
+
],
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"typescript": "^5.6.0"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc",
|
|
24
|
+
"typecheck": "tsc --noEmit"
|
|
25
|
+
}
|
|
26
|
+
}
|