tasqmate 0.4.0 → 0.5.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/tasqmate.js +28 -15
- package/package.json +2 -2
package/dist/tasqmate.js
CHANGED
|
@@ -6581,6 +6581,7 @@ function toTasqmateError(status, body, retryAfterHeader) {
|
|
|
6581
6581
|
|
|
6582
6582
|
// ../sdk/src/client.ts
|
|
6583
6583
|
var PROJECT_UPDATES_PAGE_MAX = 100;
|
|
6584
|
+
var RUN_HEADER = "x-tasqmate-run";
|
|
6584
6585
|
function assertPrefix(token, prefix, label2) {
|
|
6585
6586
|
if (!token.startsWith(prefix)) {
|
|
6586
6587
|
throw new Error(
|
|
@@ -6614,6 +6615,7 @@ var TasqmateClient = class _TasqmateClient {
|
|
|
6614
6615
|
#baseUrl;
|
|
6615
6616
|
#token;
|
|
6616
6617
|
#fetch;
|
|
6618
|
+
#runId;
|
|
6617
6619
|
/** A client with no credential, for the two anonymous auth calls. */
|
|
6618
6620
|
static anonymous(baseUrl, fetchImpl) {
|
|
6619
6621
|
return new _TasqmateClient({ baseUrl, fetch: fetchImpl });
|
|
@@ -6622,6 +6624,7 @@ var TasqmateClient = class _TasqmateClient {
|
|
|
6622
6624
|
this.#baseUrl = normaliseBaseUrl(options.baseUrl);
|
|
6623
6625
|
this.#token = credential(options.auth);
|
|
6624
6626
|
this.#fetch = options.fetch ?? globalThis.fetch;
|
|
6627
|
+
this.#runId = options.runId === void 0 || options.runId === "" ? void 0 : options.runId;
|
|
6625
6628
|
}
|
|
6626
6629
|
async #request(path, init = {}) {
|
|
6627
6630
|
const { anonymous = false, timeoutMs, ...requestInit } = init;
|
|
@@ -6629,6 +6632,7 @@ var TasqmateClient = class _TasqmateClient {
|
|
|
6629
6632
|
if (!anonymous) {
|
|
6630
6633
|
if (this.#token === void 0) throw noCredentialError();
|
|
6631
6634
|
headers.set("authorization", `Bearer ${this.#token}`);
|
|
6635
|
+
if (this.#runId !== void 0) headers.set(RUN_HEADER, this.#runId);
|
|
6632
6636
|
}
|
|
6633
6637
|
if (requestInit.body !== void 0 && !headers.has("content-type")) {
|
|
6634
6638
|
headers.set("content-type", "application/json");
|
|
@@ -7342,6 +7346,10 @@ function reportError(error48, io2) {
|
|
|
7342
7346
|
return EXIT_RATE_LIMITED;
|
|
7343
7347
|
}
|
|
7344
7348
|
if (error48 instanceof TasqmatePolicyDeniedError) {
|
|
7349
|
+
if (error48.policyVersion === void 0 && error48.message !== "") {
|
|
7350
|
+
io2.err(`${error48.message.replace(/\.$/, "")}.`);
|
|
7351
|
+
return EXIT_POLICY_DENIED;
|
|
7352
|
+
}
|
|
7345
7353
|
const version2 = error48.policyVersion ?? "?";
|
|
7346
7354
|
const action = error48.action ?? "this action";
|
|
7347
7355
|
io2.err(`Policy v${version2} does not allow ${action}.`);
|
|
@@ -7365,7 +7373,7 @@ function reportError(error48, io2) {
|
|
|
7365
7373
|
// package.json
|
|
7366
7374
|
var package_default = {
|
|
7367
7375
|
name: "tasqmate",
|
|
7368
|
-
version: "0.
|
|
7376
|
+
version: "0.5.0",
|
|
7369
7377
|
description: "Command-line client for Tasqmate, for humans and agents alike. Installs the tasqmate and tasqmate commands.",
|
|
7370
7378
|
keywords: [
|
|
7371
7379
|
"tasqmate",
|
|
@@ -22425,8 +22433,8 @@ var PARENT_SESSION_VARS = [
|
|
|
22425
22433
|
"CLAUDE_CODE_SSE_PORT",
|
|
22426
22434
|
"CLAUDE_PID"
|
|
22427
22435
|
];
|
|
22428
|
-
function runEnvironment(base,
|
|
22429
|
-
const env = { ...base, ...
|
|
22436
|
+
function runEnvironment(base, tasqmateEnv2) {
|
|
22437
|
+
const env = { ...base, ...tasqmateEnv2, CLAUDE_AGENT_SDK_CLIENT_APP: "tasqmate-bridge" };
|
|
22430
22438
|
for (const name of PARENT_SESSION_VARS) delete env[name];
|
|
22431
22439
|
return env;
|
|
22432
22440
|
}
|
|
@@ -22601,7 +22609,7 @@ function claudeAdapter(sdk) {
|
|
|
22601
22609
|
// src/bridge/adapters/codex.ts
|
|
22602
22610
|
import { spawn } from "child_process";
|
|
22603
22611
|
import { createInterface as createInterface2 } from "readline";
|
|
22604
|
-
var CODEX_MCP_ENV = ["TASQMATE_API_KEY", "TASQMATE_API_URL", "TASQMATE_WORKSPACE"];
|
|
22612
|
+
var CODEX_MCP_ENV = ["TASQMATE_API_KEY", "TASQMATE_API_URL", "TASQMATE_WORKSPACE", "TASQMATE_RUN_ID"];
|
|
22605
22613
|
var responseSchema = external_exports.object({
|
|
22606
22614
|
id: external_exports.union([external_exports.number(), external_exports.string()]),
|
|
22607
22615
|
result: external_exports.json().optional(),
|
|
@@ -24178,7 +24186,10 @@ function buildChatPrompt(input) {
|
|
|
24178
24186
|
"## Rules",
|
|
24179
24187
|
[
|
|
24180
24188
|
"- Your final message is posted in the chat as your reply. Answer there, in plain Markdown; do not post the answer as a comment.",
|
|
24181
|
-
`- Use the ${tools} tools to read and change things in Tasqmate when the request needs it (
|
|
24189
|
+
`- Use the ${tools} tools to read and change things in Tasqmate when the request needs it: create and edit tasks (\`task_create_many\` for several), docs, projects, milestones, labels, initiatives and cycles. What you change shows in the workspace's activity like any teammate's work.`,
|
|
24190
|
+
"- Before a wide or hard-to-undo change (archiving, or more than about ten items at once), say what you will do and wait for a yes. Otherwise just do it.",
|
|
24191
|
+
`- Tasqmate decides what you may do: your policy, and for projects, milestones, labels, initiatives and cycles, whether ${person} could do it themselves. If a tool is refused, don't retry; say what was refused and why.`,
|
|
24192
|
+
'- In your reply, name what you made or changed by its key or name (ENG-42, "Q1 launch"), so it can be found.',
|
|
24182
24193
|
...input.harness === "hermes_acp" ? [
|
|
24183
24194
|
"- Edit files only inside your working folder; edits anywhere else are refused. Commands that need approval are refused on this bridge; if you need one, say what and why in your reply instead."
|
|
24184
24195
|
] : [
|
|
@@ -24363,6 +24374,7 @@ async function trackRun(deps, event) {
|
|
|
24363
24374
|
}
|
|
24364
24375
|
}
|
|
24365
24376
|
return {
|
|
24377
|
+
runId,
|
|
24366
24378
|
step: reporter === null ? noSteps : reporter.push,
|
|
24367
24379
|
stopSignal: stop.signal,
|
|
24368
24380
|
get stopped() {
|
|
@@ -24382,6 +24394,15 @@ async function trackRun(deps, event) {
|
|
|
24382
24394
|
}
|
|
24383
24395
|
};
|
|
24384
24396
|
}
|
|
24397
|
+
function tasqmateEnv(deps, slug, tracker) {
|
|
24398
|
+
const env = {
|
|
24399
|
+
TASQMATE_API_KEY: deps.key,
|
|
24400
|
+
TASQMATE_API_URL: deps.config.apiUrl,
|
|
24401
|
+
TASQMATE_WORKSPACE: slug
|
|
24402
|
+
};
|
|
24403
|
+
if (tracker.runId !== null) env.TASQMATE_RUN_ID = tracker.runId;
|
|
24404
|
+
return env;
|
|
24405
|
+
}
|
|
24385
24406
|
function stopSignals(deps, tracker) {
|
|
24386
24407
|
return deps.signal === void 0 ? tracker.stopSignal : AbortSignal.any([deps.signal, tracker.stopSignal]);
|
|
24387
24408
|
}
|
|
@@ -24460,11 +24481,7 @@ async function handleChat(deps, event, chat) {
|
|
|
24460
24481
|
cwd: folder.folder,
|
|
24461
24482
|
harnessPath: config2.harnessPath,
|
|
24462
24483
|
mcp: config2.mcpCommand,
|
|
24463
|
-
tasqmateEnv:
|
|
24464
|
-
TASQMATE_API_KEY: deps.key,
|
|
24465
|
-
TASQMATE_API_URL: config2.apiUrl,
|
|
24466
|
-
TASQMATE_WORKSPACE: slug
|
|
24467
|
-
},
|
|
24484
|
+
tasqmateEnv: tasqmateEnv(deps, slug, tracker),
|
|
24468
24485
|
maxTurns: deps.limiter.limits.maxTurns,
|
|
24469
24486
|
resumeSessionId,
|
|
24470
24487
|
guard: createGuard(folder.folder),
|
|
@@ -24577,11 +24594,7 @@ async function handle(deps, event) {
|
|
|
24577
24594
|
cwd: folder.folder,
|
|
24578
24595
|
harnessPath: config2.harnessPath,
|
|
24579
24596
|
mcp: config2.mcpCommand,
|
|
24580
|
-
tasqmateEnv:
|
|
24581
|
-
TASQMATE_API_KEY: deps.key,
|
|
24582
|
-
TASQMATE_API_URL: config2.apiUrl,
|
|
24583
|
-
TASQMATE_WORKSPACE: slug
|
|
24584
|
-
},
|
|
24597
|
+
tasqmateEnv: tasqmateEnv(deps, slug, tracker),
|
|
24585
24598
|
maxTurns: deps.limiter.limits.maxTurns,
|
|
24586
24599
|
guard: createGuard(folder.folder),
|
|
24587
24600
|
signal,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tasqmate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Command-line client for Tasqmate, for humans and agents alike. Installs the tasqmate and tasqmate commands.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tasqmate",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"zod": "4.3.6"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@tasqmate/sdk": "0.
|
|
54
|
+
"@tasqmate/sdk": "0.5.0",
|
|
55
55
|
"@types/bun": "^1.3.12",
|
|
56
56
|
"tsup": "^8.5.0",
|
|
57
57
|
"typescript": "^5.7.2"
|