@huggingface/tasks 0.21.5 → 0.21.6

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.
@@ -0,0 +1,196 @@
1
+ /**
2
+ * Registry of AI coding agents / harnesses known to use the Hugging Face Hub.
3
+ *
4
+ * To add your harness, append an entry below keyed by its `id` (the name used
5
+ * when reporting Hub activity), and list the environment variable(s) that
6
+ * identify it.
7
+ */
8
+ export interface AgentHarness {
9
+ /**
10
+ * Human-readable name of the harness, e.g. displayed in a leaderboard.
11
+ */
12
+ prettyLabel: string;
13
+ /**
14
+ * URL to the harness's code repository (usually on GitHub).
15
+ */
16
+ repoUrl?: string;
17
+ /**
18
+ * URL to the harness's documentation or website.
19
+ */
20
+ docsUrl?: string;
21
+ /**
22
+ * Short description of the harness.
23
+ */
24
+ description?: string;
25
+ /**
26
+ * Environment variable(s) that identify this harness, mapped to the value
27
+ * pattern they must match. Detection matches if ANY entry matches.
28
+ *
29
+ * The value pattern is one of:
30
+ * - `"*"`: the variable is set to any (non-empty) value
31
+ * - `"<value>"`: the variable equals this exact value
32
+ * - `"<prefix>*"`: the variable value starts with `<prefix>` (fuzzy match, resolved client-side)
33
+ *
34
+ * If not provided, the harness is detected through the standard AI_AGENT / AGENT variables only.
35
+ */
36
+ envVars?: Record<string, string>;
37
+ }
38
+ /**
39
+ * Standard environment variables that any tool can set to identify itself.
40
+ * When one of these is set, its value is used directly as the agent `id`
41
+ * (matched against the keys of `AGENT_HARNESSES`); unrecognized values are
42
+ * reported as `"unknown"`.
43
+ */
44
+ export declare const STANDARD_AGENT_ENV_VARS: readonly ["AI_AGENT", "AGENT"];
45
+ /**
46
+ * Add your new agent harness here.
47
+ *
48
+ * /!\ IMPORTANT
49
+ *
50
+ * Insertion order matters for detection priority: harnesses are checked from
51
+ * top to bottom and the first match wins. In particular, `cowork` must stay
52
+ * before `claude-code` so the more specific signal takes priority when both
53
+ * `CLAUDE_CODE` and `CLAUDE_CODE_IS_COWORK` are set.
54
+ */
55
+ export declare const AGENT_HARNESSES: {
56
+ antigravity: {
57
+ prettyLabel: string;
58
+ docsUrl: string;
59
+ description: string;
60
+ envVars: {
61
+ ANTIGRAVITY_AGENT: string;
62
+ };
63
+ };
64
+ "augment-cli": {
65
+ prettyLabel: string;
66
+ repoUrl: string;
67
+ docsUrl: string;
68
+ description: string;
69
+ envVars: {
70
+ AUGMENT_AGENT: string;
71
+ };
72
+ };
73
+ cline: {
74
+ prettyLabel: string;
75
+ repoUrl: string;
76
+ docsUrl: string;
77
+ description: string;
78
+ envVars: {
79
+ CLINE_ACTIVE: string;
80
+ };
81
+ };
82
+ cowork: {
83
+ prettyLabel: string;
84
+ docsUrl: string;
85
+ description: string;
86
+ envVars: {
87
+ CLAUDE_CODE_IS_COWORK: string;
88
+ };
89
+ };
90
+ "claude-code": {
91
+ prettyLabel: string;
92
+ repoUrl: string;
93
+ docsUrl: string;
94
+ description: string;
95
+ envVars: {
96
+ CLAUDECODE: string;
97
+ CLAUDE_CODE: string;
98
+ };
99
+ };
100
+ codex: {
101
+ prettyLabel: string;
102
+ repoUrl: string;
103
+ docsUrl: string;
104
+ description: string;
105
+ envVars: {
106
+ CODEX_SANDBOX: string;
107
+ CODEX_CI: string;
108
+ CODEX_THREAD_ID: string;
109
+ };
110
+ };
111
+ "cursor-cli": {
112
+ prettyLabel: string;
113
+ docsUrl: string;
114
+ description: string;
115
+ envVars: {
116
+ CURSOR_AGENT: string;
117
+ };
118
+ };
119
+ cursor: {
120
+ prettyLabel: string;
121
+ docsUrl: string;
122
+ description: string;
123
+ envVars: {
124
+ CURSOR_TRACE_ID: string;
125
+ };
126
+ };
127
+ "github-copilot": {
128
+ prettyLabel: string;
129
+ docsUrl: string;
130
+ description: string;
131
+ envVars: {
132
+ COPILOT_MODEL: string;
133
+ COPILOT_ALLOW_ALL: string;
134
+ COPILOT_GITHUB_TOKEN: string;
135
+ };
136
+ };
137
+ goose: {
138
+ prettyLabel: string;
139
+ repoUrl: string;
140
+ docsUrl: string;
141
+ description: string;
142
+ envVars: {
143
+ GOOSE_TERMINAL: string;
144
+ };
145
+ };
146
+ openclaw: {
147
+ prettyLabel: string;
148
+ repoUrl: string;
149
+ docsUrl: string;
150
+ description: string;
151
+ envVars: {
152
+ OPENCLAW_SHELL: string;
153
+ };
154
+ };
155
+ opencode: {
156
+ prettyLabel: string;
157
+ repoUrl: string;
158
+ docsUrl: string;
159
+ description: string;
160
+ envVars: {
161
+ OPENCODE_CLIENT: string;
162
+ };
163
+ };
164
+ pi: {
165
+ prettyLabel: string;
166
+ repoUrl: string;
167
+ docsUrl: string;
168
+ description: string;
169
+ envVars: {
170
+ PI_CODING_AGENT: string;
171
+ };
172
+ };
173
+ replit: {
174
+ prettyLabel: string;
175
+ docsUrl: string;
176
+ description: string;
177
+ envVars: {
178
+ REPL_ID: string;
179
+ };
180
+ };
181
+ trae: {
182
+ prettyLabel: string;
183
+ docsUrl: string;
184
+ description: string;
185
+ envVars: {
186
+ TRAE_AI_SHELL_ID: string;
187
+ };
188
+ };
189
+ devin: {
190
+ prettyLabel: string;
191
+ docsUrl: string;
192
+ description: string;
193
+ };
194
+ };
195
+ export type AgentHarnessKey = keyof typeof AGENT_HARNESSES;
196
+ //# sourceMappingURL=agent-harnesses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-harnesses.d.ts","sourceRoot":"","sources":["../../src/agent-harnesses.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,gCAAiC,CAAC;AAEtE;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2GY,CAAC;AAGzC,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,eAAe,CAAC"}
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AGENT_HARNESSES = exports.STANDARD_AGENT_ENV_VARS = void 0;
4
+ /**
5
+ * Standard environment variables that any tool can set to identify itself.
6
+ * When one of these is set, its value is used directly as the agent `id`
7
+ * (matched against the keys of `AGENT_HARNESSES`); unrecognized values are
8
+ * reported as `"unknown"`.
9
+ */
10
+ exports.STANDARD_AGENT_ENV_VARS = ["AI_AGENT", "AGENT"];
11
+ /**
12
+ * Add your new agent harness here.
13
+ *
14
+ * /!\ IMPORTANT
15
+ *
16
+ * Insertion order matters for detection priority: harnesses are checked from
17
+ * top to bottom and the first match wins. In particular, `cowork` must stay
18
+ * before `claude-code` so the more specific signal takes priority when both
19
+ * `CLAUDE_CODE` and `CLAUDE_CODE_IS_COWORK` are set.
20
+ */
21
+ exports.AGENT_HARNESSES = {
22
+ antigravity: {
23
+ prettyLabel: "Antigravity",
24
+ docsUrl: "https://antigravity.google",
25
+ description: "Agentic development platform from Google built around Gemini.",
26
+ envVars: { ANTIGRAVITY_AGENT: "*" },
27
+ },
28
+ "augment-cli": {
29
+ prettyLabel: "Augment CLI",
30
+ repoUrl: "https://github.com/augmentcode/auggie",
31
+ docsUrl: "https://www.augmentcode.com",
32
+ description: "Auggie, the command-line coding agent from Augment Code.",
33
+ envVars: { AUGMENT_AGENT: "*" },
34
+ },
35
+ cline: {
36
+ prettyLabel: "Cline",
37
+ repoUrl: "https://github.com/cline/cline",
38
+ docsUrl: "https://cline.bot",
39
+ description: "Open-source autonomous coding agent for VS Code.",
40
+ envVars: { CLINE_ACTIVE: "*" },
41
+ },
42
+ cowork: {
43
+ // must stay before `claude-code` so the more specific signal takes priority when both `CLAUDE_CODE` and `CLAUDE_CODE_IS_COWORK` are set.
44
+ prettyLabel: "Cowork",
45
+ docsUrl: "https://claude.com/product/cowork",
46
+ description: "Anthropic's agent for autonomous knowledge work, built on top of Claude Code.",
47
+ envVars: { CLAUDE_CODE_IS_COWORK: "*" },
48
+ },
49
+ "claude-code": {
50
+ prettyLabel: "Claude Code",
51
+ repoUrl: "https://github.com/anthropics/claude-code",
52
+ docsUrl: "https://code.claude.com/docs",
53
+ description: "Anthropic's agentic coding tool that lives in your terminal.",
54
+ envVars: { CLAUDECODE: "*", CLAUDE_CODE: "*" },
55
+ },
56
+ codex: {
57
+ prettyLabel: "Codex",
58
+ repoUrl: "https://github.com/openai/codex",
59
+ docsUrl: "https://developers.openai.com/codex",
60
+ description: "OpenAI's lightweight coding agent that runs in your terminal.",
61
+ envVars: { CODEX_SANDBOX: "*", CODEX_CI: "*", CODEX_THREAD_ID: "*" },
62
+ },
63
+ "cursor-cli": {
64
+ // must stay before `cursor` so the more specific signal takes priority: when the CLI runs inside
65
+ // the Cursor editor's terminal, child processes inherit `CURSOR_TRACE_ID` and the CLI sets `CURSOR_AGENT`.
66
+ prettyLabel: "Cursor CLI",
67
+ docsUrl: "https://cursor.com/docs/cli/overview",
68
+ description: "Cursor's coding agent for the command line.",
69
+ envVars: { CURSOR_AGENT: "*" },
70
+ },
71
+ cursor: {
72
+ prettyLabel: "Cursor",
73
+ docsUrl: "https://cursor.com",
74
+ description: "AI-powered code editor.",
75
+ envVars: { CURSOR_TRACE_ID: "*" },
76
+ },
77
+ "github-copilot": {
78
+ prettyLabel: "GitHub Copilot",
79
+ docsUrl: "https://docs.github.com/copilot",
80
+ description: "GitHub's AI coding assistant.",
81
+ envVars: { COPILOT_MODEL: "*", COPILOT_ALLOW_ALL: "*", COPILOT_GITHUB_TOKEN: "*" },
82
+ },
83
+ goose: {
84
+ prettyLabel: "Goose",
85
+ repoUrl: "https://github.com/aaif-goose/goose",
86
+ docsUrl: "https://goose-docs.ai/",
87
+ description: "Open-source, extensible AI agent, originally from Block and now part of the Agentic AI Foundation.",
88
+ envVars: { GOOSE_TERMINAL: "*" },
89
+ },
90
+ openclaw: {
91
+ prettyLabel: "OpenClaw",
92
+ repoUrl: "https://github.com/openclaw/openclaw",
93
+ docsUrl: "https://openclaw.ai",
94
+ description: "Open-source, self-hosted personal AI assistant that runs on your own devices.",
95
+ envVars: { OPENCLAW_SHELL: "*" },
96
+ },
97
+ opencode: {
98
+ prettyLabel: "opencode",
99
+ repoUrl: "https://github.com/anomalyco/opencode",
100
+ docsUrl: "https://opencode.ai",
101
+ description: "Open-source AI coding agent built for the terminal.",
102
+ envVars: { OPENCODE_CLIENT: "*" },
103
+ },
104
+ pi: {
105
+ prettyLabel: "Pi",
106
+ repoUrl: "https://github.com/earendil-works/pi",
107
+ docsUrl: "https://pi.dev",
108
+ description: "Minimal, self-extensible terminal coding agent with a unified multi-provider LLM API.",
109
+ envVars: { PI_CODING_AGENT: "*" },
110
+ },
111
+ replit: {
112
+ prettyLabel: "Replit",
113
+ docsUrl: "https://replit.com",
114
+ description: "Cloud development environment with an AI coding agent.",
115
+ envVars: { REPL_ID: "*" },
116
+ },
117
+ trae: {
118
+ prettyLabel: "Trae",
119
+ docsUrl: "https://trae.ai",
120
+ description: "AI-powered IDE from ByteDance.",
121
+ envVars: { TRAE_AI_SHELL_ID: "*" },
122
+ },
123
+ devin: {
124
+ prettyLabel: "Devin",
125
+ docsUrl: "https://devin.ai",
126
+ description: "Autonomous AI software engineer from Cognition.",
127
+ },
128
+ };
@@ -23,4 +23,6 @@ export { KERNEL_LIBRARIES_UI_ELEMENTS } from "./kernel-libraries.js";
23
23
  export type { KernelLibraryKey, KernelLibraryUiElement } from "./kernel-libraries.js";
