typeclaw 0.51.0 → 0.52.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/types/agent/bash-sandbox-env.d.ts +2 -0
- package/dist/types/agent/bash-sandbox.d.ts +4 -0
- package/dist/types/agent/index.d.ts +5 -0
- package/dist/types/agent/multimodal/look-at.d.ts +1 -1
- package/dist/types/agent/plugin-tools.d.ts +4 -0
- package/dist/types/agent/prompt-cache-key.d.ts +1 -0
- package/dist/types/agent/session-tail.d.ts +12 -0
- package/dist/types/agent/subagents.d.ts +5 -0
- package/dist/types/agent/system-prompt-composition.d.ts +1 -0
- package/dist/types/agent/system-prompt.d.ts +2 -0
- package/dist/types/agent/tools/channel-disengage.d.ts +1 -1
- package/dist/types/agent/tools/channel-edit.d.ts +1 -1
- package/dist/types/agent/tools/channel-fetch-attachment.d.ts +1 -1
- package/dist/types/agent/tools/channel-handoff.d.ts +1 -1
- package/dist/types/agent/tools/channel-history.d.ts +1 -1
- package/dist/types/agent/tools/channel-react.d.ts +1 -1
- package/dist/types/agent/tools/channel-read.d.ts +10 -2
- package/dist/types/agent/tools/channel-reply.d.ts +1 -1
- package/dist/types/agent/tools/channel-send.d.ts +1 -1
- package/dist/types/agent/tools/channel-session-search.d.ts +1 -1
- package/dist/types/agent/tools/grant-role.d.ts +1 -1
- package/dist/types/agent/tools/post-github-review.d.ts +1 -1
- package/dist/types/agent/tools/restart.d.ts +1 -1
- package/dist/types/agent/tools/skip-response.d.ts +1 -1
- package/dist/types/agent/tools/spawn-subagent.d.ts +2 -1
- package/dist/types/agent/tools/stream-snapshot.d.ts +1 -1
- package/dist/types/agent/tools/subagent-cancel.d.ts +1 -1
- package/dist/types/agent/tools/subagent-output.d.ts +1 -1
- package/dist/types/agent/tools/todo/index.d.ts +1 -1
- package/dist/types/agent/tools/webfetch/adaptive-html.d.ts +3 -3
- package/dist/types/agent/tools/webfetch/strategies/readability-process.d.ts +48 -0
- package/dist/types/agent/tools/webfetch/tool.d.ts +2 -2
- package/dist/types/agent/tools/websearch.d.ts +1 -1
- package/dist/types/channels/adapters/github/auth-app.d.ts +25 -0
- package/dist/types/channels/adapters/github/auth-pat.d.ts +17 -0
- package/dist/types/channels/adapters/github/auth.d.ts +24 -0
- package/dist/types/channels/github-token-bridge.d.ts +4 -0
- package/dist/types/channels/lost-background-context.d.ts +2 -0
- package/dist/types/channels/persistence.d.ts +1 -0
- package/dist/types/channels/router.d.ts +5 -1
- package/dist/types/channels/types.d.ts +1 -0
- package/dist/types/coding-agent/tool.d.ts +1 -1
- package/dist/types/config/config.d.ts +20 -11
- package/dist/types/config/providers.d.ts +47 -0
- package/dist/types/eval/sandbox.d.ts +2 -0
- package/dist/types/git/resolve-identity.d.ts +2 -0
- package/dist/types/init/dockerfile.d.ts +1 -0
- package/dist/types/init/gitignore.d.ts +1 -1
- package/dist/types/permissions/builtins.d.ts +1 -0
- package/dist/types/plugin/types.d.ts +3 -0
- package/dist/types/sandbox/canonical-secrets.d.ts +2 -2
- package/dist/types/sandbox/coding-agent.d.ts +1 -1
- package/dist/types/sandbox/dependency-bins.d.ts +1 -0
- package/dist/types/sandbox/dev-source.d.ts +2 -2
- package/dist/types/sandbox/hidden-paths.d.ts +1 -0
- package/dist/types/sandbox/index.d.ts +1 -1
- package/dist/types/sandbox/policy.d.ts +3 -0
- package/dist/types/typevault/cli-path.d.ts +2 -0
- package/dist/types/typevault/envelope-store.d.ts +11 -0
- package/dist/types/typevault/lifecycle.d.ts +13 -0
- package/dist/types/typevault/vault.d.ts +27 -0
- package/package.json +8 -7
- package/scripts/test.ts +252 -0
- package/src/agent/bash-sandbox-env.ts +33 -1
- package/src/agent/bash-sandbox.ts +20 -6
- package/src/agent/index.ts +120 -31
- package/src/agent/multimodal/look-at.ts +1 -1
- package/src/agent/plugin-tools.ts +35 -1
- package/src/agent/prompt-cache-key.ts +26 -3
- package/src/agent/session-origin.ts +39 -18
- package/src/agent/session-tail.ts +28 -0
- package/src/agent/subagents.ts +21 -2
- package/src/agent/system-prompt-composition.ts +18 -0
- package/src/agent/system-prompt.ts +39 -1
- package/src/agent/tool-error-remediation.ts +18 -3
- package/src/agent/tools/channel-disengage.ts +1 -1
- package/src/agent/tools/channel-edit.ts +1 -1
- package/src/agent/tools/channel-fetch-attachment.ts +1 -1
- package/src/agent/tools/channel-handoff.ts +3 -2
- package/src/agent/tools/channel-history.ts +2 -1
- package/src/agent/tools/channel-react.ts +1 -1
- package/src/agent/tools/channel-read.ts +36 -3
- package/src/agent/tools/channel-reply.ts +1 -1
- package/src/agent/tools/channel-send.ts +4 -3
- package/src/agent/tools/channel-session-search.ts +13 -4
- package/src/agent/tools/grant-role.ts +1 -1
- package/src/agent/tools/post-github-review.ts +1 -1
- package/src/agent/tools/restart.ts +1 -1
- package/src/agent/tools/skip-response.ts +1 -1
- package/src/agent/tools/spawn-subagent.ts +15 -1
- package/src/agent/tools/stream-snapshot.ts +1 -1
- package/src/agent/tools/subagent-cancel.ts +1 -1
- package/src/agent/tools/subagent-output.ts +1 -1
- package/src/agent/tools/todo/index.ts +1 -1
- package/src/agent/tools/webfetch/adaptive-html.ts +6 -4
- package/src/agent/tools/webfetch/strategies/readability-child.ts +25 -0
- package/src/agent/tools/webfetch/strategies/readability-process.ts +185 -0
- package/src/agent/tools/webfetch/tool.ts +6 -5
- package/src/agent/tools/websearch.ts +1 -1
- package/src/browser/dockerfile.ts +1 -1
- package/src/browser/fill-secret.ts +92 -35
- package/src/browser/registry.ts +6 -6
- package/src/bundled-plugins/agent-messenger-cli-auth/command.ts +211 -0
- package/src/bundled-plugins/agent-messenger-cli-auth/index.ts +186 -0
- package/src/bundled-plugins/backup/index.ts +17 -2
- package/src/bundled-plugins/backup/runner.ts +37 -2
- package/src/bundled-plugins/browser-agent/browser-agent.ts +51 -14
- package/src/bundled-plugins/browser-agent/index.ts +12 -5
- package/src/bundled-plugins/managed-browser/index.ts +25 -2
- package/src/bundled-plugins/managed-browser/skills/browserskill/browserskill/SKILL.md +13 -5
- package/src/bundled-plugins/managed-browser/skills/omowright/omowright/SKILL.md +56 -5
- package/src/bundled-plugins/memory/README.md +23 -2
- package/src/bundled-plugins/memory/append-fragment.ts +133 -0
- package/src/bundled-plugins/memory/append-tool.ts +80 -149
- package/src/bundled-plugins/memory/dreaming.ts +2 -0
- package/src/bundled-plugins/memory/index.ts +33 -6
- package/src/bundled-plugins/memory/memory-logger.ts +133 -11
- package/src/bundled-plugins/memory/references/store-reference-tool.ts +56 -32
- package/src/bundled-plugins/memory/remember-tool.ts +81 -0
- package/src/bundled-plugins/memory/search-tool-hybrid.ts +91 -0
- package/src/bundled-plugins/memory/search-tool.ts +58 -12
- package/src/bundled-plugins/memory/stream-events.ts +2 -0
- package/src/bundled-plugins/memory/transcript-cursor.ts +30 -0
- package/src/bundled-plugins/memory/transcript-preload.ts +131 -26
- package/src/bundled-plugins/memory/transcript-view.ts +36 -0
- package/src/bundled-plugins/memory/watermark.ts +19 -10
- package/src/bundled-plugins/reviewer/reviewer.ts +20 -0
- package/src/bundled-plugins/security/policies/outbound-secret-scan.ts +3 -6
- package/src/bundled-plugins/security/policies/outbound-text.ts +20 -0
- package/src/bundled-plugins/security/policies/system-prompt-leak.ts +2 -7
- package/src/bundled-plugins/typevault/grants.ts +119 -0
- package/src/bundled-plugins/typevault/index.ts +152 -0
- package/src/bundled-plugins/typevault/request.ts +87 -0
- package/src/bundled-plugins/typevault/runtime.ts +45 -0
- package/src/bundled-plugins/typevault/skills/typevault/SKILL.md +65 -0
- package/src/channels/adapter-halt.ts +17 -0
- package/src/channels/adapters/github/history.ts +23 -2
- package/src/channels/adapters/github/inbound.ts +60 -1
- package/src/channels/adapters/github/index.ts +27 -5
- package/src/channels/adapters/github/reconcile-open-prs.ts +7 -1
- package/src/channels/adapters/kakaotalk-author-resolver.ts +7 -5
- package/src/channels/adapters/kakaotalk-channel-resolver.ts +45 -15
- package/src/channels/adapters/kakaotalk-classify.ts +7 -9
- package/src/channels/adapters/kakaotalk-list.ts +62 -0
- package/src/channels/adapters/kakaotalk-member-cache.ts +67 -0
- package/src/channels/adapters/kakaotalk-membership.ts +27 -10
- package/src/channels/adapters/kakaotalk-mention.ts +61 -0
- package/src/channels/adapters/kakaotalk.ts +159 -125
- package/src/channels/adapters/teams-classify.ts +18 -8
- package/src/channels/github-token-bridge.ts +13 -0
- package/src/channels/lost-background-context.ts +46 -0
- package/src/channels/manager.ts +52 -3
- package/src/channels/persistence.ts +5 -0
- package/src/channels/router.ts +120 -21
- package/src/channels/schema.ts +1 -1
- package/src/channels/types.ts +3 -0
- package/src/coding-agent/tool.ts +1 -1
- package/src/config/config.ts +20 -1
- package/src/config/providers.ts +65 -0
- package/src/container/start.ts +15 -2
- package/src/doctor/channel-checks.ts +33 -0
- package/src/doctor/checks.ts +12 -2
- package/src/eval/sandbox.ts +3 -0
- package/src/eval/tool.ts +1 -0
- package/src/git/resolve-identity.ts +67 -2
- package/src/git/system-commit.ts +7 -0
- package/src/init/dockerfile.ts +5 -1
- package/src/init/gitignore.ts +3 -3
- package/src/init/index.ts +1 -0
- package/src/init/models-dev.ts +2 -0
- package/src/init/validate-api-key.ts +5 -0
- package/src/migrations/secrets-v1-to-v2.ts +2 -0
- package/src/permissions/builtins.ts +8 -0
- package/src/plugin/types.ts +6 -0
- package/src/run/bundled-plugins.ts +12 -0
- package/src/run/channel-session-factory.ts +3 -0
- package/src/run/index.ts +13 -2
- package/src/sandbox/build.ts +1 -0
- package/src/sandbox/canonical-secrets.ts +6 -0
- package/src/sandbox/dependency-bins.ts +13 -1
- package/src/sandbox/dev-source.ts +21 -12
- package/src/sandbox/hidden-paths.ts +1 -1
- package/src/sandbox/index.ts +1 -0
- package/src/sandbox/policy.ts +5 -0
- package/src/secrets/hydrate.ts +4 -1
- package/src/secrets/storage.ts +10 -1
- package/src/server/command-runner.ts +4 -0
- package/src/server/index.ts +8 -1
- package/src/skills/typeclaw-config/SKILL.md +16 -0
- package/src/skills/typeclaw-memory/SKILL.md +3 -1
- package/src/skills/typeclaw-permissions/SKILL.md +8 -8
- package/src/skills/typeclaw-troubleshooting/SKILL.md +18 -1
- package/src/tunnels/active.ts +14 -0
- package/src/typevault/bash-cli.ts +18 -0
- package/src/typevault/cli-path.ts +11 -0
- package/src/typevault/envelope-helper.ts +17 -0
- package/src/typevault/envelope-store.ts +98 -0
- package/src/typevault/lifecycle.ts +132 -0
- package/src/typevault/prompt-tunnel.ts +33 -0
- package/src/typevault/redaction.ts +37 -0
- package/src/typevault/vault.ts +283 -0
- package/typeclaw.schema.json +40 -10
|
@@ -93,6 +93,11 @@ export declare const githubCliSchema: z.ZodDefault<z.ZodObject<{
|
|
|
93
93
|
importHostAuth: z.ZodDefault<z.ZodBoolean>;
|
|
94
94
|
}, z.core.$strip>>;
|
|
95
95
|
export type GithubCliConfig = z.infer<typeof githubCliSchema>;
|
|
96
|
+
export declare const typevaultSchema: z.ZodDefault<z.ZodObject<{
|
|
97
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
98
|
+
promptPort: z.ZodDefault<z.ZodNumber>;
|
|
99
|
+
}, z.core.$strict>>;
|
|
100
|
+
export type TypevaultConfig = z.infer<typeof typevaultSchema>;
|
|
96
101
|
export declare const DEFAULT_LOG_RETENTION_DAYS = 14;
|
|
97
102
|
export declare const MAX_LOG_RETENTION_DAYS = 3650;
|
|
98
103
|
export declare const logsSchema: z.ZodDefault<z.ZodObject<{
|
|
@@ -161,22 +166,22 @@ export declare const customModelsSchema: z.ZodDefault<z.ZodRecord<z.ZodString, z
|
|
|
161
166
|
export type CustomModels = z.infer<typeof customModelsSchema>;
|
|
162
167
|
export declare const thinkingLevelSchema: z.ZodEnum<{
|
|
163
168
|
off: "off";
|
|
164
|
-
|
|
169
|
+
minimal: "minimal";
|
|
165
170
|
low: "low";
|
|
166
|
-
max: "max";
|
|
167
171
|
medium: "medium";
|
|
168
|
-
|
|
172
|
+
high: "high";
|
|
169
173
|
xhigh: "xhigh";
|
|
174
|
+
max: "max";
|
|
170
175
|
}>;
|
|
171
176
|
export type ThinkingLevel = z.infer<typeof thinkingLevelSchema>;
|
|
172
177
|
export declare const modelsSchema: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodType<ProfileEntry, string | string[] | {
|
|
173
178
|
model?: string | undefined;
|
|
174
179
|
models?: string | string[] | undefined;
|
|
175
|
-
thinkingLevel?: "off" | "
|
|
180
|
+
thinkingLevel?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
176
181
|
}, z.core.$ZodTypeInternals<ProfileEntry, string | string[] | {
|
|
177
182
|
model?: string | undefined;
|
|
178
183
|
models?: string | string[] | undefined;
|
|
179
|
-
thinkingLevel?: "off" | "
|
|
184
|
+
thinkingLevel?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
180
185
|
}>>>, z.ZodTransform<Models, Record<string, ProfileEntry>>>;
|
|
181
186
|
export declare function modelOverrideRuleError(rule: string): string | undefined;
|
|
182
187
|
declare const modelOverrideSchema: z.ZodObject<{
|
|
@@ -184,11 +189,11 @@ declare const modelOverrideSchema: z.ZodObject<{
|
|
|
184
189
|
models: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodType<ProfileEntry, string | string[] | {
|
|
185
190
|
model?: string | undefined;
|
|
186
191
|
models?: string | string[] | undefined;
|
|
187
|
-
thinkingLevel?: "off" | "
|
|
192
|
+
thinkingLevel?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
188
193
|
}, z.core.$ZodTypeInternals<ProfileEntry, string | string[] | {
|
|
189
194
|
model?: string | undefined;
|
|
190
195
|
models?: string | string[] | undefined;
|
|
191
|
-
thinkingLevel?: "off" | "
|
|
196
|
+
thinkingLevel?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
192
197
|
}>>>, z.ZodTransform<Record<string, ProfileEntry>, Record<string, ProfileEntry>>>;
|
|
193
198
|
}, z.core.$strict>;
|
|
194
199
|
export type ModelOverride = z.infer<typeof modelOverrideSchema>;
|
|
@@ -197,11 +202,11 @@ export declare const modelOverridesSchema: z.ZodDefault<z.ZodRecord<z.ZodString,
|
|
|
197
202
|
models: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodType<ProfileEntry, string | string[] | {
|
|
198
203
|
model?: string | undefined;
|
|
199
204
|
models?: string | string[] | undefined;
|
|
200
|
-
thinkingLevel?: "off" | "
|
|
205
|
+
thinkingLevel?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
201
206
|
}, z.core.$ZodTypeInternals<ProfileEntry, string | string[] | {
|
|
202
207
|
model?: string | undefined;
|
|
203
208
|
models?: string | string[] | undefined;
|
|
204
|
-
thinkingLevel?: "off" | "
|
|
209
|
+
thinkingLevel?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
205
210
|
}>>>, z.ZodTransform<Record<string, ProfileEntry>, Record<string, ProfileEntry>>>;
|
|
206
211
|
}, z.core.$strict>>>;
|
|
207
212
|
export type ProfileEntry = {
|
|
@@ -233,11 +238,11 @@ export declare const configSchema: z.ZodObject<{
|
|
|
233
238
|
models: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodType<ProfileEntry, string | string[] | {
|
|
234
239
|
model?: string | undefined;
|
|
235
240
|
models?: string | string[] | undefined;
|
|
236
|
-
thinkingLevel?: "off" | "
|
|
241
|
+
thinkingLevel?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
237
242
|
}, z.core.$ZodTypeInternals<ProfileEntry, string | string[] | {
|
|
238
243
|
model?: string | undefined;
|
|
239
244
|
models?: string | string[] | undefined;
|
|
240
|
-
thinkingLevel?: "off" | "
|
|
245
|
+
thinkingLevel?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
241
246
|
}>>>, z.ZodTransform<Record<string, ProfileEntry>, Record<string, ProfileEntry>>>;
|
|
242
247
|
}, z.core.$strict>>>;
|
|
243
248
|
mounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -711,6 +716,10 @@ export declare const configSchema: z.ZodObject<{
|
|
|
711
716
|
githubCli: z.ZodDefault<z.ZodObject<{
|
|
712
717
|
importHostAuth: z.ZodDefault<z.ZodBoolean>;
|
|
713
718
|
}, z.core.$strip>>;
|
|
719
|
+
typevault: z.ZodDefault<z.ZodObject<{
|
|
720
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
721
|
+
promptPort: z.ZodDefault<z.ZodNumber>;
|
|
722
|
+
}, z.core.$strict>>;
|
|
714
723
|
logs: z.ZodDefault<z.ZodObject<{
|
|
715
724
|
retentionDays: z.ZodDefault<z.ZodNumber>;
|
|
716
725
|
}, z.core.$strip>>;
|
|
@@ -1342,6 +1342,48 @@ export declare const KNOWN_PROVIDERS: {
|
|
|
1342
1342
|
};
|
|
1343
1343
|
};
|
|
1344
1344
|
};
|
|
1345
|
+
readonly exaone: {
|
|
1346
|
+
readonly id: "exaone";
|
|
1347
|
+
readonly name: "LG EXAONE";
|
|
1348
|
+
readonly baseUrl: "https://api.exaone.ai/v1";
|
|
1349
|
+
readonly auth: readonly ["api-key"];
|
|
1350
|
+
readonly apiKeyEnv: "EXAONE_API_KEY";
|
|
1351
|
+
readonly oauthProviderId: null;
|
|
1352
|
+
readonly models: {
|
|
1353
|
+
readonly 'k-exaone_v2.5': {
|
|
1354
|
+
readonly id: "k-exaone_v2.5";
|
|
1355
|
+
readonly name: "K-EXAONE 2.5";
|
|
1356
|
+
readonly api: "openai-completions";
|
|
1357
|
+
readonly provider: "exaone";
|
|
1358
|
+
readonly baseUrl: "https://api.exaone.ai/v1";
|
|
1359
|
+
readonly reasoning: true;
|
|
1360
|
+
readonly thinkingLevelMap: {
|
|
1361
|
+
readonly off: "low";
|
|
1362
|
+
readonly minimal: "low";
|
|
1363
|
+
readonly low: "low";
|
|
1364
|
+
readonly medium: "high";
|
|
1365
|
+
readonly high: "high";
|
|
1366
|
+
readonly xhigh: "max";
|
|
1367
|
+
};
|
|
1368
|
+
readonly input: ["text"];
|
|
1369
|
+
readonly cost: {
|
|
1370
|
+
readonly input: 0;
|
|
1371
|
+
readonly output: 0;
|
|
1372
|
+
readonly cacheRead: 0;
|
|
1373
|
+
readonly cacheWrite: 0;
|
|
1374
|
+
};
|
|
1375
|
+
readonly contextWindow: 524288;
|
|
1376
|
+
readonly maxTokens: 524288;
|
|
1377
|
+
readonly compat: {
|
|
1378
|
+
readonly supportsStore: false;
|
|
1379
|
+
readonly supportsDeveloperRole: false;
|
|
1380
|
+
readonly supportsReasoningEffort: true;
|
|
1381
|
+
readonly supportsStrictMode: false;
|
|
1382
|
+
readonly maxTokensField: "max_tokens";
|
|
1383
|
+
};
|
|
1384
|
+
};
|
|
1385
|
+
};
|
|
1386
|
+
};
|
|
1345
1387
|
};
|
|
1346
1388
|
export type KnownProviderId = keyof typeof KNOWN_PROVIDERS;
|
|
1347
1389
|
export declare const KNOWN_PROVIDER_VENDORS: {
|
|
@@ -1425,6 +1467,11 @@ export declare const KNOWN_PROVIDER_VENDORS: {
|
|
|
1425
1467
|
readonly name: "Inception (Mercury)";
|
|
1426
1468
|
readonly providers: readonly ["inception"];
|
|
1427
1469
|
};
|
|
1470
|
+
readonly exaone: {
|
|
1471
|
+
readonly id: "exaone";
|
|
1472
|
+
readonly name: "LG EXAONE";
|
|
1473
|
+
readonly providers: readonly ["exaone"];
|
|
1474
|
+
};
|
|
1428
1475
|
readonly opengateway: {
|
|
1429
1476
|
readonly id: "opengateway";
|
|
1430
1477
|
readonly name: "OpenGateway";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { SessionOrigin } from "../agent/session-origin.js";
|
|
2
|
+
import type { GetGithubSelf } from "../channels/github-token-bridge.js";
|
|
2
3
|
import type { PermissionService } from "../permissions/permissions.js";
|
|
3
4
|
import { EvalKernel } from "./kernel.js";
|
|
4
5
|
export declare function authorityOrigin(origin: SessionOrigin | undefined): unknown;
|
|
5
6
|
export declare function createSandboxedEvalKernel(options: {
|
|
7
|
+
readonly getGithubSelf?: GetGithubSelf;
|
|
6
8
|
readonly agentDir: string;
|
|
7
9
|
readonly sessionId: string;
|
|
8
10
|
readonly permissions: PermissionService;
|
|
@@ -3,6 +3,8 @@ export type GitIdentity = {
|
|
|
3
3
|
email: string;
|
|
4
4
|
};
|
|
5
5
|
export declare function resolveGitIdentity(cwd: string): Promise<GitIdentity | null>;
|
|
6
|
+
export declare function ensureGitIdentity(cwd: string): Promise<GitIdentity | null>;
|
|
7
|
+
export declare function isFallbackGitIdentity(cwd: string, identity: GitIdentity): Promise<boolean>;
|
|
6
8
|
declare function withoutGitOverrides(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
7
9
|
export declare const _internal: {
|
|
8
10
|
withoutGitOverrides: typeof withoutGitOverrides;
|
|
@@ -6,6 +6,7 @@ export type BuildDockerfileOptions = {
|
|
|
6
6
|
baseImageVersion?: string | null;
|
|
7
7
|
cjkFontsAuto?: boolean;
|
|
8
8
|
buildKit?: boolean;
|
|
9
|
+
typevault?: boolean;
|
|
9
10
|
};
|
|
10
11
|
export declare const CURL_IMPERSONATE_VERSION = "v1.5.6";
|
|
11
12
|
export declare const CURL_IMPERSONATE_SHA256_AMD64 = "b60344f63b9ed8806f0e9f7fd357d9f6c9a82aca279ed1e9e257d544885dcbde";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GitignoreConfig } from "../config/config.js";
|
|
2
2
|
export declare const GITIGNORE_FILE = ".gitignore";
|
|
3
3
|
export declare const TRULY_IGNORED_PATTERNS: readonly [".gitstore/", ".env", ".env.local", "secrets.json", "auth.json", ".typeclaw/", "node_modules/", "packages/*/node_modules/", "workspace/", "public/", "mounts/", "Dockerfile", ".DS_Store"];
|
|
4
|
-
export declare const SYSTEM_MANAGED_ROOTS: readonly ["sessions/", "memory/", "channels/", "todo/", "cron/"];
|
|
4
|
+
export declare const SYSTEM_MANAGED_ROOTS: readonly ["sessions/", "memory/", "channels/", "todo/", "cron/", ".typevault/"];
|
|
5
5
|
export declare function buildGitignore(config?: GitignoreConfig): string;
|
|
@@ -14,6 +14,7 @@ export declare const CORE_PERMISSIONS: {
|
|
|
14
14
|
readonly fsSeePrivate: "fs.see.private";
|
|
15
15
|
readonly fsSeeSecrets: "fs.see.secrets";
|
|
16
16
|
readonly browserShared: "browser.shared";
|
|
17
|
+
readonly vaultUse: "vault.use";
|
|
17
18
|
};
|
|
18
19
|
export declare const OWNER_SECURITY_WILDCARD = "__BUILTIN_OWNER_SECURITY_WILDCARD__";
|
|
19
20
|
export type BuiltinRoleSpec = {
|
|
@@ -23,6 +23,8 @@ export type ToolLogger = {
|
|
|
23
23
|
export type ToolContext = {
|
|
24
24
|
signal: AbortSignal | undefined;
|
|
25
25
|
sessionId: string;
|
|
26
|
+
readonly origin?: SessionOrigin;
|
|
27
|
+
readonly entryId?: string;
|
|
26
28
|
agentDir: string;
|
|
27
29
|
logger: ToolLogger;
|
|
28
30
|
};
|
|
@@ -49,6 +51,7 @@ export type SubagentContext<P = unknown> = {
|
|
|
49
51
|
};
|
|
50
52
|
export type RunSession = (override?: {
|
|
51
53
|
userPrompt?: string;
|
|
54
|
+
systemPrompt?: string;
|
|
52
55
|
onFinalMessage?: (message: string | null) => void;
|
|
53
56
|
}) => Promise<void>;
|
|
54
57
|
export type Subagent<P = unknown> = SubagentShared<P> & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const BROWSER_PROFILE_RELATIVE_DIR = ".typeclaw/browser-profile";
|
|
2
|
-
export declare const RUNTIME_OWNED_SECRET_DIRS: readonly ["workspace/.agent-messenger", ".typeclaw/home", ".typeclaw/logs", ".typeclaw/browser-profile"];
|
|
2
|
+
export declare const RUNTIME_OWNED_SECRET_DIRS: readonly ["workspace/.agent-messenger", ".typeclaw/home", ".typeclaw/logs", ".typeclaw/browser-profile", ".typeclaw/typevault", ".typevault"];
|
|
3
3
|
export declare const OPERATOR_CLI_CREDENTIAL_DIRS: readonly ["workspace/.config/gws", "workspace/.config/agent-messenger"];
|
|
4
|
-
export declare const CANONICAL_AGENT_SECRET_DIRS: readonly ["workspace/.config/gws", "workspace/.config/agent-messenger", "workspace/.agent-messenger", ".typeclaw/home", ".typeclaw/logs", ".typeclaw/browser-profile"];
|
|
4
|
+
export declare const CANONICAL_AGENT_SECRET_DIRS: readonly ["workspace/.config/gws", "workspace/.config/agent-messenger", "workspace/.agent-messenger", ".typeclaw/home", ".typeclaw/logs", ".typeclaw/browser-profile", ".typeclaw/typevault", ".typevault"];
|
|
5
5
|
export declare const CANONICAL_AGENT_SECRET_FILES: readonly [".env", "secrets.json", "auth.json"];
|
|
6
6
|
export declare const CONTAINER_RUNTIME_HOME = "/home/agent";
|
|
7
7
|
export declare const CANONICAL_HOME_SECRET_DIRS: readonly [".ssh", ".config/gh", ".config/gws", ".config/agent-messenger", ".agent-messenger", ".codex", ".claude"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type SandboxedCommand } from "./build.js";
|
|
2
2
|
import { type SandboxPolicy, type SandboxProcStrategy } from "./policy.js";
|
|
3
3
|
export declare const CODING_SOURCE = "/typeclaw-coding-source";
|
|
4
|
-
export declare const CODING_MASK_DIRS: readonly ["workspace/.config/gws", "workspace/.config/agent-messenger", "workspace/.agent-messenger", ".typeclaw/home", ".typeclaw/logs", ".typeclaw/browser-profile", ...(".ssh" | ".config/gh" | ".config/gws" | ".config/agent-messenger" | ".agent-messenger")[], ".typeclaw"];
|
|
4
|
+
export declare const CODING_MASK_DIRS: readonly ["workspace/.config/gws", "workspace/.config/agent-messenger", "workspace/.agent-messenger", ".typeclaw/home", ".typeclaw/logs", ".typeclaw/browser-profile", ".typeclaw/typevault", ".typevault", ...(".ssh" | ".config/gh" | ".config/gws" | ".config/agent-messenger" | ".agent-messenger")[], ".typeclaw"];
|
|
5
5
|
export declare const CODING_MASK_FILES: readonly [".env", "secrets.json", "auth.json", ".gitconfig", ".claude.json", ".netrc", ".typeclaw/incidents.json", ".typeclaw/coding-agent-tasks.json", ".claude/.credentials.json", ".codex/auth.json"];
|
|
6
6
|
export declare function codingSourceMaskDirs(source: string, taskRoot: string): readonly string[];
|
|
7
7
|
export type CodingSandboxOptions = {
|
|
@@ -15,5 +15,6 @@ export declare function reconcileDependencyBinWrappers(options: {
|
|
|
15
15
|
agentDir: string;
|
|
16
16
|
sessionTmp: string;
|
|
17
17
|
baselineDirs?: readonly string[];
|
|
18
|
+
runtimeBins?: Readonly<Record<string, string>>;
|
|
18
19
|
}): Promise<DependencyBinReconciliation>;
|
|
19
20
|
export declare function dependencyBinUnavailableHint(command: string, reconciliation: DependencyBinReconciliation): string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SandboxMount } from "./policy.js";
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function resolveDevSourceMounts(agentDir: string, moduleFile?: string): Promise<Extract<SandboxMount, {
|
|
3
3
|
type: 'ro-bind';
|
|
4
|
-
}>
|
|
4
|
+
}>[]>;
|
|
@@ -6,6 +6,7 @@ export type HiddenPaths = {
|
|
|
6
6
|
};
|
|
7
7
|
export declare function resolveHiddenPaths(permissions: PermissionService, origin: SessionOrigin | undefined, agentDir: string): HiddenPaths;
|
|
8
8
|
export declare function canWriteAgentRootInSandbox(permissions: PermissionService, origin: SessionOrigin | undefined): boolean;
|
|
9
|
+
export declare function canSeePrivateSurface(permissions: PermissionService, origin: SessionOrigin | undefined): boolean;
|
|
9
10
|
export declare function ensureHiddenMaskTargets(hidden: HiddenPaths): Promise<HiddenPaths>;
|
|
10
11
|
export declare function verifyHiddenMaskTargets(hidden: HiddenPaths): Promise<void>;
|
|
11
12
|
export declare function rejectHardlinkAliases(root: string, maxEntries?: number): Promise<void>;
|
|
@@ -2,7 +2,7 @@ export { buildSandboxedCommand, type SandboxedCommand } from "./build.js";
|
|
|
2
2
|
export { CANONICAL_AGENT_SECRET_DIRS, CANONICAL_AGENT_SECRET_FILES, CANONICAL_HOME_SECRET_DIRS, CANONICAL_HOME_SECRET_FILES, CONTAINER_RUNTIME_HOME, OPERATOR_CLI_CREDENTIAL_DIRS, RUNTIME_OWNED_SECRET_DIRS, } from "./canonical-secrets.js";
|
|
3
3
|
export { CANONICAL_AGENT_RUNTIME_PRIVATE_FILES } from "./runtime-private.js";
|
|
4
4
|
export { buildProcBindProbeScript, canBindProcSafely, canMountRealProc, ensureBwrapAvailable, getProcBindSafetyVerdict, PROC_BIND_RETRY_BACKOFF_MS, resolveProcBindSafetyWithRetry, resolveProcSelfExe, type ProcBindSafetyVerdict, _resetBwrapAvailabilityCacheForTests, _resetProcBindProbeCacheForTests, _resetRealProcProbeCacheForTests, } from "./availability.js";
|
|
5
|
-
export { canWriteAgentRootInSandbox, ensureHiddenMaskTargets, resolveHiddenPaths, verifyHiddenMaskTargets, type HiddenPaths, } from "./hidden-paths.js";
|
|
5
|
+
export { canSeePrivateSurface, canWriteAgentRootInSandbox, ensureHiddenMaskTargets, resolveHiddenPaths, verifyHiddenMaskTargets, type HiddenPaths, } from "./hidden-paths.js";
|
|
6
6
|
export { resolveProtectedZones, resolveWritableZones, isGitControlPath, subtractMasked, type ProtectedZones, type WritableZones, } from "./writable-zones.js";
|
|
7
7
|
export { resolveSandboxSymlinks, type SandboxSymlinkSpec } from "./symlinks.js";
|
|
8
8
|
export { commandNeedsRealProc } from "./package-install.js";
|
|
@@ -61,6 +61,9 @@ export type SandboxPolicy = {
|
|
|
61
61
|
masks?: SandboxMaskPolicy;
|
|
62
62
|
writable?: SandboxWritablePolicy;
|
|
63
63
|
protected?: SandboxProtectedPolicy;
|
|
64
|
+
reveal?: Extract<SandboxMount, {
|
|
65
|
+
type: 'ro-bind' | 'tmpfs';
|
|
66
|
+
}>[];
|
|
64
67
|
symlinks?: SandboxSymlinkOp[];
|
|
65
68
|
network?: SandboxNetwork;
|
|
66
69
|
env?: SandboxEnvPolicy;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const TYPEVAULT_SECRETS_MARKER: {
|
|
2
|
+
readonly $comment: "TypeClaw keeps this agent's secrets in its TypeVault vault (.typevault/). Set typevault.enabled to false in typeclaw.json and run \"typeclaw restart\" to restore this file.";
|
|
3
|
+
readonly version: "typevault";
|
|
4
|
+
};
|
|
5
|
+
export declare function typevaultMarkerText(): string;
|
|
6
|
+
export declare function isTypevaultMarker(raw: string): boolean;
|
|
7
|
+
export declare function isTypevaultMarkerFile(secretsPath: string): boolean;
|
|
8
|
+
export declare function readEnvelopeTextSync(agentDir: string, fetch?: (agentDir: string) => string): string;
|
|
9
|
+
export declare function writeEnvelopeTextSync(agentDir: string, text: string): void;
|
|
10
|
+
export declare function entriesStamp(agentDir: string): string;
|
|
11
|
+
export declare function runHelperSync(agentDir: string, op: 'read' | 'write', input?: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type TypevaultReconcileResult = {
|
|
2
|
+
action: 'unchanged';
|
|
3
|
+
} | {
|
|
4
|
+
action: 'enabled';
|
|
5
|
+
} | {
|
|
6
|
+
action: 'resumed';
|
|
7
|
+
} | {
|
|
8
|
+
action: 'restored';
|
|
9
|
+
} | {
|
|
10
|
+
action: 'skipped';
|
|
11
|
+
warning: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function reconcileTypevault(agentDir: string, enabled: boolean): Promise<TypevaultReconcileResult>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type Access } from 'typevault';
|
|
2
|
+
import { type AdminClient } from 'typevault/admin';
|
|
3
|
+
export declare const TYPEVAULT_VAULT_RELATIVE_DIR = ".typevault";
|
|
4
|
+
export declare const TYPEVAULT_STATE_RELATIVE_DIR = ".typeclaw/typevault";
|
|
5
|
+
export declare const RUNTIME_TIER = "runtime";
|
|
6
|
+
export declare function typevaultDir(agentDir: string): string;
|
|
7
|
+
export declare function vaultExists(agentDir: string): boolean;
|
|
8
|
+
export declare const TYPEVAULT_HOST_ID = "typeclaw-agent";
|
|
9
|
+
export declare function clearLegacyDaemonClaims(agentDir: string): void;
|
|
10
|
+
export declare function typevaultEnv(agentDir: string, base?: NodeJS.ProcessEnv): Record<string, string>;
|
|
11
|
+
export declare function provisionVault(agentDir: string): Promise<void>;
|
|
12
|
+
export declare function readSecretsEntry(agentDir: string): Promise<string | undefined>;
|
|
13
|
+
export declare function requireSecretsEntry(agentDir: string): Promise<string>;
|
|
14
|
+
export declare function writeSecretsEntry(agentDir: string, text: string): Promise<void>;
|
|
15
|
+
export declare const ROLE_TIER_TOWER: readonly ["owner", "trusted", "member", "guest"];
|
|
16
|
+
export declare function isRoleTier(name: string): boolean;
|
|
17
|
+
export declare function ensureRoleTiers(agentDir: string, roles: readonly string[]): Promise<string[]>;
|
|
18
|
+
export declare function vaultAdmin(agentDir: string, options?: {
|
|
19
|
+
promptPort?: number;
|
|
20
|
+
}): AdminClient;
|
|
21
|
+
export declare function grantAccess(agentDir: string, grant: string): Promise<Access>;
|
|
22
|
+
export declare function agentSocketPath(agentDir: string, configRoot: string): string;
|
|
23
|
+
export declare function runtimeConfigRoot(agentDir: string): string;
|
|
24
|
+
export declare function projectIdentityPath(agentDir: string): string;
|
|
25
|
+
export declare function ensureProjectIdentity(agentDir: string, name: string): Promise<void>;
|
|
26
|
+
export declare function projectMemberName(containerName: string | undefined): string;
|
|
27
|
+
export declare function openVault(agentDir: string): Promise<Access>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typeclaw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.0",
|
|
4
4
|
"homepage": "https://github.com/typeclaw/typeclaw#readme",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/typeclaw/typeclaw/issues"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"format": "oxfmt --write .",
|
|
44
44
|
"format:check": "oxfmt --check .",
|
|
45
45
|
"check": "bun run typecheck && bun run lint && bun run format:check",
|
|
46
|
-
"test": "bun test
|
|
46
|
+
"test": "bun run scripts/test.ts",
|
|
47
47
|
"dev:docs": "cd docs && bun run dev",
|
|
48
48
|
"generate:schema": "bun run scripts/generate-schema.ts",
|
|
49
49
|
"debug:prompt": "bun run scripts/dump-system-prompt.ts",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@clack/core": "^1.2.0",
|
|
54
54
|
"@clack/prompts": "^1.2.0",
|
|
55
|
-
"@earendil-works/pi-agent-core": "
|
|
56
|
-
"@earendil-works/pi-ai": "
|
|
57
|
-
"@earendil-works/pi-coding-agent": "
|
|
58
|
-
"@earendil-works/pi-tui": "
|
|
55
|
+
"@earendil-works/pi-agent-core": "1.5.0",
|
|
56
|
+
"@earendil-works/pi-ai": "1.5.0",
|
|
57
|
+
"@earendil-works/pi-coding-agent": "1.5.0",
|
|
58
|
+
"@earendil-works/pi-tui": "1.5.0",
|
|
59
59
|
"@huggingface/transformers": "4.2.0",
|
|
60
60
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
61
61
|
"@mozilla/readability": "^0.6.0",
|
|
62
|
-
"agent-messenger": "^2.
|
|
62
|
+
"agent-messenger": "^2.43.0",
|
|
63
63
|
"cheerio": "^1.2.0",
|
|
64
64
|
"citty": "^0.2.2",
|
|
65
65
|
"cron-parser": "^5.5.0",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"tough-cookie": "^6.0.2",
|
|
71
71
|
"turndown": "^7.2.4",
|
|
72
72
|
"typebox": "1.3.27",
|
|
73
|
+
"typevault": "0.5.0",
|
|
73
74
|
"zod": "^4.3.6"
|
|
74
75
|
},
|
|
75
76
|
"devDependencies": {
|