@pleaseai/work 0.1.3 → 0.1.5
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/README.md +10 -1
- package/dist/index.js +89 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -410,9 +410,10 @@ Your prompt template goes here. Available variables:
|
|
|
410
410
|
- {{ issue.description }} — Issue body/description
|
|
411
411
|
- {{ issue.state }} — Current tracker state name
|
|
412
412
|
- {{ issue.url }} — Issue URL
|
|
413
|
-
- {{ issue.
|
|
413
|
+
- {{ issue.assignees }} — Array of assignee logins (GitHub) or emails (Asana)
|
|
414
414
|
- {{ issue.labels }} — Array of label strings (normalized to lowercase)
|
|
415
415
|
- {{ issue.blocked_by }} — Array of blocker refs (each has id, identifier, state)
|
|
416
|
+
- {{ issue.pull_requests }} — Array of linked PRs (each has number, title, url, state, branch_name)
|
|
416
417
|
- {{ issue.priority }} — Numeric priority or null
|
|
417
418
|
- {{ issue.created_at }} — ISO-8601 creation timestamp
|
|
418
419
|
- {{ issue.updated_at }} — ISO-8601 last-updated timestamp
|
|
@@ -437,6 +438,14 @@ Blocked by:
|
|
|
437
438
|
{% endfor %}
|
|
438
439
|
{% endif %}
|
|
439
440
|
|
|
441
|
+
{% if issue.pull_requests.size > 0 %}
|
|
442
|
+
Linked pull requests:
|
|
443
|
+
{% for pr in issue.pull_requests %}
|
|
444
|
+
- PR #{{ pr.number }}: {{ pr.title }} ({{ pr.state }}){% if pr.branch_name %} — branch: {{ pr.branch_name }}{% endif %}{% if pr.url %} — {{ pr.url }}{% endif %}
|
|
445
|
+
|
|
446
|
+
{% endfor %}
|
|
447
|
+
{% endif %}
|
|
448
|
+
|
|
440
449
|
{% if attempt %}
|
|
441
450
|
Retry attempt: {{ attempt }}
|
|
442
451
|
{% endif %}
|
package/dist/index.js
CHANGED
|
@@ -2162,6 +2162,55 @@ var {
|
|
|
2162
2162
|
Option,
|
|
2163
2163
|
Help
|
|
2164
2164
|
} = import__.default;
|
|
2165
|
+
// package.json
|
|
2166
|
+
var package_default = {
|
|
2167
|
+
name: "@pleaseai/work",
|
|
2168
|
+
type: "module",
|
|
2169
|
+
version: "0.1.5",
|
|
2170
|
+
description: "Symphony-spec orchestrator for Claude Code + Asana/GitHub Projects v2",
|
|
2171
|
+
license: "FSL-1.1-MIT",
|
|
2172
|
+
repository: {
|
|
2173
|
+
type: "git",
|
|
2174
|
+
url: "https://github.com/pleaseai/work-please.git",
|
|
2175
|
+
directory: "apps/work-please"
|
|
2176
|
+
},
|
|
2177
|
+
bin: {
|
|
2178
|
+
"work-please": "./dist/index.js"
|
|
2179
|
+
},
|
|
2180
|
+
files: [
|
|
2181
|
+
"LICENSE",
|
|
2182
|
+
"README.md",
|
|
2183
|
+
"dist"
|
|
2184
|
+
],
|
|
2185
|
+
scripts: {
|
|
2186
|
+
prepublishOnly: "cp ../../LICENSE ../../README.md .",
|
|
2187
|
+
postpublish: "rm -f LICENSE README.md",
|
|
2188
|
+
build: "bun build ./src/index.ts --outdir ./dist --target bun && bun run scripts/add-shebang.ts",
|
|
2189
|
+
dev: "bun run --watch src/index.ts",
|
|
2190
|
+
lint: "eslint .",
|
|
2191
|
+
"lint:fix": "eslint . --fix",
|
|
2192
|
+
check: "tsc --noEmit",
|
|
2193
|
+
test: "bun test",
|
|
2194
|
+
"test:coverage": "bun test --coverage --coverage-reporter=lcov"
|
|
2195
|
+
},
|
|
2196
|
+
dependencies: {
|
|
2197
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.72",
|
|
2198
|
+
"@octokit/auth-app": "^8.2.0",
|
|
2199
|
+
"@octokit/graphql": "^9.0.3",
|
|
2200
|
+
commander: "^14.0.3",
|
|
2201
|
+
"js-yaml": "^4.1.1",
|
|
2202
|
+
liquidjs: "^10.25.0",
|
|
2203
|
+
zod: "^4.3.6"
|
|
2204
|
+
},
|
|
2205
|
+
devDependencies: {
|
|
2206
|
+
"@antfu/eslint-config": "^7.7.0",
|
|
2207
|
+
"@types/js-yaml": "^4.0.9",
|
|
2208
|
+
"@types/node": "^25.4.0",
|
|
2209
|
+
"bun-types": "^1.3.10",
|
|
2210
|
+
eslint: "^10.0.3",
|
|
2211
|
+
typescript: "^5.7.0"
|
|
2212
|
+
}
|
|
2213
|
+
};
|
|
2165
2214
|
|
|
2166
2215
|
// src/init.ts
|
|
2167
2216
|
import { existsSync, writeFileSync } from "fs";
|
|
@@ -31668,6 +31717,9 @@ class AppServerClient {
|
|
|
31668
31717
|
if (this.config.claude.command !== "claude") {
|
|
31669
31718
|
options.pathToClaudeCodeExecutable = this.config.claude.command;
|
|
31670
31719
|
}
|
|
31720
|
+
if (this.config.claude.model) {
|
|
31721
|
+
options.model = this.config.claude.model;
|
|
31722
|
+
}
|
|
31671
31723
|
const toolSpecs = getToolSpecs(this.config);
|
|
31672
31724
|
if (toolSpecs.length > 0) {
|
|
31673
31725
|
options.mcpServers = {
|
|
@@ -31828,6 +31880,7 @@ function buildConfig(workflow) {
|
|
|
31828
31880
|
max_concurrent_agents_by_state: stateLimitsValue(agent.max_concurrent_agents_by_state)
|
|
31829
31881
|
},
|
|
31830
31882
|
claude: {
|
|
31883
|
+
model: stringValue(claude.model),
|
|
31831
31884
|
command: commandValue(claude.command) ?? DEFAULTS2.CLAUDE_COMMAND,
|
|
31832
31885
|
permission_mode: stringValue(claude.permission_mode) ?? DEFAULTS2.CLAUDE_PERMISSION_MODE,
|
|
31833
31886
|
allowed_tools: stringArrayValue(claude.allowed_tools, DEFAULTS2.CLAUDE_ALLOWED_TOOLS),
|
|
@@ -36880,6 +36933,7 @@ function issueToTemplateVars(issue2) {
|
|
|
36880
36933
|
url: issue2.url,
|
|
36881
36934
|
labels: issue2.labels,
|
|
36882
36935
|
blocked_by: issue2.blocked_by,
|
|
36936
|
+
pull_requests: issue2.pull_requests,
|
|
36883
36937
|
created_at: issue2.created_at?.toISOString() ?? null,
|
|
36884
36938
|
updated_at: issue2.updated_at?.toISOString() ?? null
|
|
36885
36939
|
};
|
|
@@ -37042,6 +37096,7 @@ function createAsanaAdapter(config2) {
|
|
|
37042
37096
|
assignees: [],
|
|
37043
37097
|
labels: [],
|
|
37044
37098
|
blocked_by: [],
|
|
37099
|
+
pull_requests: [],
|
|
37045
37100
|
created_at: null,
|
|
37046
37101
|
updated_at: null
|
|
37047
37102
|
});
|
|
@@ -37072,6 +37127,7 @@ function normalizeAsanaTask(task, sectionName) {
|
|
|
37072
37127
|
assignees,
|
|
37073
37128
|
labels,
|
|
37074
37129
|
blocked_by: blockedBy,
|
|
37130
|
+
pull_requests: [],
|
|
37075
37131
|
created_at: task.created_at ? new Date(String(task.created_at)) : null,
|
|
37076
37132
|
updated_at: task.modified_at ? new Date(String(task.modified_at)) : null
|
|
37077
37133
|
};
|
|
@@ -37135,12 +37191,16 @@ function createGitHubAdapter(config2) {
|
|
|
37135
37191
|
labels(first: 20) { nodes { name } }
|
|
37136
37192
|
assignees(first: 10) { nodes { login } }
|
|
37137
37193
|
createdAt updatedAt
|
|
37194
|
+
closedByPullRequestsReferences(first: 10, includeClosedPrs: true) {
|
|
37195
|
+
nodes { number title url state headRefName }
|
|
37196
|
+
}
|
|
37138
37197
|
}
|
|
37139
37198
|
... on PullRequest {
|
|
37140
37199
|
number title body url
|
|
37141
37200
|
labels(first: 20) { nodes { name } }
|
|
37142
37201
|
assignees(first: 10) { nodes { login } }
|
|
37143
37202
|
createdAt updatedAt
|
|
37203
|
+
headRefName
|
|
37144
37204
|
}
|
|
37145
37205
|
}
|
|
37146
37206
|
}
|
|
@@ -37167,12 +37227,16 @@ function createGitHubAdapter(config2) {
|
|
|
37167
37227
|
labels(first: 20) { nodes { name } }
|
|
37168
37228
|
assignees(first: 10) { nodes { login } }
|
|
37169
37229
|
createdAt updatedAt
|
|
37230
|
+
closedByPullRequestsReferences(first: 10, includeClosedPrs: true) {
|
|
37231
|
+
nodes { number title url state headRefName }
|
|
37232
|
+
}
|
|
37170
37233
|
}
|
|
37171
37234
|
... on PullRequest {
|
|
37172
37235
|
number title body url
|
|
37173
37236
|
labels(first: 20) { nodes { name } }
|
|
37174
37237
|
assignees(first: 10) { nodes { login } }
|
|
37175
37238
|
createdAt updatedAt
|
|
37239
|
+
headRefName
|
|
37176
37240
|
}
|
|
37177
37241
|
}
|
|
37178
37242
|
}
|
|
@@ -37204,12 +37268,16 @@ function createGitHubAdapter(config2) {
|
|
|
37204
37268
|
labels(first: 20) { nodes { name } }
|
|
37205
37269
|
assignees(first: 10) { nodes { login } }
|
|
37206
37270
|
createdAt updatedAt
|
|
37271
|
+
closedByPullRequestsReferences(first: 10, includeClosedPrs: true) {
|
|
37272
|
+
nodes { number title url state headRefName }
|
|
37273
|
+
}
|
|
37207
37274
|
}
|
|
37208
37275
|
... on PullRequest {
|
|
37209
37276
|
number title body url
|
|
37210
37277
|
labels(first: 20) { nodes { name } }
|
|
37211
37278
|
assignees(first: 10) { nodes { login } }
|
|
37212
37279
|
createdAt updatedAt
|
|
37280
|
+
headRefName
|
|
37213
37281
|
}
|
|
37214
37282
|
}
|
|
37215
37283
|
}
|
|
@@ -37337,6 +37405,10 @@ function buildQueryString(filter2) {
|
|
|
37337
37405
|
parts.push(`label:${filter2.label.join(",")}`);
|
|
37338
37406
|
return parts.join(" ");
|
|
37339
37407
|
}
|
|
37408
|
+
function normalizePrState(raw2) {
|
|
37409
|
+
const s2 = String(raw2 ?? "").toLowerCase();
|
|
37410
|
+
return s2 === "closed" || s2 === "merged" ? s2 : "open";
|
|
37411
|
+
}
|
|
37340
37412
|
function normalizeProjectItem(node, status) {
|
|
37341
37413
|
const content = node.content;
|
|
37342
37414
|
const number4 = content?.number;
|
|
@@ -37344,6 +37416,15 @@ function normalizeProjectItem(node, status) {
|
|
|
37344
37416
|
const labels = Array.isArray(content?.labels?.nodes) ? content.labels.nodes.map((l) => (l.name ?? "").toLowerCase()).filter(Boolean) : [];
|
|
37345
37417
|
const assigneeNodes = content?.assignees?.nodes;
|
|
37346
37418
|
const assignees = Array.isArray(assigneeNodes) ? assigneeNodes.map((n2) => n2.login ?? "").filter(Boolean) : [];
|
|
37419
|
+
const prRefNodes = content?.closedByPullRequestsReferences?.nodes;
|
|
37420
|
+
const pullRequests = Array.isArray(prRefNodes) ? prRefNodes.filter((pr) => pr !== null && typeof pr === "object" && typeof pr.number === "number" && pr.number > 0).map((pr) => ({
|
|
37421
|
+
number: pr.number,
|
|
37422
|
+
title: String(pr.title ?? ""),
|
|
37423
|
+
url: pr.url ? String(pr.url) : null,
|
|
37424
|
+
state: normalizePrState(pr.state),
|
|
37425
|
+
branch_name: pr.headRefName ? String(pr.headRefName) : null
|
|
37426
|
+
})) : [];
|
|
37427
|
+
const headRefName = content?.headRefName ? String(content.headRefName) : null;
|
|
37347
37428
|
return {
|
|
37348
37429
|
id: String(node.id ?? ""),
|
|
37349
37430
|
identifier,
|
|
@@ -37351,11 +37432,12 @@ function normalizeProjectItem(node, status) {
|
|
|
37351
37432
|
description: content?.body ? String(content.body) : null,
|
|
37352
37433
|
priority: null,
|
|
37353
37434
|
state: status,
|
|
37354
|
-
branch_name:
|
|
37435
|
+
branch_name: headRefName,
|
|
37355
37436
|
url: content?.url ? String(content.url) : null,
|
|
37356
37437
|
assignees,
|
|
37357
37438
|
labels,
|
|
37358
37439
|
blocked_by: [],
|
|
37440
|
+
pull_requests: pullRequests,
|
|
37359
37441
|
created_at: content?.createdAt ? new Date(String(content.createdAt)) : null,
|
|
37360
37442
|
updated_at: content?.updatedAt ? new Date(String(content.updatedAt)) : null
|
|
37361
37443
|
};
|
|
@@ -41134,6 +41216,8 @@ function esc2(s2) {
|
|
|
41134
41216
|
// src/cli.ts
|
|
41135
41217
|
async function runCli(argv) {
|
|
41136
41218
|
const parsed = parseArgs(argv.slice(2));
|
|
41219
|
+
if (parsed.command === "version")
|
|
41220
|
+
return;
|
|
41137
41221
|
if (parsed.command === "init") {
|
|
41138
41222
|
await runInit(parsed.initOptions);
|
|
41139
41223
|
return;
|
|
@@ -41197,6 +41281,7 @@ function parseArgs(args) {
|
|
|
41197
41281
|
initOptions: null
|
|
41198
41282
|
};
|
|
41199
41283
|
const program2 = new Command;
|
|
41284
|
+
program2.version(package_default.version);
|
|
41200
41285
|
program2.exitOverride();
|
|
41201
41286
|
program2.allowUnknownOption();
|
|
41202
41287
|
program2.allowExcessArguments(true);
|
|
@@ -41220,7 +41305,9 @@ function parseArgs(args) {
|
|
|
41220
41305
|
program2.parse(["node", "work-please", ...args]);
|
|
41221
41306
|
} catch (err) {
|
|
41222
41307
|
if (err instanceof CommanderError) {
|
|
41223
|
-
|
|
41308
|
+
if (err.code === "commander.version")
|
|
41309
|
+
return { ...result, command: "version" };
|
|
41310
|
+
const informational = new Set(["commander.help", "commander.helpDisplayed"]);
|
|
41224
41311
|
if (informational.has(err.code))
|
|
41225
41312
|
return result;
|
|
41226
41313
|
console.error(err.message);
|