openplanr 1.25.0 → 1.25.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.25.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9d3407e`](https://github.com/openplanr/OpenPlanr/commit/9d3407e49d7bb7dc829839559b119ffb7a01aa0a) Close the operate defects a live board cycle surfaced.
8
+
9
+ The v1.4 mandate disclosed the frozen v1.2 response schema while enforcing v1.4,
10
+ so an advisor that followed the disclosed contract failed validation every time —
11
+ the self-describing contract was confidently wrong rather than merely absent. The
12
+ disclosure is now resolved from the mandate's own `responseSchema`, bundled
13
+ self-contained, and bounded to what a v1.4 action can express.
14
+
15
+ Recording an advisor result discarded the whole result on any secret detection,
16
+ including the soft categories meant to be redacted rather than blocked; a
17
+ legitimate analysis was rejected for quoting a public workflow permission line.
18
+ The record paths now block only on hard categories and report every offending
19
+ field at once.
20
+
21
+ `status`, `review`, and the cycle report claimed a quiet board and a reached
22
+ review gate while a cycle sat in `advising` with recorded actions on disk. A
23
+ blocked second binding was handed the command that had just failed as its
24
+ recovery. `inspect` advertised the frozen artifact-envelope version instead of
25
+ the protocol mandates are enforced at.
26
+
27
+ ## 1.25.1
28
+
29
+ ### Patch Changes
30
+
31
+ - [`7d3bf2c`](https://github.com/openplanr/OpenPlanr/commit/7d3bf2c4c04a91f94b97aca1f47d503bc6291589) Fix `planr setup` failing against the published plugin tuple.
32
+
33
+ The CLI pins its pipeline sibling exactly in `optionalDependencies`, and at
34
+ runtime resolves the installed copy's version to decide which Claude plugin
35
+ version to expect — compared by strict equality. The 1.25.0 release shipped that
36
+ pin at `0.40.0` while publishing alongside pipeline `0.41.0`, so every `planr
37
+ setup` on a correctly-installed machine failed `E_CLAUDE_PLUGIN_UPDATE_FAILED`
38
+ and rolled back, reporting the user's newer plugin as drift. The skills plugin
39
+ target was stale for the same reason (`1.26.0`, published `1.26.1`), silently
40
+ omitting it from prescriptions.
41
+
42
+ Both pins now track the released tuple, and a new parity guard compares the
43
+ declared pin against the pipeline revision the environment resolves — the same
44
+ guard the skills bundle already had, which is why the release canary caught its
45
+ stale pin and nothing caught this one. No existing test could: the suites set
46
+ `OPENPLANR_PIPELINE_ROOT` to a source checkout, which bypasses the node_modules
47
+ resolution the pin governs.
48
+
3
49
  ## 1.25.0
4
50
 
5
51
  ### Minor Changes
@@ -8,7 +8,7 @@ export declare const OPENPLANR_CLAUDE_MARKETPLACE_SOURCE = "openplanr/marketplac
8
8
  * were current. Bumping it with each skills release is the interim contract; deriving it
9
9
  * from the published manifest instead is tracked separately.
10
10
  */
11
- export declare const OPENPLANR_SKILLS_VERSION = "1.26.0";
11
+ export declare const OPENPLANR_SKILLS_VERSION = "1.26.1";
12
12
  export type ClaudePluginOperationKind = 'add-marketplace' | 'refresh-marketplace' | 'install' | 'update' | 'enable';
13
13
  export interface ClaudePluginOperation {
14
14
  runtime: 'claude-code';
@@ -11,7 +11,7 @@ export const OPENPLANR_CLAUDE_MARKETPLACE_SOURCE = 'openplanr/marketplace';
11
11
  * were current. Bumping it with each skills release is the interim contract; deriving it
12
12
  * from the published manifest instead is tracked separately.
13
13
  */
14
- export const OPENPLANR_SKILLS_VERSION = '1.26.0';
14
+ export const OPENPLANR_SKILLS_VERSION = '1.26.1';
15
15
  /**
16
16
  * `OPENPLANR_CLAUDE_BIN` is a test seam of the same shape as `upgrade-service.ts`'s
17
17
  * `OPENPLANR_NPM_BIN`: a path to a Node script standing in for the `claude` binary, so a
@@ -145,7 +145,9 @@ export interface AgentNativeAdvisorResponse {
145
145
  */
146
146
  export declare function routeKindToProposalType(routeKind: string): 'finding' | 'decision';
147
147
  interface AdvisorBriefRegistrySource {
148
- createOperatingAdvisorBrief(roleId: string): OperatingAdvisorBrief;
148
+ createOperatingAdvisorBrief(roleId: string, options?: {
149
+ protocolVersion?: string;
150
+ }): OperatingAdvisorBrief;
149
151
  listOperatingRoles(): Array<Record<string, unknown> & {
150
152
  id: string;
151
153
  }>;
@@ -304,16 +306,19 @@ export interface OperatingMandate {
304
306
  responseSchema: 'operating-advisor-response@1.3.0' | 'operating-advisor-response@1.4.0';
305
307
  /**
306
308
  * US-T1: the DISCLOSED response contract the runtime must satisfy — the same
307
- * bounds `record` enforces, shipped so an advisor can dereference them instead
308
- * of only a `responseSchema` name it cannot resolve. Serialized verbatim from
309
- * the role's brief output facet (`attachMandateResponseContract`); it introduces
310
- * no new computation. Layered on by OpenPlanr AFTER the pipeline signs
311
- * `mandateDigest` exactly like `researchGuidance` so it never alters the
312
- * signed digest or the immutable mandate the digest pins. Absent only on the
309
+ * contract `record` enforces, shipped so an advisor can dereference it instead
310
+ * of only a `responseSchema` name it cannot resolve
311
+ * (`attachMandateResponseContract`). The response schema is resolved from this
312
+ * mandate's OWN `responseSchema` hence the `schema` field is typed as that
313
+ * exact value, so the compiler itself forbids disclosing a contract other than
314
+ * the enforced one while the per-role bounds come from the brief `record`
315
+ * enforces. Layered on by OpenPlanr AFTER the pipeline signs `mandateDigest` —
316
+ * exactly like `researchGuidance` — so it never alters the signed digest or the
317
+ * immutable mandate the digest pins. Absent only on the
313
318
  * compatibility/pre-disclosure path.
314
319
  */
315
320
  output?: {
316
- schema: OperatingAdvisorBrief['output']['schema'];
321
+ schema: OperatingMandate['responseSchema'];
317
322
  jsonSchema: Record<string, unknown>;
318
323
  allowedProposalTypes: OperatingAdvisorBrief['output']['allowedProposalTypes'];
319
324
  maximumProposals: number;
@@ -401,15 +406,28 @@ export declare function buildOperatingMandate(input: {
401
406
  researchBudgetMs?: number;
402
407
  }): Promise<OperatingMandate>;
403
408
  /**
404
- * US-T1: ship the disclosed response contract INSIDE the dispatched mandate.
405
- * Serializes the role brief's ALREADY-COMPUTED output facet (schema pointer, the
406
- * dereferenceable JSON Schema, allowed proposal types, the per-role proposal cap,
407
- * the output-byte ceiling, and required behaviors) onto the mandate as its
408
- * `output` block no new computation, just disclosure of what `record` already
409
- * enforces. Layered on AFTER the pipeline signs `mandateDigest` (the returned
410
- * object keeps the pipeline's signed digest untouched), exactly like
411
- * `researchGuidance`, so no digest recomputation is required and writer/verifier
412
- * stay in agreement over the immutable, signed mandate the digest pins.
409
+ * US-T1: ship the disclosed response contract INSIDE the dispatched mandate — the
410
+ * dereferenceable response JSON Schema plus the per-role bounds `record` enforces
411
+ * (the proposal cap, the reachable proposal types, the output-byte ceiling, and
412
+ * required behaviors) so a runtime can satisfy the contract instead of guessing
413
+ * at a `responseSchema` name it cannot resolve.
414
+ *
415
+ * DEFECT this closes: the schema was previously taken from the role's pack-style
416
+ * brief. That brief is a compatibility-only projection the pipeline builds for
417
+ * Protocol v1.2/v1.3 sessions and refuses to build for v1.4 at all, so it can
418
+ * never express the v1.4 contract — yet a v1.4 mandate enforcing
419
+ * `operating-advisor-response@1.4.0` disclosed that legacy contract, and an advisor
420
+ * that followed the disclosure literally was rejected by the enforced schema
421
+ * (v1.2 `proposals` where v1.4 requires `analysisMarkdown`/`claims`/`actions`, and
422
+ * a `proposals|quiet` outcome where v1.4 admits `actions|quiet|partial`). The
423
+ * schema is therefore resolved from the mandate's OWN `responseSchema`, which is
424
+ * also the value disclosed as `output.schema` — so the disclosed identity and the
425
+ * enforced one agree by construction, at the type level as well as at runtime.
426
+ *
427
+ * Layered on AFTER the pipeline signs `mandateDigest` (the returned object keeps
428
+ * the pipeline's signed digest untouched), exactly like `researchGuidance`, so no
429
+ * digest recomputation is required and writer/verifier stay in agreement over the
430
+ * immutable, signed mandate the digest pins.
413
431
  */
414
432
  export declare function attachMandateResponseContract(mandate: OperatingMandate, brief: OperatingAdvisorBrief): OperatingMandate;
415
433
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"advisors.d.ts","sourceRoot":"","sources":["../../../src/services/operate/advisors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EAAE,eAAe,EAA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,EAAE,CAAC;KAC/B,CAAC,CAAC;CACJ,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAoPjC;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,KAAK,EAAE;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACxC,SAAS,EAAE,0BAA0B,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAyB9B;AAED,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAY3C;AAuCD;;;;GAIG;AACH,wBAAsB,8BAA8B,CAAC,KAAK,EAAE;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,8BAA8B,CAAC;IACzC,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,yBAAyB,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAqCrE;AAgCD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE;IACrD,MAAM,EAAE,eAAe,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,8BAA8B,CA4DjC"}
@@ -1,4 +1,5 @@
1
1
  import { randomUUID } from 'node:crypto';
2
+ import { readFileSync } from 'node:fs';
2
3
  import { mkdir, readdir, readFile, rename, writeFile } from 'node:fs/promises';
3
4
  import path from 'node:path';
4
5
  import { pathToFileURL } from 'node:url';
@@ -163,6 +164,17 @@ const registryProposalBoundsSchema = z
163
164
  budgets: z.object({ maxActions: z.number().int().positive() }),
164
165
  })
165
166
  .passthrough();
167
+ /**
168
+ * The legacy protocol version OpenPlanr explicitly requests when it needs a role's
169
+ * pack-style brief. The brief supplies ONLY the per-role bounds the record path
170
+ * enforces (the proposal cap, the allowed proposal types, the output-byte ceiling)
171
+ * and the capability tier — never the response contract, which a mandate discloses
172
+ * from its own `responseSchema`. The version is stated rather than defaulted: the
173
+ * pipeline refuses a Protocol v1.4 brief outright and no longer guesses a version,
174
+ * because a silently defaulted one is exactly how a legacy contract reaches a
175
+ * session that never asked for it.
176
+ */
177
+ const LEGACY_ADVISOR_BRIEF_PROTOCOL_VERSION = '1.2.0';
166
178
  /**
167
179
  * The IMAGE of a role's registry `allowedRouteKinds` under `routeKindToProposalType`
168
180
  * — exactly the proposal types an action of one of those route kinds becomes, i.e.
@@ -214,7 +226,9 @@ function deriveRegistryProposalImage(role) {
214
226
  * exactly.
215
227
  */
216
228
  export function createRegistryReconciledAdvisorBrief(protocol, roleId) {
217
- const brief = protocol.createOperatingAdvisorBrief(roleId);
229
+ const brief = protocol.createOperatingAdvisorBrief(roleId, {
230
+ protocolVersion: LEGACY_ADVISOR_BRIEF_PROTOCOL_VERSION,
231
+ });
218
232
  const role = protocol.listOperatingRoles().find((entry) => entry.id === roleId);
219
233
  if (!role) {
220
234
  throw new OperateError('E_OPERATE_STATE_INVALID', `Operating role ${roleId} is absent from the registry; its proposal bounds cannot be reconciled.`);
@@ -654,25 +668,154 @@ export async function buildOperatingMandate(input) {
654
668
  researchGuidance: buildMandateResearchGuidance(mandate, input.bootstrapMap ?? null, input.researchBudgetMs ?? null),
655
669
  };
656
670
  }
671
+ const OPERATING_RESPONSE_SCHEMA_FILE = 'operating-advisor-response.schema.json';
672
+ function schemaRecord(value) {
673
+ return value && typeof value === 'object' && !Array.isArray(value)
674
+ ? value
675
+ : null;
676
+ }
677
+ /**
678
+ * Read one packaged protocol schema document from the resolved pipeline install.
679
+ * Synchronous because the disclosure is attached on the synchronous prepare path;
680
+ * a missing or unreadable schema is a typed failure, never a silent fallback to a
681
+ * schema the runtime is not validated against.
682
+ */
683
+ function readPipelineProtocolSchema(protocolVersion, file) {
684
+ const root = resolveOperatingPipelineRoot({ requireMission: true });
685
+ if (!root) {
686
+ throw new OperateError('E_OPERATE_MISSION_UNAVAILABLE', 'Disclosing a mandate response contract requires the pipeline package with the Protocol v1.4 schemas.');
687
+ }
688
+ const location = path.join(root, 'schemas', `v${protocolVersion}`, file);
689
+ let raw;
690
+ try {
691
+ raw = readFileSync(location, 'utf8');
692
+ }
693
+ catch (error) {
694
+ throw new OperateError('E_PIPELINE_VERSION_INCOMPATIBLE', `Installed planr-pipeline does not ship ${file} for Protocol ${protocolVersion} at ${location}: ${error instanceof Error ? error.message : String(error)}`);
695
+ }
696
+ const parsed = schemaRecord(JSON.parse(raw));
697
+ if (!parsed) {
698
+ throw new OperateError('E_PIPELINE_VERSION_INCOMPATIBLE', `${location} is not a JSON Schema object, so the mandate cannot disclose it.`);
699
+ }
700
+ return parsed;
701
+ }
702
+ /** Collect every sibling-file `$ref` (`#/$defs/...` pointers are already local). */
703
+ function collectRelativeSchemaRefs(node, into) {
704
+ if (Array.isArray(node)) {
705
+ for (const item of node)
706
+ collectRelativeSchemaRefs(item, into);
707
+ return;
708
+ }
709
+ const record = schemaRecord(node);
710
+ if (!record)
711
+ return;
712
+ for (const [key, value] of Object.entries(record)) {
713
+ if (key === '$ref' && typeof value === 'string') {
714
+ if (value.endsWith('.schema.json') && !value.includes('://'))
715
+ into.add(value);
716
+ continue;
717
+ }
718
+ collectRelativeSchemaRefs(value, into);
719
+ }
720
+ }
721
+ const disclosedResponseSchemas = new Map();
722
+ /**
723
+ * Resolve the advisor-response schema for one protocol version as a SELF-CONTAINED
724
+ * document. The packaged v1.3/v1.4 response schemas reference the sibling citation
725
+ * schema by file name, which a runtime holding only the mandate cannot dereference,
726
+ * so each referenced resource is embedded under `$defs` verbatim. JSON Schema
727
+ * 2020-12 bundling: an embedded resource keeps its own `$id`, so the existing
728
+ * sibling `$ref` resolves against the embedded copy and that copy's internal
729
+ * `#/$defs/...` pointers still resolve inside it. Nothing is rewritten, so the
730
+ * disclosed schema stays byte-faithful to the enforced one.
731
+ */
732
+ function resolveDisclosedResponseSchema(protocolVersion) {
733
+ const cached = disclosedResponseSchemas.get(protocolVersion);
734
+ if (cached)
735
+ return structuredClone(cached);
736
+ const schema = readPipelineProtocolSchema(protocolVersion, OPERATING_RESPONSE_SCHEMA_FILE);
737
+ const identifier = typeof schema.$id === 'string' ? schema.$id : '';
738
+ if (!identifier.endsWith(`/v${protocolVersion}/${OPERATING_RESPONSE_SCHEMA_FILE}`)) {
739
+ throw new OperateError('E_PIPELINE_VERSION_INCOMPATIBLE', `The advisor-response schema packaged for Protocol ${protocolVersion} declares $id "${identifier}", which does not name that version; disclosing it would hand the runtime a contract it is not validated against.`);
740
+ }
741
+ const references = new Set();
742
+ collectRelativeSchemaRefs(schema, references);
743
+ const embedded = { ...(schemaRecord(schema.$defs) ?? {}) };
744
+ for (const reference of [...references].sort()) {
745
+ embedded[reference.replace(/\.schema\.json$/, '')] = readPipelineProtocolSchema(protocolVersion, reference);
746
+ }
747
+ const bundled = references.size > 0 ? { ...schema, $defs: embedded } : schema;
748
+ disclosedResponseSchemas.set(protocolVersion, bundled);
749
+ return structuredClone(bundled);
750
+ }
751
+ /** The `actions[].routeKind` vocabulary a Protocol v1.4 response may author. */
752
+ function disclosedRouteKinds(jsonSchema) {
753
+ const routeKind = schemaRecord(schemaRecord(schemaRecord(schemaRecord(schemaRecord(jsonSchema.properties)?.actions)?.items)?.properties)?.routeKind);
754
+ const values = Array.isArray(routeKind?.enum) ? routeKind.enum : [];
755
+ const kinds = values.filter((value) => typeof value === 'string');
756
+ if (kinds.length === 0) {
757
+ throw new OperateError('E_PIPELINE_VERSION_INCOMPATIBLE', 'The Protocol v1.4 advisor-response schema declares no actions[].routeKind vocabulary, so the mandate cannot disclose the proposal types its actions can produce.');
758
+ }
759
+ return kinds;
760
+ }
761
+ /**
762
+ * The proposal types the disclosed response can ACTUALLY produce. A Protocol v1.4
763
+ * response carries no proposal `type` at all — it carries actions whose
764
+ * `routeKind` the record path projects through `routeKindToProposalType` — so
765
+ * disclosing the frozen v1.2 vocabulary (`data-gap`, or the Chair's
766
+ * `merge`/`sequence`) would name types no v1.4 action can express. The disclosed
767
+ * set is therefore the image of the disclosed route-kind vocabulary, and it must
768
+ * stay within the set `record` enforces from the registry-reconciled brief; a set
769
+ * the enforcer would reject is a defect, not a disclosure.
770
+ */
771
+ function disclosedProposalTypes(mandate, brief, jsonSchema) {
772
+ if (mandate.protocolVersion !== '1.4.0')
773
+ return [...brief.output.allowedProposalTypes];
774
+ const image = [...new Set(disclosedRouteKinds(jsonSchema).map(routeKindToProposalType))].sort();
775
+ const enforced = new Set(brief.output.allowedProposalTypes);
776
+ const rejected = image.filter((type) => !enforced.has(type));
777
+ if (rejected.length > 0) {
778
+ throw new OperateError('E_OPERATE_STATE_INVALID', `Advisor ${mandate.roleId} would disclose proposal types its own enforced brief rejects: ${rejected.join(', ')}.`);
779
+ }
780
+ return image;
781
+ }
657
782
  /**
658
- * US-T1: ship the disclosed response contract INSIDE the dispatched mandate.
659
- * Serializes the role brief's ALREADY-COMPUTED output facet (schema pointer, the
660
- * dereferenceable JSON Schema, allowed proposal types, the per-role proposal cap,
661
- * the output-byte ceiling, and required behaviors) onto the mandate as its
662
- * `output` block no new computation, just disclosure of what `record` already
663
- * enforces. Layered on AFTER the pipeline signs `mandateDigest` (the returned
664
- * object keeps the pipeline's signed digest untouched), exactly like
665
- * `researchGuidance`, so no digest recomputation is required and writer/verifier
666
- * stay in agreement over the immutable, signed mandate the digest pins.
783
+ * US-T1: ship the disclosed response contract INSIDE the dispatched mandate — the
784
+ * dereferenceable response JSON Schema plus the per-role bounds `record` enforces
785
+ * (the proposal cap, the reachable proposal types, the output-byte ceiling, and
786
+ * required behaviors) so a runtime can satisfy the contract instead of guessing
787
+ * at a `responseSchema` name it cannot resolve.
788
+ *
789
+ * DEFECT this closes: the schema was previously taken from the role's pack-style
790
+ * brief. That brief is a compatibility-only projection the pipeline builds for
791
+ * Protocol v1.2/v1.3 sessions and refuses to build for v1.4 at all, so it can
792
+ * never express the v1.4 contract — yet a v1.4 mandate enforcing
793
+ * `operating-advisor-response@1.4.0` disclosed that legacy contract, and an advisor
794
+ * that followed the disclosure literally was rejected by the enforced schema
795
+ * (v1.2 `proposals` where v1.4 requires `analysisMarkdown`/`claims`/`actions`, and
796
+ * a `proposals|quiet` outcome where v1.4 admits `actions|quiet|partial`). The
797
+ * schema is therefore resolved from the mandate's OWN `responseSchema`, which is
798
+ * also the value disclosed as `output.schema` — so the disclosed identity and the
799
+ * enforced one agree by construction, at the type level as well as at runtime.
800
+ *
801
+ * Layered on AFTER the pipeline signs `mandateDigest` (the returned object keeps
802
+ * the pipeline's signed digest untouched), exactly like `researchGuidance`, so no
803
+ * digest recomputation is required and writer/verifier stay in agreement over the
804
+ * immutable, signed mandate the digest pins.
667
805
  */
668
806
  export function attachMandateResponseContract(mandate, brief) {
807
+ const version = mandate.responseSchema.split('@')[1] ?? '';
808
+ const jsonSchema = resolveDisclosedResponseSchema(version);
669
809
  return {
670
810
  ...mandate,
671
811
  output: {
672
- schema: brief.output.schema,
673
- jsonSchema: brief.output.jsonSchema,
674
- allowedProposalTypes: [...brief.output.allowedProposalTypes],
812
+ schema: mandate.responseSchema,
813
+ jsonSchema,
814
+ allowedProposalTypes: disclosedProposalTypes(mandate, brief, jsonSchema),
675
815
  maximumProposals: brief.output.maximumProposals,
816
+ // The ENFORCED ceiling, not the larger v1.4 registry budget: `record`
817
+ // measures the canonicalized committed output against this brief value, so
818
+ // disclosing a wider ceiling would recreate the divergence above.
676
819
  maximumOutputBytes: brief.output.maximumOutputBytes,
677
820
  requiredBehavior: [...brief.output.requiredBehavior],
678
821
  },