triss-coworker 0.41.0 → 0.41.1

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 (128) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/README.md +4 -3
  3. package/bin/triss.js +4 -0
  4. package/docs/security-model.md +3 -1
  5. package/package.json +7 -3
  6. package/src/agent-rule-markers.js +3 -0
  7. package/src/agent-rules.js +3 -0
  8. package/src/call-context.js +3 -0
  9. package/src/cli-argv.js +3 -0
  10. package/src/client.js +3 -0
  11. package/src/coder-credential-proxy.js +3 -0
  12. package/src/coder-engine-registry.js +3 -0
  13. package/src/coder-engines/crush.js +3 -0
  14. package/src/coder-engines/omp.js +3 -0
  15. package/src/coder-engines/opencode2.js +3 -0
  16. package/src/coder-git-mediator.js +3 -0
  17. package/src/coder-lease.js +3 -0
  18. package/src/coder-lock.js +3 -0
  19. package/src/coder-models.js +3 -0
  20. package/src/coder-orchestration.js +3 -0
  21. package/src/coder-process-supervisor.js +3 -0
  22. package/src/coder-providers.js +3 -0
  23. package/src/coder-result-owner-adapter.js +3 -0
  24. package/src/coder-result-quarantine.js +3 -0
  25. package/src/coder-result-registry-codec.js +3 -0
  26. package/src/coder-result-transitions.js +3 -0
  27. package/src/coder-result.js +3 -0
  28. package/src/coder-run-state.js +3 -0
  29. package/src/coder-sandbox.js +3 -0
  30. package/src/coder-session-engines.js +3 -0
  31. package/src/coder-session-inventory-codec.js +3 -0
  32. package/src/coder-session-owner-adapter.js +3 -0
  33. package/src/coder-session-slots.js +3 -0
  34. package/src/coder-session-store.js +3 -0
  35. package/src/coder-session-transitions.js +3 -0
  36. package/src/coder-state-backup.js +3 -0
  37. package/src/coder-state.js +3 -0
  38. package/src/coder-write-quota.js +3 -0
  39. package/src/commands/agent-help.js +3 -0
  40. package/src/commands/ask.js +3 -0
  41. package/src/commands/chat.js +3 -0
  42. package/src/commands/coder-models.js +3 -0
  43. package/src/commands/coder-state-backup.js +3 -0
  44. package/src/commands/coder.js +3 -0
  45. package/src/commands/commit-msg.js +3 -0
  46. package/src/commands/completion.js +3 -0
  47. package/src/commands/config.js +3 -0
  48. package/src/commands/exec.js +3 -0
  49. package/src/commands/extract.js +3 -0
  50. package/src/commands/fetch.js +3 -0
  51. package/src/commands/init.js +3 -0
  52. package/src/commands/mcp.js +3 -0
  53. package/src/commands/review.js +3 -0
  54. package/src/commands/status.js +3 -0
  55. package/src/commands/update.js +3 -0
  56. package/src/commands/usage.js +3 -0
  57. package/src/commands/write.js +3 -0
  58. package/src/config-defaults.js +3 -0
  59. package/src/config.js +3 -0
  60. package/src/fixed-kernel-lock.js +3 -0
  61. package/src/git.js +3 -0
  62. package/src/integrations/_atlassian.js +3 -0
  63. package/src/integrations/_contract.js +3 -0
  64. package/src/integrations/_registry.js +3 -0
  65. package/src/integrations/confluence/client.js +3 -0
  66. package/src/integrations/confluence/commands.js +3 -0
  67. package/src/integrations/confluence/index.js +3 -0
  68. package/src/integrations/github/client.js +3 -0
  69. package/src/integrations/github/commands.js +3 -0
  70. package/src/integrations/github/index.js +3 -0
  71. package/src/integrations/gitlab/client.js +3 -0
  72. package/src/integrations/gitlab/commands.js +4 -1
  73. package/src/integrations/gitlab/index.js +3 -0
  74. package/src/integrations/jira/adf.js +3 -0
  75. package/src/integrations/jira/client.js +3 -0
  76. package/src/integrations/jira/commands.js +3 -0
  77. package/src/integrations/jira/index.js +3 -0
  78. package/src/integrations/linear/client.js +3 -0
  79. package/src/integrations/linear/commands.js +3 -0
  80. package/src/integrations/linear/index.js +3 -0
  81. package/src/managed-root.js +3 -0
  82. package/src/marker-transaction.js +3 -0
  83. package/src/mcp/handlers.js +3 -0
  84. package/src/mcp/install.js +3 -0
  85. package/src/mcp/review-core.js +3 -0
  86. package/src/mcp/server.js +3 -0
  87. package/src/mcp/tools.js +3 -0
  88. package/src/models.js +3 -0
  89. package/src/moonshot.js +3 -0
  90. package/src/net-dns-worker.js +3 -0
  91. package/src/net.js +3 -0
  92. package/src/opencode-catalogue.js +3 -0
  93. package/src/opencode-config.js +3 -0
  94. package/src/opencode2-preflight.js +3 -0
  95. package/src/option-validation.js +3 -0
  96. package/src/owned-process-journal.js +3 -0
  97. package/src/owned-process-reconcile.js +3 -0
  98. package/src/paths.js +3 -0
  99. package/src/picker.js +3 -0
  100. package/src/provider-errors.js +3 -0
  101. package/src/response-format.js +3 -0
  102. package/src/review-defaults.js +3 -0
  103. package/src/review-executor.js +3 -0
  104. package/src/review-git.js +3 -0
  105. package/src/review-input.js +3 -0
  106. package/src/review-live.js +3 -0
  107. package/src/review-payload.js +3 -0
  108. package/src/review-pr-fetch.js +3 -0
  109. package/src/review-pr-identity.js +3 -0
  110. package/src/review-pr-metadata.js +3 -0
  111. package/src/review-pr-registry.js +3 -0
  112. package/src/review-pr.js +3 -0
  113. package/src/review-prompt.js +3 -0
  114. package/src/review-scoped.js +3 -0
  115. package/src/safety.js +3 -0
  116. package/src/secrets.js +3 -0
  117. package/src/update/artifact.js +3 -0
  118. package/src/update/cache.js +3 -0
  119. package/src/update/install.js +3 -0
  120. package/src/update/integrity.js +3 -0
  121. package/src/update/manifest.js +4 -1
  122. package/src/update/passive.js +6 -2
  123. package/src/usage-schema.js +3 -0
  124. package/src/usage.js +3 -0
  125. package/src/version.js +3 -0
  126. package/src/web.js +3 -0
  127. package/src/worktree-fingerprint.js +3 -0
  128. package/src/zai.js +3 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.41.1] — 2026-08-29
