@pleaseai/work 0.1.2 → 0.1.4

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.
Files changed (2) hide show
  1. package/dist/index.js +85 -6
  2. package/package.json +1 -1
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.4",
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";
@@ -36906,6 +36955,31 @@ function matchesFilter(issue2, filter2) {
36906
36955
  function isTrackerError(val) {
36907
36956
  return typeof val === "object" && val !== null && "code" in val;
36908
36957
  }
36958
+ function serializeCause(cause) {
36959
+ if (cause instanceof Error)
36960
+ return cause.message;
36961
+ if (typeof cause === "string")
36962
+ return cause;
36963
+ try {
36964
+ return JSON.stringify(cause) ?? String(cause);
36965
+ } catch {
36966
+ return String(cause);
36967
+ }
36968
+ }
36969
+ function formatTrackerError(err) {
36970
+ switch (err.code) {
36971
+ case "github_projects_api_status":
36972
+ case "asana_api_status":
36973
+ return `${err.code} (HTTP ${err.status})`;
36974
+ case "github_projects_graphql_errors":
36975
+ return `${err.code}: ${JSON.stringify(err.errors)}`;
36976
+ case "github_projects_api_request":
36977
+ case "asana_api_request":
36978
+ return `${err.code}: ${serializeCause(err.cause)}`;
36979
+ default:
36980
+ return err.code;
36981
+ }
36982
+ }
36909
36983
 
36910
36984
  // src/tracker/asana.ts
36911
36985
  var PAGE_SIZE = 50;
@@ -40415,13 +40489,13 @@ class Orchestrator {
40415
40489
  }
40416
40490
  const adapter = createTrackerAdapter(this.config);
40417
40491
  if (isTrackerError(adapter)) {
40418
- console.error(`[orchestrator] tracker adapter error: ${adapter.code}`);
40492
+ console.error(`[orchestrator] tracker adapter error: ${formatTrackerError(adapter)}`);
40419
40493
  this.scheduleTick(this.state.poll_interval_ms);
40420
40494
  return;
40421
40495
  }
40422
40496
  const candidatesResult = await adapter.fetchCandidateIssues();
40423
40497
  if (isTrackerError(candidatesResult)) {
40424
- console.error(`[orchestrator] tracker fetch failed: ${candidatesResult.code}`);
40498
+ console.error(`[orchestrator] tracker fetch failed: ${formatTrackerError(candidatesResult)}`);
40425
40499
  this.scheduleTick(this.state.poll_interval_ms);
40426
40500
  return;
40427
40501
  }
@@ -40692,7 +40766,7 @@ class Orchestrator {
40692
40766
  return;
40693
40767
  const refreshed = await adapter.fetchIssueStatesByIds(runningIds);
40694
40768
  if (isTrackerError(refreshed)) {
40695
- console.warn(`[orchestrator] state refresh failed: ${refreshed.code} \u2014 keeping workers running`);
40769
+ console.warn(`[orchestrator] state refresh failed: ${formatTrackerError(refreshed)} \u2014 keeping workers running`);
40696
40770
  return;
40697
40771
  }
40698
40772
  const activeStates = getActiveStates(this.config);
@@ -40736,12 +40810,12 @@ class Orchestrator {
40736
40810
  const terminalStates = getTerminalStates(this.config);
40737
40811
  const adapter = createTrackerAdapter(this.config);
40738
40812
  if (isTrackerError(adapter)) {
40739
- console.warn(`[orchestrator] startup cleanup: adapter error ${adapter.code}`);
40813
+ console.warn(`[orchestrator] startup cleanup: adapter error ${formatTrackerError(adapter)}`);
40740
40814
  return;
40741
40815
  }
40742
40816
  const result = await adapter.fetchIssuesByStates(terminalStates);
40743
40817
  if (isTrackerError(result)) {
40744
- console.warn(`[orchestrator] startup terminal cleanup failed: ${result.code}`);
40818
+ console.warn(`[orchestrator] startup terminal cleanup failed: ${formatTrackerError(result)}`);
40745
40819
  return;
40746
40820
  }
40747
40821
  for (const issue2 of result) {
@@ -41109,6 +41183,8 @@ function esc2(s2) {
41109
41183
  // src/cli.ts
41110
41184
  async function runCli(argv) {
41111
41185
  const parsed = parseArgs(argv.slice(2));
41186
+ if (parsed.command === "version")
41187
+ return;
41112
41188
  if (parsed.command === "init") {
41113
41189
  await runInit(parsed.initOptions);
41114
41190
  return;
@@ -41172,6 +41248,7 @@ function parseArgs(args) {
41172
41248
  initOptions: null
41173
41249
  };
41174
41250
  const program2 = new Command;
41251
+ program2.version(package_default.version);
41175
41252
  program2.exitOverride();
41176
41253
  program2.allowUnknownOption();
41177
41254
  program2.allowExcessArguments(true);
@@ -41195,7 +41272,9 @@ function parseArgs(args) {
41195
41272
  program2.parse(["node", "work-please", ...args]);
41196
41273
  } catch (err) {
41197
41274
  if (err instanceof CommanderError) {
41198
- const informational = new Set(["commander.help", "commander.helpDisplayed", "commander.version"]);
41275
+ if (err.code === "commander.version")
41276
+ return { ...result, command: "version" };
41277
+ const informational = new Set(["commander.help", "commander.helpDisplayed"]);
41199
41278
  if (informational.has(err.code))
41200
41279
  return result;
41201
41280
  console.error(err.message);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pleaseai/work",
3
3
  "type": "module",
4
- "version": "0.1.2",
4
+ "version": "0.1.4",
5
5
  "description": "Symphony-spec orchestrator for Claude Code + Asana/GitHub Projects v2",
6
6
  "license": "FSL-1.1-MIT",
7
7
  "repository": {