Skip to content

Ctxo v0.18.0

Choose a tag to compare

@github-actions github-actions released this 31 Oct 22:51
· 10 commits to master since this release
557501c

Packages published in this release

Compatible set

Versions tested together in this release:

Package Version
@ctxo/cli 0.18.0
@ctxo/domain 0.18.0
@ctxo/lang-csharp 0.11.0
@ctxo/lang-go 0.12.0
@ctxo/lang-java-analyzer 0.13.0
@ctxo/lang-java 0.13.0
@ctxo/lang-sql 0.1.0
@ctxo/lang-typescript 0.11.0
@ctxo/plugin-api 0.9.2
@ctxo/sql-extract 0.1.0

CLI changelog

Minor Changes

  • 0d185f3: Cursor gets a fold reminder. Cursor's stop hook cannot block, so with @ctxo/domain ctxo init --domain (Cursor selected) now registers ctxo domain-cursor-hook in .cursor/hooks.json for beforeSubmitPrompt and stop, merged into the hooks already there. The first prompt of a conversation records where it starts; every prompt gets exactly {"continue":true} (also without @ctxo/domain and on any error), and a repeat prompt answers without loading the module or running git. On a stop with status: "completed" the reminder runs the Claude Code fold guard's own decision and, when the guard would block, prints {"followup_message":"ctxo domain reminder: ..."} with the guard's reason. At most once per conversation (else per generation, else per 10 minutes), quiet while a follow-up runs, with domain.guard.enabled: false and on any error; it never blocks and always exits 0; an aborted or errored stop prints nothing. domain.guard.enabled: false also keeps init and doctor from adding the entries. ctxo doctor reports a missing, duplicated or unreadable reminder entry under domain_agent_setup when .cursor/ exists, and ctxo doctor --fix now repairs the domain agent setup (loader rules, the Claude Code guard hooks, the Cursor reminder, the ctxo-domain-fold skill), keeping other hooks and never writing an unreadable file. Module API: CtxoModuleRegistration.doctorFixes (ModuleDoctorFix, DoctorFixContext).
  • 5d47390: index.tests globs now reach the language plugins. @ctxo/plugin-api adds an optional PluginContext.testGlobs (type-only and additive, so the plugin peer ranges are unchanged); @ctxo/cli sets it in ctxo index and ctxo watch to the default test globs followed by the valid index.tests globs, each once. @ctxo/lang-typescript decides test blocks (describe, it, test), their edges, SQL call-site scopes and fact owners with those globs, so index.tests: ["spec/**/*.check.ts"] makes the blocks of spec/loans/policy.check.ts test symbols. With a CLI that predates the field, the TypeScript plugin keeps its built-in default rule. Behaviour change: a current CLI sends all its default test globs, including **/*.Tests/** and **/*.Test/**, so TypeScript files under such folders now get test blocks. index.tests does not support negation: a ! entry is skipped (it no longer turns every other file into a test file in the contexts view), the TypeScript plugin skips one too, and ctxo doctor warns and names it (use index.ignore to leave files out). Re-run ctxo index after upgrading or changing index.tests.
  • 49a000f: ctxo watch now refreshes the domain artifacts. With @ctxo/domain installed, watch runs the domain index pass (the one ctxo index runs) after the re-index of the changed files, so graph.json, maturity.json, shadow-candidates.json, contexts.json and boundaries.json follow your edits and the domain tools stop answering stale: true. A registry, card or glossary edit runs the pass after a quiet period of 1 s, or twice the last pass when that is longer; changed source files run it once watch.snapshotMinFileChanges of them are pending, 5 s after the last event; a due pass is never postponed more than 30 s; at start, one pass runs only when the graph is stale. For the same index at the same commit the pass writes the bytes ctxo index writes; the change-log fields (moved files, discovery, history) keep the values of the last ctxo index. A registry created while watch runs gets no pass (no facts were requested), with a warning on each skipped pass until watch is restarted. Passes never overlap, a failing pass is logged and watch goes on, and without @ctxo/domain watch behaves as before. The stale hints now name the watch refresh. shadow-candidates.json now writes fact detail keys in codepoint order, so a full and an incremental run give the same bytes. Module API: classifyWatchPath(path, indexed), watchArtifactsStale() and IndexPassContext.factsRequested.

Patch Changes

  • e838b4d: Normalization facts are business normalization (FC-4b). Many normalization facts were not. Every tier of the C#, TypeScript, Java and Go plugins now reports the nearest call that receives a normalized value (its consumer, up to the statement and never past a lambda), with its receiver and declaring types in the full tiers, and the shared finisher drops the fact when that consumer is a message sink: a logging method on a known logger type (Microsoft.Extensions.Logging, Serilog, NLog, log4net, System.Diagnostics.Debug/Trace, java.util.logging, SLF4J, log4j, commons-logging, Go log, log/slog, logrus, zap, zerolog, and in TypeScript Console, pino, winston, NestJS Logger/LoggerService, bunyan, log4js, tslog), the same methods on a logger-named receiver in every tier whenever no known logger type resolves, or an exception or error construction (new ...Exception, new Error, errors.New, fmt.Errorf). auth.LogIn or writer.WriteLine are no sinks, and log.info("saved", repo.upsert(email.toLowerCase())) keeps its fact. Display text (an interpolation hole or + operand next to text with whitespace) is dropped only when it goes to a sink or a formatting API (StringBuilder.Append*, string.Format, fmt.Sprintf, Console.Write*); SQL templates and space-joined keys keep their facts. Calls on formats (Path and character calls, hex or base64 output, file extensions, separator-only trims) give none, and a chain is one fact, the outermost call, also across lines. ctxo index and ctxo watch drop normalization facts in test files, as they drop retry-timeout facts; the @ctxo/domain text scan applies the sink rule to the call enclosing a normalization on its line. The call evidence gains consumer, consumerTypes and inProse, with new conformance vectors isMessageSink, isDisplayCall, isTechnicalNormalization and feedsNormalization. The Java full tier needs @ctxo/lang-java-analyzer at this release (run ctxo update); an older JAR reports no consumers, so only the format, chain and test-file rules apply there. A shadow-specs.yaml resolution recorded for a dropped call, such as the inner email.Trim() of a chain, turns stale (check 12 warns) and can be removed.
  • Updated dependencies [5d47390]
  • Updated dependencies [e838b4d]
    • @ctxo/plugin-api@0.9.2