11
+
12
+ ### Fixed
13
+
14
+ - Passive CLI and MCP update checks now allow five seconds for GitHub Release
15
+ redirects and manifest delivery, preventing persistent timeout backoff from
16
+ suppressing update notifications on ordinary network connections.
17
+
18
+ ### Changed
19
+
20
+ - `triss-dsh-provider-bundle` is version-aligned and republished unchanged;
21
+ its OpenCode Zen, OpenCode Go, and Z.AI routes are unchanged.
22
+
23
+ ### Artifact integrity (0.41.1)
24
+
25
+ - `triss-dsh-provider-bundle-0.41.1.tgz` — sha256
26
+ `11937c36ee4627c8704c9cdc0704b16f91cebb5a8fea9ab4c7e81da6c22f73dc`
27
+ — `sha512-sOwR4L1nbWj+goYxnKiYybcxX4hKbjycYk4OE1nDfIa7kVZ2KwOybzqVY8jZtbnaBreWS0fQN9Vn6NmdnD0F/A==`
28
+ (computed with npm pack; the output is byte-deterministic).
29
+ - Root `triss-coworker-0.41.1.tgz` sha256 is reproducible via `npm pack` at
30
+ tag `v0.41.1`; the root tarball ships `CHANGELOG.md`, so its hash cannot be
31
+ recorded inside this file. Registry verification compares the packed
32
+ artifact with the published tarball byte-for-byte.
33
+
10
34
  ## [0.41.0] — 2026-08-28
11
35
 
12
36
  ### Changed
@@ -1738,7 +1762,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1738
1762
 
1739
1763
  - Initial release of `triss-coworker`.
1740
1764
 
1741
- [Unreleased]: https://github.com/ayleen/triss-coworker/compare/v0.41.0...HEAD
1765
+ [Unreleased]: https://github.com/ayleen/triss-coworker/compare/v0.41.1...HEAD
1766
+ [0.41.1]: https://github.com/ayleen/triss-coworker/compare/v0.41.0...v0.41.1
1742
1767
  [0.41.0]: https://github.com/ayleen/triss-coworker/compare/v0.40.0...v0.41.0
1743
1768
  [0.40.0]: https://github.com/ayleen/triss-coworker/compare/v0.39.2...v0.40.0
1744
1769
  [0.39.2]: https://github.com/ayleen/triss-coworker/compare/v0.39.1...v0.39.2