24
24
  export * from "./inference-providers.js";
25
25
  export { EVALUATION_FRAMEWORKS } from "./eval.js";
26
+ export { AGENT_HARNESSES, STANDARD_AGENT_ENV_VARS } from "./agent-harnesses.js";
27
+ export type { AgentHarness, AgentHarnessKey } from "./agent-harnesses.js";
26
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACvF,cAAc,kBAAkB,CAAC;AACjC,OAAO,EACN,aAAa,EACb,cAAc,EACd,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,UAAU,EACV,eAAe,EACf,aAAa,EACb,kBAAkB,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,8BAA8B,EAC9B,sBAAsB,EACtB,2BAA2B,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC9E,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACzF,YAAY,EACX,aAAa,EACb,sBAAsB,EACtB,gCAAgC,EAChC,8BAA8B,EAC9B,kCAAkC,EAClC,uBAAuB,EACvB,sBAAsB,EACtB,oCAAoC,EACpC,gCAAgC,EAChC,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,EAC9B,sBAAsB,EACtB,8BAA8B,EAC9B,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,E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CAAC;AAC5D,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AACvE,YAAY,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEzF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEtF,cAAc,0BAA0B,CAAC;AAEzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAChF,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.EVALUATION_FRAMEWORKS = exports.KERNEL_LIBRARIES_UI_ELEMENTS = exports.DATASET_LIBRARIES_UI_ELEMENTS = exports.LOCAL_APPS = exports.DEFAULT_MEMORY_OPTIONS = exports.SKUS = exports.getModelInputSnippet = exports.stringifyMessages = exports.stringifyGenerationConfig = exports.inferenceSnippetLanguages = exports.SPECIAL_TOKENS_ATTRIBUTES = exports.MODEL_LIBRARIES_UI_ELEMENTS = exports.ALL_MODEL_LIBRARY_KEYS = exports.ALL_DISPLAY_MODEL_LIBRARY_KEYS = exports.PIPELINE_TYPES_SET = exports.SUBTASK_TYPES = exports.MODALITY_LABELS = exports.MODALITIES = exports.PIPELINE_TYPES = exports.PIPELINE_DATA = exports.MAPPING_DEFAULT_WIDGET = exports.LIBRARY_TASK_MAPPING = void 0;
17
+ exports.STANDARD_AGENT_ENV_VARS = exports.AGENT_HARNESSES = exports.EVALUATION_FRAMEWORKS = exports.KERNEL_LIBRARIES_UI_ELEMENTS = exports.DATASET_LIBRARIES_UI_ELEMENTS = exports.LOCAL_APPS = exports.DEFAULT_MEMORY_OPTIONS = exports.SKUS = exports.getModelInputSnippet = exports.stringifyMessages = exports.stringifyGenerationConfig = exports.inferenceSnippetLanguages = exports.SPECIAL_TOKENS_ATTRIBUTES = exports.MODEL_LIBRARIES_UI_ELEMENTS = exports.ALL_MODEL_LIBRARY_KEYS = exports.ALL_DISPLAY_MODEL_LIBRARY_KEYS = exports.PIPELINE_TYPES_SET = exports.SUBTASK_TYPES = exports.MODALITY_LABELS = exports.MODALITIES = exports.PIPELINE_TYPES = exports.PIPELINE_DATA = exports.MAPPING_DEFAULT_WIDGET = exports.LIBRARY_TASK_MAPPING = void 0;
18
18
  var library_to_tasks_js_1 = require("./library-to-tasks.js");