package/README.md CHANGED
@@ -7,6 +7,7 @@
7
7
  [![npm version](https://img.shields.io/npm/v/triss-coworker.svg)](https://www.npmjs.com/package/triss-coworker)
8
8
  [![npm downloads](https://img.shields.io/npm/dm/triss-coworker.svg)](https://www.npmjs.com/package/triss-coworker)
9
9
  [![Tests](https://github.com/ayleen/triss-coworker/actions/workflows/test.yml/badge.svg)](https://github.com/ayleen/triss-coworker/actions/workflows/test.yml)
10
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/14266/badge)](https://www.bestpractices.dev/en/projects/14266)
10
11
  [![Node.js](https://img.shields.io/node/v/triss-coworker.svg)](https://nodejs.org/)
11
12
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
12
13
  [![Changelog](https://img.shields.io/badge/changelog-Keep%20a%20Changelog-orange.svg)](CHANGELOG.md)
@@ -119,9 +120,9 @@ triss status
119
120
 
120
121
  During successful interactive CLI use, Triss checks a fixed GitHub Release
121
122
  endpoint at most once per cache window and prints a throttled update notice to
122
- stderr. A due check is awaited and adds at most 1.1 seconds; a fresh cache adds
123
- no network wait. Long-running MCP servers begin the same check only after the
124
- MCP initialization handshake and use MCP logging plus stderr fallback.
123
+ stderr. A due check is awaited and adds at most 5.1 seconds; a fresh cache adds
124
+ no network wait. Long-running MCP servers begin the same five-second check only
125
+ after the MCP initialization handshake and use MCP logging plus stderr fallback.
125
126
 
126
127
  ```bash
127
128
  triss update # fresh status and guidance; no file changes
package/bin/triss.js CHANGED
@@ -1,4 +1,8 @@
1
1
  #!/usr/bin/env node
2
+
3
+ // SPDX-License-Identifier: MIT
4
+ // Copyright (c) 2026 ayleen
5
+
2
6
  const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(Number);
3
7
  if (nodeMajor < 22 || (nodeMajor === 22 && nodeMinor < 12)) {
4
8
  process.stderr.write(
@@ -9,7 +9,9 @@ provider error contract are documented in the
9
9
  [Reliable Delegation contract](reliable-delegation-contract.md).
10
10
  In short: external content is
11
11
  untrusted, required boundaries fail closed, best-effort isolation is opt-in,
12
- and release artifacts are verified before publication.
12
+ and release artifacts are verified before publication — including
13
+ fail-closed GPG tag-signature checks (see
14
+ [releasing.md](https://github.com/ayleen/triss-coworker/blob/main/docs/releasing.md)).
13
15
 
14
16
  This document does not redefine those sources. Update them together whenever a
15
17
  new provider, automatic network path, child engine, credential route, or
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triss-coworker",
3
- "version": "0.41.0",
3
+ "version": "0.41.1",
4
4
  "description": "Give your AI coding agent a cheap DeepSeek coworker. Delegate bulk reads, boilerplate, and doc updates to save 60-70% of your token budget.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -36,6 +36,7 @@
36
36
  "test": "node scripts/check-lockfile-gate.cjs && npm run test:secure-default && npm run test:best-effort",
37
37
  "test:secure-default": "node scripts/run-tests.js secure-default",
38
38
  "test:best-effort": "node --test test/best-effort-*.test.js",
39
+ "test:coverage": "c8 --include 'src/**' --include 'bin/**' --check-coverage --statements 90 --branches 80 --functions 80 --lines 80 --reporter=text --reporter=text-summary npm test",
39
40
  "start": "node bin/triss.js",
40
41
  "lint": "eslint . --max-warnings=0",
41
42
  "lint:fix": "eslint . --fix",
@@ -44,8 +45,9 @@
44
45
  "check:config-docs": "node scripts/generate-config-defaults.js --check",
45
46
  "check:docs": "npm run check:config-docs && node scripts/check-doc-links.js",
46
47
  "check:package": "node scripts/check-package-contents.js",
47
- "check": "npm run lint && npm run typecheck && npm test && npm run check:docs && npm run check:package",
48
- "prepublishOnly": "npm run check"
48
+ "check": "npm run lint && npm run typecheck && npm test && npm run check:docs && npm run check:package && npm run check:license-headers",
49
+ "prepublishOnly": "npm run check",
50
+ "check:license-headers": "node scripts/check-license-headers.js"
49
51
  },
50
52
  "keywords": [
51
53
  "claude-code",
@@ -95,7 +97,9 @@
95
97
  "devDependencies": {
96
98
  "@deepseek-ai/dsh-app-boot": "^0.1.0-rc.6",
97
99
  "@eslint/js": "^10.0.1",
100
+ "c8": "^12.0.0",
98
101
  "eslint": "^10.3.0",
102
+ "fast-check": "^4.9.0",
99
103
  "globals": "^17.6.0"
100
104
  }
101
105
  }
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  // The Triss managed-block markers, isolated in their own tiny module so the
2
5
  // marker transaction primitive can reference them without pulling in
3
6
  // agent-rules.js — which itself depends on the MCP install module. Without
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  // Shared agent-rules rendering. Used by `triss init` (writes the nano block
2
5
  // into CLAUDE.md / AGENTS.md) and by `triss agent-help` (prints the full
3
6
  // cookbook on demand). The split keeps the always-loaded block tiny while
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  // Per-invocation call context propagated via AsyncLocalStorage.
2
5
  //
3
6
  // Each CLI subcommand or MCP tool handler runs inside `withCall(fn)`; any
package/src/cli-argv.js CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  export function isExecExplainInvocation(argv = []) {
2
5
  if (argv[0] !== 'exec') return false;
3
6
  const commandArgs = argv.slice(1);
package/src/client.js CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import OpenAI from 'openai';
2
5
  import pc from 'picocolors';
3
6
  import {
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-credential-proxy.js — parent-owned loopback
3
6
  * credential proxy.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-engine-registry.js — canonical engine registry for triss coder.
3
6
  *
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  // Crush adapter behind `triss coder run --engine
2
5
  // crush`. See docs/engines/crush.md for the supported configuration, safety
3
6
  // boundaries, and upstream limitations this adapter must preserve.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  // OMP adapter — the FOURTH coding engine (Oh My Pi) behind
2
5
  // `triss coder run --engine omp`. See docs/engines/omp.md and
3
6
  // docs/omp-engine-plan.md for the verified facts this adapter follows.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  // opencode2 adapter — the THIRD coding engine (OpenCode 2 beta) behind
2
5
  // `triss coder run --engine opencode2`. See docs/opencode2-engine-plan.md for
3
6
  // the verified facts this adapter follows. Scope mirrors crush.js: PURE
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-git-mediator.js — bounded Git mediator.
3
6
  *
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-lease.js — fixed kernel locks and coder
3
6
  * leases.
package/src/coder-lock.js CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import {
2
5
  chmodSync,
3
6
  closeSync,
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  // src/coder-models.js — shared model-management service.
2
5
  //
3
6
  // Extracts provider/model resolution and auditing into a testable in-process
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-orchestration.js — OpenCode run and envelope
3
6
  * orchestration helpers (pure).
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-process-supervisor.js — complete descendant
3
6
  * supervisor primitive (best-effort).
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  const freeze = (value) => Object.freeze(value);
2
5
 
3
6
  // This name is deliberately stable and owned by Triss. It is used only in
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-result-owner-adapter.js — retained-result
3
6
  * process-owner adapter.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-result-quarantine.js — quarantine
3
6
  * transaction and quarantine clean.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-result-registry-codec.js — retained-result
3
6
  * registry codec.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-result-transitions.js — retained-result
3
6
  * transitions and deletion.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-result.js — pure coder result and lifecycle
3
6
  * contract.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-run-state.js — coder run-state and rollback
3
6
  * composition.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-sandbox.js — filesystem and network
3
6
  * capability adapter.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-session-engines.js — the canonical v2 coder session engine enum.
3
6
  *
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-session-inventory-codec.js — project-worktree
3
6
  * session inventory codec.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-session-owner-adapter.js — session
3
6
  * process-owner adapter.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * Project-wide persistent-session slot authority.
3
6
  *
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-session-store.js — bounded per-session
3
6
  * generation store.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-session-transitions.js — session admission
3
6
  * and inventory transitions.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-state-backup.js — rollback backup
3
6
  * orchestrator.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-state.js — metadata persistence and cleanup
3
6
  * lifecycle.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-write-quota.js — aggregate writable quota
3
6
  * adapter (best-effort).
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  // Print the full Triss delegation cookbook to stdout. The nano block in
2
5
  // CLAUDE.md / AGENTS.md points here so the agent loads the long reference
3
6
  // only when it actually needs to look something up — saving the per-session
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import pc from 'picocolors';
2
5
  import { chat, chatStream, reportUsage, responseText } from '../client.js';
3
6
  import { assertProviderText } from '../provider-errors.js';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import pc from 'picocolors';
2
5
  import { chat, chatStream, reportUsage } from '../client.js';
3
6
  import { resolveModel } from '../models.js';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  // src/commands/coder-models.js — CLI handlers for `triss coder models` (live
2
5
  // read-only model listing) and `triss coder model set` (persistent model
3
6
  // switch). These are the Phase 4 command surfaces wired in bin/triss.js.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * coder-state-backup.js (commands) — CLI run
3
6
  * functions for `triss coder state backup` and `triss coder state validate`.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  // `triss coder` — delegate coding tasks to a GLM agent. opencode is the
2
5
  // default engine (deny-first bash policy); crush is an optional second
3
6
  // engine behind --engine crush / TRISS_CODER_ENGINE=crush (single JSON
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import { spawnSync } from 'node:child_process';
2
5
  import pc from 'picocolors';
3
6
  import { chat, reportUsage } from '../client.js';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  // Shell-completion generator. Walks the Commander tree and emits a
2
5
  // completion script for bash or zsh. The generated scripts complete:
3
6
  // - top-level command names
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import { spawnSync } from 'node:child_process';
2
5
  import { existsSync } from 'node:fs';
3
6
  import pc from 'picocolors';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import pc from 'picocolors';
2
5
  import { runAsk, validateAskOptions } from './ask.js';
3
6
  import { runReview, validateReviewOptions } from './review.js';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import { readFileSync, writeFileSync } from 'node:fs';
2
5
  import pc from 'picocolors';
3
6
  import { assertSafePath } from '../safety.js';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import pc from 'picocolors';
2
5
  import { fetchAsMarkdown } from '../web.js';
3
6
  import { summarize, printResult } from '../integrations/_contract.js';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import { mkdirSync } from 'node:fs';
2
5
  import { homedir } from 'node:os';
3
6
  import { dirname, join } from 'node:path';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import pc from 'picocolors';
2
5
  import { runServer } from '../mcp/server.js';
3
6
  import {
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import pc from 'picocolors';
2
5
  import { chat, chatStream, reportUsage, responseText } from '../client.js';
3
6
  import { assertProviderText } from '../provider-errors.js';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import pc from 'picocolors';
2
5
  import { getConfig } from '../config.js';
3
6
  import { listPresets, describeGlmRouting, describeKimiRouting } from '../models.js';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import { computeRetainedStats, journalDigest, receiptDigest } from '../update/install.js';
2
5
 
3
6
  function parseVersion(value) {
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import pc from 'picocolors';
2
5
  import { readLog, summarize, parsePeriod, clearLog, USAGE_FILE } from '../usage.js';
3
6
 
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import { readFileSync, writeFileSync, mkdirSync } from 'node:fs';
2
5
  import { dirname } from 'node:path';
3
6
  import pc from 'picocolors';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  export const CONFIG_DEFAULTS = Object.freeze({
2
5
  TRISS_UPDATE_CHECK: Object.freeze({
3
6
  value: 'enabled',
package/src/config.js CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import dotenv from 'dotenv';
2
5
  import { readFileSync } from 'node:fs';
3
6
  import { activeEnvFiles } from './secrets.js';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  /**
2
5
  * fixed-kernel-lock.js — fixed lock capability
3
6
  * primitive.
package/src/git.js CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import { spawnSync } from 'node:child_process';
2
5
 
3
6
  function run(cmd, args, opts = {}) {
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  // Shared Atlassian (Jira + Confluence) auth and request helper.
2
5
  // Both products live on the same Cloud tenant and share the same triple
3
6
  // of env vars; centralising avoids drift if Atlassian changes auth.
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import pc from 'picocolors';
2
5
  import { chat, reportUsage } from '../client.js';
3
6
  import { resolveModel } from '../models.js';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import { readdirSync, statSync, existsSync } from 'node:fs';
2
5
  import { dirname, join, resolve } from 'node:path';
3
6
  import { fileURLToPath, pathToFileURL } from 'node:url';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import { ATLASSIAN_ENV, atlassianConfig, atlassianCall } from '../_atlassian.js';
2
5
 
3
6
  export const ENV = ATLASSIAN_ENV;
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import pc from 'picocolors';
2
5
  import { confluence, textToStorage } from './client.js';
3
6
  import { adfToText } from '../jira/adf.js';
@@ -1,3 +1,6 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2026 ayleen
3
+
1
4
  import { searchCmd, pageCmd, createCmd, updateCmd, spacesCmd } from './commands.js';
2
5
 
3
6
  const CLAUDE_INSTRUCTIONS = `### \`triss confluence\` — Atlassian Confluence