19
19
  Object.defineProperty(exports, "LIBRARY_TASK_MAPPING", { enumerable: true, get: function () { return library_to_tasks_js_1.LIBRARY_TASK_MAPPING; } });
20
20
  var default_widget_inputs_js_1 = require("./default-widget-inputs.js");
@@ -51,3 +51,6 @@ Object.defineProperty(exports, "KERNEL_LIBRARIES_UI_ELEMENTS", { enumerable: tru
51
51
  __exportStar(require("./inference-providers.js"), exports);
52
52
  var eval_js_1 = require("./eval.js");
53
53
  Object.defineProperty(exports, "EVALUATION_FRAMEWORKS", { enumerable: true, get: function () { return eval_js_1.EVALUATION_FRAMEWORKS; } });
54
+ var agent_harnesses_js_1 = require("./agent-harnesses.js");
55
+ Object.defineProperty(exports, "AGENT_HARNESSES", { enumerable: true, get: function () { return agent_harnesses_js_1.AGENT_HARNESSES; } });
56
+ Object.defineProperty(exports, "STANDARD_AGENT_ENV_VARS", { enumerable: true, get: function () { return agent_harnesses_js_1.STANDARD_AGENT_ENV_VARS; } });
@@ -0,0 +1,196 @@
1
+ /**
2
+ * Registry of AI coding agents / harnesses known to use the Hugging Face Hub.
3
+ *
4
+ * To add your harness, append an entry below keyed by its `id` (the name used
5
+ * when reporting Hub activity), and list the environment variable(s) that
6
+ * identify it.
7
+ */
8
+ export interface AgentHarness {
9
+ /**
10
+ * Human-readable name of the harness, e.g. displayed in a leaderboard.
11
+ */
12
+ prettyLabel: string;
13
+ /**
14
+ * URL to the harness's code repository (usually on GitHub).
15
+ */
16
+ repoUrl?: string;
17
+ /**
18
+ * URL to the harness's documentation or website.
19
+ */
20
+ docsUrl?: string;
21
+ /**
22
+ * Short description of the harness.
23
+ */
24
+ description?: string;
25
+ /**
26
+ * Environment variable(s) that identify this harness, mapped to the value
27
+ * pattern they must match. Detection matches if ANY entry matches.
28
+ *
29
+ * The value pattern is one of:
30
+ * - `"*"`: the variable is set to any (non-empty) value
31
+ * - `"<value>"`: the variable equals this exact value
32
+ * - `"<prefix>*"`: the variable value starts with `<prefix>` (fuzzy match, resolved client-side)
33
+ *
34
+ * If not provided, the harness is detected through the standard AI_AGENT / AGENT variables only.
35
+ */
36
+ envVars?: Record<string, string>;
37
+ }
38
+ /**
39
+ * Standard environment variables that any tool can set to identify itself.
40
+ * When one of these is set, its value is used directly as the agent `id`
41
+ * (matched against the keys of `AGENT_HARNESSES`); unrecognized values are
42
+ * reported as `"unknown"`.
43
+ */
44
+ export declare const STANDARD_AGENT_ENV_VARS: readonly ["AI_AGENT", "AGENT"];
45
+ /**
46
+ * Add your new agent harness here.
47
+ *
48
+ * /!\ IMPORTANT
49
+ *
50
+ * Insertion order matters for detection priority: harnesses are checked from
51
+ * top to bottom and the first match wins. In particular, `cowork` must stay
52
+ * before `claude-code` so the more specific signal takes priority when both
53
+ * `CLAUDE_CODE` and `CLAUDE_CODE_IS_COWORK` are set.
54
+ */
55
+ export declare const AGENT_HARNESSES: {
56
+ antigravity: {
57
+ prettyLabel: string;
58
+ docsUrl: string;
59
+ description: string;
60
+ envVars: {
61
+ ANTIGRAVITY_AGENT: string;
62
+ };
63
+ };
64
+ "augment-cli": {
65
+ prettyLabel: string;
66
+ repoUrl: string;
67
+ docsUrl: string;
68
+ description: string;
69
+ envVars: {
70
+ AUGMENT_AGENT: string;
71
+ };
72
+ };
73
+ cline: {
74
+ prettyLabel: string;
75
+ repoUrl: string;
76
+ docsUrl: string;
77
+ description: string;
78
+ envVars: {
79
+ CLINE_ACTIVE: string;
80
+ };
81
+ };
82
+ cowork: {
83
+ prettyLabel: string;
84
+ docsUrl: string;
85
+ description: string;
86
+ envVars: {
87
+ CLAUDE_CODE_IS_COWORK: string;
88
+ };
89
+ };
90
+ "claude-code": {
91
+ prettyLabel: string;
92
+ repoUrl: string;
93
+ docsUrl: string;
94
+ description: string;
95
+ envVars: {
96
+ CLAUDECODE: string;
97
+ CLAUDE_CODE: string;
98
+ };
99
+ };
100
+ codex: {
101
+ prettyLabel: string;
102
+ repoUrl: string;
103
+ docsUrl: string;
104
+ description: string;
105
+ envVars: {
106
+ CODEX_SANDBOX: string;
107
+ CODEX_CI: string;
108
+ CODEX_THREAD_ID: string;
109
+ };
110
+ };
111
+ "cursor-cli": {
112
+ prettyLabel: string;
113
+ docsUrl: string;
114
+ description: string;
115
+ envVars: {
116
+ CURSOR_AGENT: string;
117
+ };
118
+ };
119
+ cursor: {
120
+ prettyLabel: string;
121
+ docsUrl: string;
122
+ description: string;
123
+ envVars: {
124
+ CURSOR_TRACE_ID: string;
125
+ };
126
+ };
127
+ "github-copilot": {
128
+ prettyLabel: string;
129
+ docsUrl: string;
130
+ description: string;
131
+ envVars: {
132
+ COPILOT_MODEL: string;
133
+ COPILOT_ALLOW_ALL: string;
134
+ COPILOT_GITHUB_TOKEN: string;
135
+ };
136
+ };
137
+ goose: {
138
+ prettyLabel: string;
139
+ repoUrl: string;
140
+ docsUrl: string;
141
+ description: string;
142
+ envVars: {
143
+ GOOSE_TERMINAL: string;
144
+ };
145
+ };
146
+ openclaw: {
147
+ prettyLabel: string;
148
+ repoUrl: string;
149
+ docsUrl: string;
150
+ description: string;
151
+ envVars: {
152
+ OPENCLAW_SHELL: string;
153
+ };
154
+ };
155
+ opencode: {
156
+ prettyLabel: string;
157
+ repoUrl: string;
158
+ docsUrl: string;
159
+ description: string;
160
+ envVars: {
161
+ OPENCODE_CLIENT: string;
162
+ };
163
+ };
164
+ pi: {
165
+ prettyLabel: string;
166
+ repoUrl: string;
167
+ docsUrl: string;
168
+ description: string;
169
+ envVars: {
170
+ PI_CODING_AGENT: string;
171
+ };
172
+ };
173
+ replit: {
174
+ prettyLabel: string;
175
+ docsUrl: string;
176
+ description: string;
177
+ envVars: {
178
+ REPL_ID: string;
179
+ };
180
+ };
181
+ trae: {
182
+ prettyLabel: string;
183
+ docsUrl: string;
184
+ description: string;
185
+ envVars: {
186
+ TRAE_AI_SHELL_ID: string;
187
+ };
188
+ };
189
+ devin: {
190
+ prettyLabel: string;
191
+ docsUrl: string;
192
+ description: string;
193
+ };
194
+ };
195
+ export type AgentHarnessKey = keyof typeof AGENT_HARNESSES;
196
+ //# sourceMappingURL=agent-harnesses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-harnesses.d.ts","sourceRoot":"","sources":["../../src/agent-harnesses.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,gCAAiC,CAAC;AAEtE;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2GY,CAAC;AAGzC,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,eAAe,CAAC"}
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Standard environment variables that any tool can set to identify itself.
3
+ * When one of these is set, its value is used directly as the agent `id`
4
+ * (matched against the keys of `AGENT_HARNESSES`); unrecognized values are
5
+ * reported as `"unknown"`.
6
+ */
7
+ export const STANDARD_AGENT_ENV_VARS = ["AI_AGENT", "AGENT"];
8
+ /**
9
+ * Add your new agent harness here.
10
+ *
11
+ * /!\ IMPORTANT
12
+ *
13
+ * Insertion order matters for detection priority: harnesses are checked from
14
+ * top to bottom and the first match wins. In particular, `cowork` must stay
15
+ * before `claude-code` so the more specific signal takes priority when both
16
+ * `CLAUDE_CODE` and `CLAUDE_CODE_IS_COWORK` are set.
17
+ */
18
+ export const AGENT_HARNESSES = {
19
+ antigravity: {
20
+ prettyLabel: "Antigravity",
21
+ docsUrl: "https://antigravity.google",
22
+ description: "Agentic development platform from Google built around Gemini.",
23
+ envVars: { ANTIGRAVITY_AGENT: "*" },
24
+ },
25
+ "augment-cli": {
26
+ prettyLabel: "Augment CLI",
27
+ repoUrl: "https://github.com/augmentcode/auggie",
28
+ docsUrl: "https://www.augmentcode.com",
29
+ description: "Auggie, the command-line coding agent from Augment Code.",
30
+ envVars: { AUGMENT_AGENT: "*" },
31
+ },
32
+ cline: {
33
+ prettyLabel: "Cline",
34
+ repoUrl: "https://github.com/cline/cline",
35
+ docsUrl: "https://cline.bot",
36
+ description: "Open-source autonomous coding agent for VS Code.",
37
+ envVars: { CLINE_ACTIVE: "*" },
38
+ },
39
+ cowork: {
40
+ // must stay before `claude-code` so the more specific signal takes priority when both `CLAUDE_CODE` and `CLAUDE_CODE_IS_COWORK` are set.
41
+ prettyLabel: "Cowork",
42
+ docsUrl: "https://claude.com/product/cowork",
43
+ description: "Anthropic's agent for autonomous knowledge work, built on top of Claude Code.",
44
+ envVars: { CLAUDE_CODE_IS_COWORK: "*" },
45
+ },
46
+ "claude-code": {
47
+ prettyLabel: "Claude Code",
48
+ repoUrl: "https://github.com/anthropics/claude-code",
49
+ docsUrl: "https://code.claude.com/docs",
50
+ description: "Anthropic's agentic coding tool that lives in your terminal.",
51
+ envVars: { CLAUDECODE: "*", CLAUDE_CODE: "*" },
52
+ },
53
+ codex: {
54
+ prettyLabel: "Codex",
55
+ repoUrl: "https://github.com/openai/codex",
56
+ docsUrl: "https://developers.openai.com/codex",
57
+ description: "OpenAI's lightweight coding agent that runs in your terminal.",
58
+ envVars: { CODEX_SANDBOX: "*", CODEX_CI: "*", CODEX_THREAD_ID: "*" },
59
+ },
60
+ "cursor-cli": {
61
+ // must stay before `cursor` so the more specific signal takes priority: when the CLI runs inside
62
+ // the Cursor editor's terminal, child processes inherit `CURSOR_TRACE_ID` and the CLI sets `CURSOR_AGENT`.
63
+ prettyLabel: "Cursor CLI",
64
+ docsUrl: "https://cursor.com/docs/cli/overview",
65
+ description: "Cursor's coding agent for the command line.",
66
+ envVars: { CURSOR_AGENT: "*" },
67
+ },
68
+ cursor: {
69
+ prettyLabel: "Cursor",
70
+ docsUrl: "https://cursor.com",
71
+ description: "AI-powered code editor.",
72
+ envVars: { CURSOR_TRACE_ID: "*" },
73
+ },
74
+ "github-copilot": {
75
+ prettyLabel: "GitHub Copilot",
76
+ docsUrl: "https://docs.github.com/copilot",
77
+ description: "GitHub's AI coding assistant.",
78
+ envVars: { COPILOT_MODEL: "*", COPILOT_ALLOW_ALL: "*", COPILOT_GITHUB_TOKEN: "*" },
79
+ },
80
+ goose: {
81
+ prettyLabel: "Goose",
82
+ repoUrl: "https://github.com/aaif-goose/goose",
83
+ docsUrl: "https://goose-docs.ai/",
84
+ description: "Open-source, extensible AI agent, originally from Block and now part of the Agentic AI Foundation.",
85
+ envVars: { GOOSE_TERMINAL: "*" },
86
+ },
87
+ openclaw: {
88
+ prettyLabel: "OpenClaw",
89
+ repoUrl: "https://github.com/openclaw/openclaw",
90
+ docsUrl: "https://openclaw.ai",
91
+ description: "Open-source, self-hosted personal AI assistant that runs on your own devices.",
92
+ envVars: { OPENCLAW_SHELL: "*" },
93
+ },
94
+ opencode: {
95
+ prettyLabel: "opencode",
96
+ repoUrl: "https://github.com/anomalyco/opencode",
97
+ docsUrl: "https://opencode.ai",
98
+ description: "Open-source AI coding agent built for the terminal.",
99
+ envVars: { OPENCODE_CLIENT: "*" },
100
+ },
101
+ pi: {
102
+ prettyLabel: "Pi",
103
+ repoUrl: "https://github.com/earendil-works/pi",
104
+ docsUrl: "https://pi.dev",
105
+ description: "Minimal, self-extensible terminal coding agent with a unified multi-provider LLM API.",
106
+ envVars: { PI_CODING_AGENT: "*" },
107
+ },
108
+ replit: {
109
+ prettyLabel: "Replit",
110
+ docsUrl: "https://replit.com",
111
+ description: "Cloud development environment with an AI coding agent.",
112
+ envVars: { REPL_ID: "*" },
113
+ },
114
+ trae: {
115
+ prettyLabel: "Trae",
116
+ docsUrl: "https://trae.ai",
117
+ description: "AI-powered IDE from ByteDance.",
118
+ envVars: { TRAE_AI_SHELL_ID: "*" },
119
+ },
120
+ devin: {
121
+ prettyLabel: "Devin",
122
+ docsUrl: "https://devin.ai",
123
+ description: "Autonomous AI software engineer from Cognition.",
124
+ },
125
+ };
@@ -23,4 +23,6 @@ export { KERNEL_LIBRARIES_UI_ELEMENTS } from "./kernel-libraries.js";
23
23
  export type { KernelLibraryKey, KernelLibraryUiElement } from "./kernel-libraries.js";
24
24
  export * from "./inference-providers.js";
25
25
  export { EVALUATION_FRAMEWORKS } from "./eval.js";
26
+ export { AGENT_HARNESSES, STANDARD_AGENT_ENV_VARS } from "./agent-harnesses.js";
27
+ export type { AgentHarness, AgentHarnessKey } from "./agent-harnesses.js";
26
28
  //# sourceMapping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;AAE9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AACvE,YAAY,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEzF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEtF,cAAc,0BAA0B,CAAC;AAEzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAChF,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/esm/index.js CHANGED
@@ -12,3 +12,4 @@ export { DATASET_LIBRARIES_UI_ELEMENTS } from "./dataset-libraries.js";
12
12
  export { KERNEL_LIBRARIES_UI_ELEMENTS } from "./kernel-libraries.js";
13
13
  export * from "./inference-providers.js";
14
14
  export { EVALUATION_FRAMEWORKS } from "./eval.js";
15
+ export { AGENT_HARNESSES, STANDARD_AGENT_ENV_VARS } from "./agent-harnesses.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huggingface/tasks",
3
- "version": "0.21.5",
3
+ "version": "0.21.6",
4
4
  "description": "List of ML tasks for huggingface.co/tasks",
5
5
  "keywords": [
6
6
  "hub",
@@ -0,0 +1,167 @@
1
+ /**
2
+ * Registry of AI coding agents / harnesses known to use the Hugging Face Hub.
3
+ *
4
+ * To add your harness, append an entry below keyed by its `id` (the name used
5
+ * when reporting Hub activity), and list the environment variable(s) that
6
+ * identify it.
7
+ */
8
+ export interface AgentHarness {
9
+ /**
10
+ * Human-readable name of the harness, e.g. displayed in a leaderboard.
11
+ */
12
+ prettyLabel: string;
13
+ /**
14
+ * URL to the harness's code repository (usually on GitHub).
15
+ */
16
+ repoUrl?: string;
17
+ /**
18
+ * URL to the harness's documentation or website.
19
+ */
20
+ docsUrl?: string;
21
+ /**
22
+ * Short description of the harness.
23
+ */
24
+ description?: string;
25
+ /**
26
+ * Environment variable(s) that identify this harness, mapped to the value
27
+ * pattern they must match. Detection matches if ANY entry matches.
28
+ *
29
+ * The value pattern is one of:
30
+ * - `"*"`: the variable is set to any (non-empty) value
31
+ * - `"<value>"`: the variable equals this exact value
32
+ * - `"<prefix>*"`: the variable value starts with `<prefix>` (fuzzy match, resolved client-side)
33
+ *
34
+ * If not provided, the harness is detected through the standard AI_AGENT / AGENT variables only.
35
+ */
36
+ envVars?: Record<string, string>;
37
+ }
38
+
39
+ /**
40
+ * Standard environment variables that any tool can set to identify itself.
41
+ * When one of these is set, its value is used directly as the agent `id`
42
+ * (matched against the keys of `AGENT_HARNESSES`); unrecognized values are
43
+ * reported as `"unknown"`.
44
+ */
45
+ export const STANDARD_AGENT_ENV_VARS = ["AI_AGENT", "AGENT"] as const;
46
+
47
+ /**
48
+ * Add your new agent harness here.
49
+ *
50
+ * /!\ IMPORTANT
51
+ *
52
+ * Insertion order matters for detection priority: harnesses are checked from
53
+ * top to bottom and the first match wins. In particular, `cowork` must stay
54
+ * before `claude-code` so the more specific signal takes priority when both
55
+ * `CLAUDE_CODE` and `CLAUDE_CODE_IS_COWORK` are set.
56
+ */
57
+ export const AGENT_HARNESSES = {
58
+ antigravity: {
59
+ prettyLabel: "Antigravity",
60
+ docsUrl: "https://antigravity.google",
61
+ description: "Agentic development platform from Google built around Gemini.",
62
+ envVars: { ANTIGRAVITY_AGENT: "*" },
63
+ },
64
+ "augment-cli": {
65
+ prettyLabel: "Augment CLI",
66
+ repoUrl: "https://github.com/augmentcode/auggie",
67
+ docsUrl: "https://www.augmentcode.com",
68
+ description: "Auggie, the command-line coding agent from Augment Code.",
69
+ envVars: { AUGMENT_AGENT: "*" },
70
+ },
71
+ cline: {
72
+ prettyLabel: "Cline",
73
+ repoUrl: "https://github.com/cline/cline",
74
+ docsUrl: "https://cline.bot",
75
+ description: "Open-source autonomous coding agent for VS Code.",
76
+ envVars: { CLINE_ACTIVE: "*" },
77
+ },
78
+ cowork: {
79
+ // must stay before `claude-code` so the more specific signal takes priority when both `CLAUDE_CODE` and `CLAUDE_CODE_IS_COWORK` are set.
80
+ prettyLabel: "Cowork",
81
+ docsUrl: "https://claude.com/product/cowork",
82
+ description: "Anthropic's agent for autonomous knowledge work, built on top of Claude Code.",
83
+ envVars: { CLAUDE_CODE_IS_COWORK: "*" },
84
+ },
85
+ "claude-code": {
86
+ prettyLabel: "Claude Code",
87
+ repoUrl: "https://github.com/anthropics/claude-code",
88
+ docsUrl: "https://code.claude.com/docs",
89
+ description: "Anthropic's agentic coding tool that lives in your terminal.",
90
+ envVars: { CLAUDECODE: "*", CLAUDE_CODE: "*" },
91
+ },
92
+ codex: {
93
+ prettyLabel: "Codex",
94
+ repoUrl: "https://github.com/openai/codex",
95
+ docsUrl: "https://developers.openai.com/codex",
96
+ description: "OpenAI's lightweight coding agent that runs in your terminal.",
97
+ envVars: { CODEX_SANDBOX: "*", CODEX_CI: "*", CODEX_THREAD_ID: "*" },
98
+ },
99
+ "cursor-cli": {
100
+ // must stay before `cursor` so the more specific signal takes priority: when the CLI runs inside
101
+ // the Cursor editor's terminal, child processes inherit `CURSOR_TRACE_ID` and the CLI sets `CURSOR_AGENT`.
102
+ prettyLabel: "Cursor CLI",
103
+ docsUrl: "https://cursor.com/docs/cli/overview",
104
+ description: "Cursor's coding agent for the command line.",
105
+ envVars: { CURSOR_AGENT: "*" },
106
+ },
107
+ cursor: {
108
+ prettyLabel: "Cursor",
109
+ docsUrl: "https://cursor.com",
110
+ description: "AI-powered code editor.",
111
+ envVars: { CURSOR_TRACE_ID: "*" },
112
+ },
113
+ "github-copilot": {
114
+ prettyLabel: "GitHub Copilot",
115
+ docsUrl: "https://docs.github.com/copilot",
116
+ description: "GitHub's AI coding assistant.",
117
+ envVars: { COPILOT_MODEL: "*", COPILOT_ALLOW_ALL: "*", COPILOT_GITHUB_TOKEN: "*" },
118
+ },
119
+ goose: {
120
+ prettyLabel: "Goose",
121
+ repoUrl: "https://github.com/aaif-goose/goose",
122
+ docsUrl: "https://goose-docs.ai/",
123
+ description: "Open-source, extensible AI agent, originally from Block and now part of the Agentic AI Foundation.",
124
+ envVars: { GOOSE_TERMINAL: "*" },
125
+ },
126
+ openclaw: {
127
+ prettyLabel: "OpenClaw",
128
+ repoUrl: "https://github.com/openclaw/openclaw",
129
+ docsUrl: "https://openclaw.ai",
130
+ description: "Open-source, self-hosted personal AI assistant that runs on your own devices.",
131
+ envVars: { OPENCLAW_SHELL: "*" },
132
+ },
133
+ opencode: {
134
+ prettyLabel: "opencode",
135
+ repoUrl: "https://github.com/anomalyco/opencode",
136
+ docsUrl: "https://opencode.ai",
137
+ description: "Open-source AI coding agent built for the terminal.",
138
+ envVars: { OPENCODE_CLIENT: "*" },
139
+ },
140
+ pi: {
141
+ prettyLabel: "Pi",
142
+ repoUrl: "https://github.com/earendil-works/pi",
143
+ docsUrl: "https://pi.dev",
144
+ description: "Minimal, self-extensible terminal coding agent with a unified multi-provider LLM API.",
145
+ envVars: { PI_CODING_AGENT: "*" },
146
+ },
147
+ replit: {
148
+ prettyLabel: "Replit",
149
+ docsUrl: "https://replit.com",
150
+ description: "Cloud development environment with an AI coding agent.",
151
+ envVars: { REPL_ID: "*" },
152
+ },
153
+ trae: {
154
+ prettyLabel: "Trae",
155
+ docsUrl: "https://trae.ai",
156
+ description: "AI-powered IDE from ByteDance.",
157
+ envVars: { TRAE_AI_SHELL_ID: "*" },
158
+ },
159
+ devin: {
160
+ prettyLabel: "Devin",
161
+ docsUrl: "https://devin.ai",
162
+ description: "Autonomous AI software engineer from Cognition.",
163
+ },
164
+ } satisfies Record<string, AgentHarness>;
165
+
166
+ /// List of the agent harnesses known to the Hub
167
+ export type AgentHarnessKey = keyof typeof AGENT_HARNESSES;
package/src/index.ts CHANGED
@@ -73,3 +73,6 @@ export type { KernelLibraryKey, KernelLibraryUiElement } from "./kernel-librarie
73
73
  export * from "./inference-providers.js";
74
74
 
75
75
  export { EVALUATION_FRAMEWORKS } from "./eval.js";
76
+
77
+ export { AGENT_HARNESSES, STANDARD_AGENT_ENV_VARS } from "./agent-harnesses.js";
78
+ export type { AgentHarness, AgentHarnessKey } from "./agent-harnesses.js";