productfoo 0.0.0-stage → 1.0.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.
- package/LICENSE +201 -0
- package/README.md +338 -2
- package/bin/foo +3 -0
- package/bin/foo.mjs +42 -0
- package/commands/bug.md +31 -0
- package/commands/discovery.md +28 -0
- package/commands/ideate.md +27 -0
- package/commands/init.md +28 -0
- package/commands/pitch.md +27 -0
- package/commands/preview.md +25 -0
- package/commands/research.md +31 -0
- package/commands/roast.md +27 -0
- package/commands/spec.md +30 -0
- package/config/pricing.yaml +198 -0
- package/config/routing-policy.yaml +171 -0
- package/dist-public/src/activeModel.d.ts +83 -0
- package/dist-public/src/activeModel.js +331 -0
- package/dist-public/src/agentAdapters.d.ts +122 -0
- package/dist-public/src/agentAdapters.js +178 -0
- package/dist-public/src/agentState.d.ts +43 -0
- package/dist-public/src/agentState.js +177 -0
- package/dist-public/src/bugCapsule.d.ts +94 -0
- package/dist-public/src/bugCapsule.js +227 -0
- package/dist-public/src/bugCapture.d.ts +26 -0
- package/dist-public/src/bugCapture.js +251 -0
- package/dist-public/src/bugOwnerLog.d.ts +93 -0
- package/dist-public/src/bugOwnerLog.js +304 -0
- package/dist-public/src/bugReportStore.d.ts +48 -0
- package/dist-public/src/bugReportStore.js +860 -0
- package/dist-public/src/bugSpecContext.d.ts +7 -0
- package/dist-public/src/bugSpecContext.js +129 -0
- package/dist-public/src/channelFreshness.d.ts +25 -0
- package/dist-public/src/channelFreshness.js +194 -0
- package/dist-public/src/cli.d.ts +30 -0
- package/dist-public/src/cli.js +1667 -0
- package/dist-public/src/cliArgs.d.ts +7 -0
- package/dist-public/src/cliArgs.js +44 -0
- package/dist-public/src/codeCatalog.d.ts +41 -0
- package/dist-public/src/codeCatalog.js +197 -0
- package/dist-public/src/commandContract.d.ts +84 -0
- package/dist-public/src/commandContract.js +390 -0
- package/dist-public/src/commandUsage.d.ts +3 -0
- package/dist-public/src/commandUsage.js +30 -0
- package/dist-public/src/commands/agent.d.ts +60 -0
- package/dist-public/src/commands/agent.js +1353 -0
- package/dist-public/src/commands/asp.d.ts +8 -0
- package/dist-public/src/commands/asp.js +669 -0
- package/dist-public/src/commands/evalCmd.d.ts +4 -0
- package/dist-public/src/commands/evalCmd.js +405 -0
- package/dist-public/src/commands/login.d.ts +25 -0
- package/dist-public/src/commands/login.js +94 -0
- package/dist-public/src/commands/loop.d.ts +16 -0
- package/dist-public/src/commands/loop.js +619 -0
- package/dist-public/src/commands/reconcile.d.ts +41 -0
- package/dist-public/src/commands/reconcile.js +292 -0
- package/dist-public/src/commands/runtime.d.ts +1 -0
- package/dist-public/src/commands/runtime.js +36 -0
- package/dist-public/src/commands/scanRedact.d.ts +8 -0
- package/dist-public/src/commands/scanRedact.js +266 -0
- package/dist-public/src/commands/setup.d.ts +28 -0
- package/dist-public/src/commands/setup.js +398 -0
- package/dist-public/src/commands/shared.d.ts +17 -0
- package/dist-public/src/commands/shared.js +147 -0
- package/dist-public/src/commands/source.d.ts +1 -0
- package/dist-public/src/commands/source.js +134 -0
- package/dist-public/src/commands/specCmd.d.ts +24 -0
- package/dist-public/src/commands/specCmd.js +794 -0
- package/dist-public/src/commands/update.d.ts +61 -0
- package/dist-public/src/commands/update.js +244 -0
- package/dist-public/src/comprehensionSignal.d.ts +20 -0
- package/dist-public/src/comprehensionSignal.js +166 -0
- package/dist-public/src/conductor/diversity.d.ts +48 -0
- package/dist-public/src/conductor/diversity.js +423 -0
- package/dist-public/src/conductor/engine.d.ts +7 -0
- package/dist-public/src/conductor/engine.js +295 -0
- package/dist-public/src/conductor/families/ideate.d.ts +2 -0
- package/dist-public/src/conductor/families/ideate.js +255 -0
- package/dist-public/src/conductor/families/interview.d.ts +2 -0
- package/dist-public/src/conductor/families/interview.js +39 -0
- package/dist-public/src/conductor/families/specSwarm.d.ts +2 -0
- package/dist-public/src/conductor/families/specSwarm.js +146 -0
- package/dist-public/src/conductor/familyDelivery.d.ts +6 -0
- package/dist-public/src/conductor/familyDelivery.js +37 -0
- package/dist-public/src/conductor/familyPackArtifact.d.ts +4 -0
- package/dist-public/src/conductor/familyPackArtifact.js +260 -0
- package/dist-public/src/conductor/ideateDecision.d.ts +6 -0
- package/dist-public/src/conductor/ideateDecision.js +237 -0
- package/dist-public/src/conductor/pack.d.ts +26 -0
- package/dist-public/src/conductor/pack.js +75 -0
- package/dist-public/src/conductor/types.d.ts +111 -0
- package/dist-public/src/conductor/types.js +7 -0
- package/dist-public/src/configPath.d.ts +2 -0
- package/dist-public/src/configPath.js +7 -0
- package/dist-public/src/discoveryArtifacts.d.ts +54 -0
- package/dist-public/src/discoveryArtifacts.js +467 -0
- package/dist-public/src/discoveryCommand.d.ts +127 -0
- package/dist-public/src/discoveryCommand.js +2148 -0
- package/dist-public/src/discoveryConnections.d.ts +339 -0
- package/dist-public/src/discoveryConnections.js +613 -0
- package/dist-public/src/discoveryDocs.d.ts +129 -0
- package/dist-public/src/discoveryDocs.js +577 -0
- package/dist-public/src/discoveryEvidence.d.ts +59 -0
- package/dist-public/src/discoveryEvidence.js +198 -0
- package/dist-public/src/discoveryFireflies.d.ts +25 -0
- package/dist-public/src/discoveryFireflies.js +551 -0
- package/dist-public/src/discoveryGmail.d.ts +12 -0
- package/dist-public/src/discoveryGmail.js +466 -0
- package/dist-public/src/discoveryGong.d.ts +12 -0
- package/dist-public/src/discoveryGong.js +491 -0
- package/dist-public/src/discoveryLearningRouting.d.ts +90 -0
- package/dist-public/src/discoveryLearningRouting.js +405 -0
- package/dist-public/src/discoveryMatching.d.ts +26 -0
- package/dist-public/src/discoveryMatching.js +73 -0
- package/dist-public/src/discoveryOutlook.d.ts +12 -0
- package/dist-public/src/discoveryOutlook.js +492 -0
- package/dist-public/src/discoveryProcess.d.ts +221 -0
- package/dist-public/src/discoveryProcess.js +703 -0
- package/dist-public/src/discoveryProof.d.ts +143 -0
- package/dist-public/src/discoveryProof.js +529 -0
- package/dist-public/src/discoveryProviders.d.ts +152 -0
- package/dist-public/src/discoveryProviders.js +756 -0
- package/dist-public/src/discoveryReadiness.d.ts +219 -0
- package/dist-public/src/discoveryReadiness.js +672 -0
- package/dist-public/src/discoveryReconcile.d.ts +57 -0
- package/dist-public/src/discoveryReconcile.js +424 -0
- package/dist-public/src/discoverySlack.d.ts +12 -0
- package/dist-public/src/discoverySlack.js +452 -0
- package/dist-public/src/discoverySources.d.ts +56 -0
- package/dist-public/src/discoverySources.js +322 -0
- package/dist-public/src/discoverySync.d.ts +52 -0
- package/dist-public/src/discoverySync.js +151 -0
- package/dist-public/src/discoverySynthesis.d.ts +57 -0
- package/dist-public/src/discoverySynthesis.js +215 -0
- package/dist-public/src/discoveryTeams.d.ts +12 -0
- package/dist-public/src/discoveryTeams.js +516 -0
- package/dist-public/src/discoveryZoom.d.ts +12 -0
- package/dist-public/src/discoveryZoom.js +523 -0
- package/dist-public/src/elicitationSurface.d.ts +13 -0
- package/dist-public/src/elicitationSurface.js +77 -0
- package/dist-public/src/errorReport.d.ts +99 -0
- package/dist-public/src/errorReport.js +443 -0
- package/dist-public/src/errorTaxonomy.d.ts +84 -0
- package/dist-public/src/errorTaxonomy.js +189 -0
- package/dist-public/src/evalCalibration.d.ts +82 -0
- package/dist-public/src/evalCalibration.js +169 -0
- package/dist-public/src/evalChecks.d.ts +21 -0
- package/dist-public/src/evalChecks.js +295 -0
- package/dist-public/src/evalCompile.d.ts +56 -0
- package/dist-public/src/evalCompile.js +58 -0
- package/dist-public/src/evalImprove.d.ts +60 -0
- package/dist-public/src/evalImprove.js +175 -0
- package/dist-public/src/evalJudge.d.ts +47 -0
- package/dist-public/src/evalJudge.js +143 -0
- package/dist-public/src/evalLabels.d.ts +100 -0
- package/dist-public/src/evalLabels.js +287 -0
- package/dist-public/src/evalRecord.d.ts +68 -0
- package/dist-public/src/evalRecord.js +165 -0
- package/dist-public/src/evalRoast.d.ts +88 -0
- package/dist-public/src/evalRoast.js +249 -0
- package/dist-public/src/evidenceIntake.d.ts +66 -0
- package/dist-public/src/evidenceIntake.js +356 -0
- package/dist-public/src/feedback.d.ts +78 -0
- package/dist-public/src/feedback.js +294 -0
- package/dist-public/src/firefliesClient.d.ts +106 -0
- package/dist-public/src/firefliesClient.js +258 -0
- package/dist-public/src/firstMoveTensions.d.ts +10 -0
- package/dist-public/src/firstMoveTensions.js +93 -0
- package/dist-public/src/gitRun.d.ts +21 -0
- package/dist-public/src/gitRun.js +50 -0
- package/dist-public/src/githubReconcile.d.ts +94 -0
- package/dist-public/src/githubReconcile.js +205 -0
- package/dist-public/src/gmailNango.d.ts +131 -0
- package/dist-public/src/gmailNango.js +329 -0
- package/dist-public/src/gongNango.d.ts +118 -0
- package/dist-public/src/gongNango.js +308 -0
- package/dist-public/src/grammarGate.d.ts +13 -0
- package/dist-public/src/grammarGate.js +72 -0
- package/dist-public/src/harnessGates.d.ts +65 -0
- package/dist-public/src/harnessGates.js +168 -0
- package/dist-public/src/humanSurfaceEval.d.ts +19 -0
- package/dist-public/src/humanSurfaceEval.js +156 -0
- package/dist-public/src/ideate.d.ts +43 -0
- package/dist-public/src/ideate.js +255 -0
- package/dist-public/src/ideateContext.d.ts +11 -0
- package/dist-public/src/ideateContext.js +83 -0
- package/dist-public/src/index.d.ts +2 -0
- package/dist-public/src/index.js +4 -0
- package/dist-public/src/initCommand.d.ts +25 -0
- package/dist-public/src/initCommand.js +558 -0
- package/dist-public/src/interviewGate.d.ts +25 -0
- package/dist-public/src/interviewGate.js +126 -0
- package/dist-public/src/jsonFile.d.ts +2 -0
- package/dist-public/src/jsonFile.js +22 -0
- package/dist-public/src/loopBudget.d.ts +182 -0
- package/dist-public/src/loopBudget.js +494 -0
- package/dist-public/src/loopContracts.d.ts +35 -0
- package/dist-public/src/loopContracts.js +364 -0
- package/dist-public/src/machineState.d.ts +1 -0
- package/dist-public/src/machineState.js +9 -0
- package/dist-public/src/notionNango.d.ts +93 -0
- package/dist-public/src/notionNango.js +279 -0
- package/dist-public/src/orchestrationResult.d.ts +11 -0
- package/dist-public/src/orchestrationResult.js +73 -0
- package/dist-public/src/outlookNango.d.ts +124 -0
- package/dist-public/src/outlookNango.js +327 -0
- package/dist-public/src/packetCorrections.d.ts +40 -0
- package/dist-public/src/packetCorrections.js +172 -0
- package/dist-public/src/packetGlossary.d.ts +6 -0
- package/dist-public/src/packetGlossary.js +42 -0
- package/dist-public/src/packetIndex.d.ts +54 -0
- package/dist-public/src/packetIndex.js +744 -0
- package/dist-public/src/packetIndexEntry.d.ts +3 -0
- package/dist-public/src/packetIndexEntry.js +128 -0
- package/dist-public/src/packetIndexServe.d.ts +13 -0
- package/dist-public/src/packetIndexServe.js +113 -0
- package/dist-public/src/packetIndexWorker.d.ts +7 -0
- package/dist-public/src/packetIndexWorker.js +45 -0
- package/dist-public/src/packetLifecycle.d.ts +30 -0
- package/dist-public/src/packetLifecycle.js +127 -0
- package/dist-public/src/packetReconcile.d.ts +73 -0
- package/dist-public/src/packetReconcile.js +386 -0
- package/dist-public/src/packetStatus.d.ts +125 -0
- package/dist-public/src/packetStatus.js +770 -0
- package/dist-public/src/packetValidation.d.ts +17 -0
- package/dist-public/src/packetValidation.js +333 -0
- package/dist-public/src/packetVerify.d.ts +73 -0
- package/dist-public/src/packetVerify.js +303 -0
- package/dist-public/src/packetWrite.d.ts +52 -0
- package/dist-public/src/packetWrite.js +448 -0
- package/dist-public/src/pitch.d.ts +38 -0
- package/dist-public/src/pitch.js +154 -0
- package/dist-public/src/processMemo.d.ts +8 -0
- package/dist-public/src/processMemo.js +23 -0
- package/dist-public/src/productDetect.d.ts +30 -0
- package/dist-public/src/productDetect.js +376 -0
- package/dist-public/src/profile.d.ts +62 -0
- package/dist-public/src/profile.js +334 -0
- package/dist-public/src/questionModel.d.ts +46 -0
- package/dist-public/src/questionModel.js +74 -0
- package/dist-public/src/questionText.d.ts +7 -0
- package/dist-public/src/questionText.js +38 -0
- package/dist-public/src/redactConfig.d.ts +2 -0
- package/dist-public/src/redactConfig.js +11 -0
- package/dist-public/src/redactEngine.d.ts +59 -0
- package/dist-public/src/redactEngine.js +509 -0
- package/dist-public/src/redactGate.d.ts +63 -0
- package/dist-public/src/redactGate.js +209 -0
- package/dist-public/src/repoRead.d.ts +29 -0
- package/dist-public/src/repoRead.js +160 -0
- package/dist-public/src/research.d.ts +242 -0
- package/dist-public/src/research.js +1314 -0
- package/dist-public/src/researchCompletion.d.ts +34 -0
- package/dist-public/src/researchCompletion.js +123 -0
- package/dist-public/src/researchExecution.d.ts +47 -0
- package/dist-public/src/researchExecution.js +309 -0
- package/dist-public/src/researchFormat.d.ts +21 -0
- package/dist-public/src/researchFormat.js +77 -0
- package/dist-public/src/researchGate.d.ts +86 -0
- package/dist-public/src/researchGate.js +1036 -0
- package/dist-public/src/researchReceipt.d.ts +76 -0
- package/dist-public/src/researchReceipt.js +148 -0
- package/dist-public/src/researchRender.d.ts +2 -0
- package/dist-public/src/researchRender.js +267 -0
- package/dist-public/src/researchSigningKey.d.ts +19 -0
- package/dist-public/src/researchSigningKey.js +95 -0
- package/dist-public/src/riskClassify.d.ts +42 -0
- package/dist-public/src/riskClassify.js +149 -0
- package/dist-public/src/routines.d.ts +42 -0
- package/dist-public/src/routines.js +269 -0
- package/dist-public/src/routingPolicy.d.ts +172 -0
- package/dist-public/src/routingPolicy.js +646 -0
- package/dist-public/src/secretInput.d.ts +8 -0
- package/dist-public/src/secretInput.js +89 -0
- package/dist-public/src/selfCheck.d.ts +7 -0
- package/dist-public/src/selfCheck.js +473 -0
- package/dist-public/src/selfCheckCache.d.ts +29 -0
- package/dist-public/src/selfCheckCache.js +147 -0
- package/dist-public/src/severityClass.d.ts +15 -0
- package/dist-public/src/severityClass.js +22 -0
- package/dist-public/src/skillClientPolicy.d.ts +8 -0
- package/dist-public/src/skillClientPolicy.js +16 -0
- package/dist-public/src/skillLocal.d.ts +98 -0
- package/dist-public/src/skillLocal.js +463 -0
- package/dist-public/src/skillTreeDigest.d.ts +9 -0
- package/dist-public/src/skillTreeDigest.js +64 -0
- package/dist-public/src/slackNango.d.ts +62 -0
- package/dist-public/src/slackNango.js +208 -0
- package/dist-public/src/social/arxiv.d.ts +19 -0
- package/dist-public/src/social/arxiv.js +96 -0
- package/dist-public/src/social/github.d.ts +2 -0
- package/dist-public/src/social/github.js +78 -0
- package/dist-public/src/social/hackernews.d.ts +2 -0
- package/dist-public/src/social/hackernews.js +67 -0
- package/dist-public/src/social/index.d.ts +10 -0
- package/dist-public/src/social/index.js +79 -0
- package/dist-public/src/social/reddit.d.ts +2 -0
- package/dist-public/src/social/reddit.js +125 -0
- package/dist-public/src/social/types.d.ts +73 -0
- package/dist-public/src/social/types.js +61 -0
- package/dist-public/src/social/xml.d.ts +10 -0
- package/dist-public/src/social/xml.js +49 -0
- package/dist-public/src/social/youtube.d.ts +7 -0
- package/dist-public/src/social/youtube.js +217 -0
- package/dist-public/src/sourceIngress.d.ts +488 -0
- package/dist-public/src/sourceIngress.js +1651 -0
- package/dist-public/src/specAfter.d.ts +187 -0
- package/dist-public/src/specAfter.js +814 -0
- package/dist-public/src/specBudget.d.ts +124 -0
- package/dist-public/src/specBudget.js +424 -0
- package/dist-public/src/specDecisionSignals.d.ts +38 -0
- package/dist-public/src/specDecisionSignals.js +121 -0
- package/dist-public/src/specLinkedCommits.d.ts +7 -0
- package/dist-public/src/specLinkedCommits.js +107 -0
- package/dist-public/src/specSections.d.ts +105 -0
- package/dist-public/src/specSections.js +718 -0
- package/dist-public/src/statusGlyphs.d.ts +18 -0
- package/dist-public/src/statusGlyphs.js +75 -0
- package/dist-public/src/swarmCommand.d.ts +10 -0
- package/dist-public/src/swarmCommand.js +96 -0
- package/dist-public/src/teamsNango.d.ts +114 -0
- package/dist-public/src/teamsNango.js +301 -0
- package/dist-public/src/tokenStore.d.ts +10 -0
- package/dist-public/src/tokenStore.js +77 -0
- package/dist-public/src/trustEnvelope.d.ts +78 -0
- package/dist-public/src/trustEnvelope.js +392 -0
- package/dist-public/src/untrustedText.d.ts +6 -0
- package/dist-public/src/untrustedText.js +20 -0
- package/dist-public/src/updateNotice.d.ts +41 -0
- package/dist-public/src/updateNotice.js +290 -0
- package/dist-public/src/vendorYaml.d.ts +1 -0
- package/dist-public/src/vendorYaml.js +7374 -0
- package/dist-public/src/workflowRunActuals.d.ts +67 -0
- package/dist-public/src/workflowRunActuals.js +184 -0
- package/dist-public/src/zendeskDiscovery.d.ts +12 -0
- package/dist-public/src/zendeskDiscovery.js +513 -0
- package/dist-public/src/zendeskNango.d.ts +131 -0
- package/dist-public/src/zendeskNango.js +344 -0
- package/dist-public/src/zoomNango.d.ts +106 -0
- package/dist-public/src/zoomNango.js +351 -0
- package/docs/CHANGELOG.md +32 -0
- package/docs/THIRD_PARTY_NOTICES.md +36 -0
- package/package.json +71 -4
- package/schemas/bug-capsule-receipt.schema.json +54 -0
- package/schemas/bug-capsule.schema.json +189 -0
- package/schemas/discovery-evidence-envelope.schema.json +79 -0
- package/schemas/discovery-processing-receipt.schema.json +71 -0
- package/schemas/discovery-service-contract.schema.json +189 -0
- package/skills/AGENTS.md +32 -0
- package/skills/README.md +287 -0
- package/skills/bug/SKILL.md +49 -0
- package/skills/build-preview-spec/SKILL.md +103 -0
- package/skills/capture-external-artifact/SKILL.md +23 -0
- package/skills/capture-external-artifact/agents/openai.yaml +4 -0
- package/skills/capture-external-artifact/references/extractor-libraries.md +27 -0
- package/skills/check-spec-health/SKILL.md +45 -0
- package/skills/check-spec-health/agents/openai.yaml +4 -0
- package/skills/competitive-positioning/SKILL.md +86 -0
- package/skills/competitive-positioning/agents/openai.yaml +4 -0
- package/skills/cpo-lens/SKILL.md +398 -0
- package/skills/cpo-lens/agents/openai.yaml +4 -0
- package/skills/create-prd/SKILL.md +26 -0
- package/skills/create-prd/agents/openai.yaml +4 -0
- package/skills/customer-discovery/SKILL.md +192 -0
- package/skills/design-system/SKILL.md +49 -0
- package/skills/design-system/agents/openai.yaml +4 -0
- package/skills/discussion-guide/SKILL.md +75 -0
- package/skills/discussion-guide/agents/openai.yaml +4 -0
- package/skills/firecrawl-research-papers/SKILL.md +96 -0
- package/skills/firecrawl-research-papers/agents/openai.yaml +4 -0
- package/skills/foo-roast/SKILL.md +325 -0
- package/skills/generate-gtm-brief/SKILL.md +41 -0
- package/skills/generate-gtm-brief/agents/openai.yaml +4 -0
- package/skills/generate-gtm-brief/references/gtm-brief-template.md +56 -0
- package/skills/gong-quotes/SKILL.md +43 -0
- package/skills/gong-quotes/agents/openai.yaml +4 -0
- package/skills/grill-me/SKILL.md +27 -0
- package/skills/grill-me/agents/openai.yaml +4 -0
- package/skills/ideate/SKILL.md +180 -0
- package/skills/ideate/references/family-packs.md +5 -0
- package/skills/initiative-tracker/SKILL.md +23 -0
- package/skills/initiative-tracker/agents/openai.yaml +4 -0
- package/skills/interop-review/SKILL.md +25 -0
- package/skills/interop-review/agents/openai.yaml +4 -0
- package/skills/interview-me/SKILL.md +404 -0
- package/skills/interview-me/agents/openai.yaml +4 -0
- package/skills/loop-library-audit/SKILL.md +123 -0
- package/skills/pitch/SKILL.md +110 -0
- package/skills/pitch/references/opportunity-assessment.md +136 -0
- package/skills/pitch/references/prfaq-template.md +54 -0
- package/skills/pmm-release-briefing/SKILL.md +27 -0
- package/skills/pmm-release-briefing/agents/openai.yaml +4 -0
- package/skills/pmm-release-briefing/references/variant-generalized.md +16 -0
- package/skills/positioning-messaging/SKILL.md +70 -0
- package/skills/positioning-messaging/agents/openai.yaml +4 -0
- package/skills/positioning-messaging/references/guest-insights.md +1400 -0
- package/skills/preview-swarm/SKILL.md +418 -0
- package/skills/preview-swarm/agents/openai.yaml +4 -0
- package/skills/preview-swarm/references/html-effectiveness-build-previews.md +168 -0
- package/skills/product-copywriting/SKILL.md +127 -0
- package/skills/product-copywriting/agents/openai.yaml +4 -0
- package/skills/product-copywriting/references/foo-voice.md +26 -0
- package/skills/product-shape-interview/SKILL.md +219 -0
- package/skills/product-shape-interview/agents/openai.yaml +4 -0
- package/skills/ready-for-release/SKILL.md +39 -0
- package/skills/ready-for-release/agents/openai.yaml +4 -0
- package/skills/redact-transcripts/SKILL.md +23 -0
- package/skills/redact-transcripts/agents/openai.yaml +4 -0
- package/skills/research-brief/SKILL.md +48 -0
- package/skills/research-brief/agents/openai.yaml +4 -0
- package/skills/research-refresh/SKILL.md +63 -0
- package/skills/research-refresh/references/worked-cases.md +44 -0
- package/skills/review-loop/SKILL.md +200 -0
- package/skills/review-spec/SKILL.md +32 -0
- package/skills/review-spec/agents/openai.yaml +4 -0
- package/skills/rfc-from-research/SKILL.md +42 -0
- package/skills/rfc-from-research/agents/openai.yaml +4 -0
- package/skills/rfc-from-research/references/rfc-pattern.md +69 -0
- package/skills/skill-registry.yaml +810 -0
- package/skills/spec-cleanup/SKILL.md +103 -0
- package/skills/spec-cleanup/agents/openai.yaml +4 -0
- package/skills/spec-swarm/SKILL.md +87 -0
- package/skills/spec-swarm/agents/openai.yaml +4 -0
- package/skills/spec-swarm/template/SKILL.template.md +94 -0
- package/skills/spec-swarm/template/personas/accessibility-inclusion.md +40 -0
- package/skills/spec-swarm/template/personas/ai-technical-pm.md +69 -0
- package/skills/spec-swarm/template/personas/analytics-engineering.md +39 -0
- package/skills/spec-swarm/template/personas/applied-ai-eval.md +64 -0
- package/skills/spec-swarm/template/personas/business-gm-pm.md +67 -0
- package/skills/spec-swarm/template/personas/consumer-craft-pm.md +68 -0
- package/skills/spec-swarm/template/personas/content-design.md +40 -0
- package/skills/spec-swarm/template/personas/cpo.md +42 -0
- package/skills/spec-swarm/template/personas/data-science.md +42 -0
- package/skills/spec-swarm/template/personas/developer-experience.md +65 -0
- package/skills/spec-swarm/template/personas/dx-product.md +70 -0
- package/skills/spec-swarm/template/personas/field.md +43 -0
- package/skills/spec-swarm/template/personas/finance-cfo.md +40 -0
- package/skills/spec-swarm/template/personas/growth-pm.md +67 -0
- package/skills/spec-swarm/template/personas/platform-pm.md +67 -0
- package/skills/spec-swarm/template/personas/pmm.md +43 -0
- package/skills/spec-swarm/template/personas/principal-product-designer.md +42 -0
- package/skills/spec-swarm/template/personas/product-ops-program.md +41 -0
- package/skills/spec-swarm/template/personas/qa-release.md +41 -0
- package/skills/spec-swarm/template/personas/responsible-ai-safety.md +64 -0
- package/skills/spec-swarm/template/personas/security-privacy-legal.md +40 -0
- package/skills/spec-swarm/template/personas/strategy-competitive.md +41 -0
- package/skills/spec-swarm/template/personas/technical-architect.md +42 -0
- package/skills/spec-swarm/template/personas/technical-lead.md +43 -0
- package/skills/spec-swarm/template/personas/user-research.md +41 -0
- package/skills/spec-swarm-accessibility-inclusion/SKILL.md +95 -0
- package/skills/spec-swarm-accessibility-inclusion/agents/openai.yaml +4 -0
- package/skills/spec-swarm-ai-technical-pm/SKILL.md +124 -0
- package/skills/spec-swarm-analytics-engineering/SKILL.md +94 -0
- package/skills/spec-swarm-analytics-engineering/agents/openai.yaml +4 -0
- package/skills/spec-swarm-applied-ai-eval/SKILL.md +120 -0
- package/skills/spec-swarm-business-gm-pm/SKILL.md +122 -0
- package/skills/spec-swarm-consumer-craft-pm/SKILL.md +122 -0
- package/skills/spec-swarm-content-design/SKILL.md +95 -0
- package/skills/spec-swarm-content-design/agents/openai.yaml +4 -0
- package/skills/spec-swarm-cpo/SKILL.md +94 -0
- package/skills/spec-swarm-cpo/agents/openai.yaml +4 -0
- package/skills/spec-swarm-data-science/SKILL.md +95 -0
- package/skills/spec-swarm-data-science/agents/openai.yaml +4 -0
- package/skills/spec-swarm-developer-experience/SKILL.md +121 -0
- package/skills/spec-swarm-dx-product/SKILL.md +126 -0
- package/skills/spec-swarm-field/SKILL.md +96 -0
- package/skills/spec-swarm-field/agents/openai.yaml +4 -0
- package/skills/spec-swarm-finance-cfo/SKILL.md +95 -0
- package/skills/spec-swarm-finance-cfo/agents/openai.yaml +4 -0
- package/skills/spec-swarm-growth-pm/SKILL.md +122 -0
- package/skills/spec-swarm-platform-pm/SKILL.md +122 -0
- package/skills/spec-swarm-pmm/SKILL.md +96 -0
- package/skills/spec-swarm-pmm/agents/openai.yaml +4 -0
- package/skills/spec-swarm-principal-product-designer/SKILL.md +95 -0
- package/skills/spec-swarm-principal-product-designer/agents/openai.yaml +4 -0
- package/skills/spec-swarm-product-ops-program/SKILL.md +96 -0
- package/skills/spec-swarm-product-ops-program/agents/openai.yaml +4 -0
- package/skills/spec-swarm-qa-release/SKILL.md +96 -0
- package/skills/spec-swarm-qa-release/agents/openai.yaml +4 -0
- package/skills/spec-swarm-responsible-ai-safety/SKILL.md +120 -0
- package/skills/spec-swarm-security-privacy-legal/SKILL.md +95 -0
- package/skills/spec-swarm-security-privacy-legal/agents/openai.yaml +4 -0
- package/skills/spec-swarm-strategy-competitive/SKILL.md +96 -0
- package/skills/spec-swarm-strategy-competitive/agents/openai.yaml +4 -0
- package/skills/spec-swarm-technical-architect/SKILL.md +95 -0
- package/skills/spec-swarm-technical-architect/agents/openai.yaml +4 -0
- package/skills/spec-swarm-technical-lead/SKILL.md +96 -0
- package/skills/spec-swarm-technical-lead/agents/openai.yaml +4 -0
- package/skills/spec-swarm-user-research/SKILL.md +95 -0
- package/skills/spec-swarm-user-research/agents/openai.yaml +4 -0
- package/skills/strategy-check/SKILL.md +170 -0
- package/skills/strategy-check/agents/openai.yaml +4 -0
- package/skills/study-digest/SKILL.md +41 -0
- package/skills/synthetic-customer/SKILL.md +68 -0
- package/skills/update-cli-spec/SKILL.md +69 -0
- package/skills/update-cli-spec/agents/openai.yaml +4 -0
- package/skills/voc-researcher/SKILL.md +45 -0
- package/skills/voc-researcher/agents/openai.yaml +4 -0
- package/skills-lock.json +35 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
// "Your productfoo is out of date" — told by the server, because nothing else can tell you.
|
|
2
|
+
//
|
|
3
|
+
// The client never auto-updates and never learns the newest release from a
|
|
4
|
+
// Git remote. (It once pointed at the private dist repository, whose tags a
|
|
5
|
+
// client could not read without git credentials — the historical reference
|
|
6
|
+
// survives only in tests and the cutover plan.) The one thing every install
|
|
7
|
+
// DOES talk to on every run is the skill server. So the server stamps each
|
|
8
|
+
// response with the version it considers current, and the client says so —
|
|
9
|
+
// once a day, on stderr.
|
|
10
|
+
//
|
|
11
|
+
// This exists because a tester sat on a broken 0.1.0 for days and neither he nor
|
|
12
|
+
// the owner had any surface that would have said so. Silence was the bug.
|
|
13
|
+
//
|
|
14
|
+
// Three hard rules, all learned in this codebase:
|
|
15
|
+
// - stderr only. stdout carries --json and piped output; a chatty notice there
|
|
16
|
+
// corrupts a contract someone is parsing.
|
|
17
|
+
// - never fatal. A missing header, an unreadable state file, a read-only home
|
|
18
|
+
// directory — none of it may change what the command was asked to do.
|
|
19
|
+
// - speak only where a human is listening, and spend the day's one line only
|
|
20
|
+
// there. See `interactive` below — this rule is why the notice reached nobody.
|
|
21
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
22
|
+
import { homedir } from "node:os";
|
|
23
|
+
import path from "node:path";
|
|
24
|
+
import { fileURLToPath } from "node:url";
|
|
25
|
+
import { readJson, readJsonSafe } from "./jsonFile.js";
|
|
26
|
+
import { compareVersions, distributionPackageName } from "./channelFreshness.js";
|
|
27
|
+
import { harnessMarkerPresent } from "./commandContract.js";
|
|
28
|
+
// productfoo's own package root (this file compiles to dist/src/updateNotice.js), so the
|
|
29
|
+
// version reported is the one actually RUNNING, whatever directory it runs from.
|
|
30
|
+
const PACKAGE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
31
|
+
export function clientVersion() {
|
|
32
|
+
try {
|
|
33
|
+
const pkg = readJson(path.join(PACKAGE_ROOT, "package.json"));
|
|
34
|
+
return pkg.version ?? "unknown";
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return "unknown";
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
// The client tells the server what it is running; the server tells the client
|
|
41
|
+
// what is current. Both are metadata — no content, no identity beyond the token
|
|
42
|
+
// the request already carries.
|
|
43
|
+
export const CLIENT_VERSION_HEADER = "x-foo-client-version";
|
|
44
|
+
export const LATEST_VERSION_HEADER = "x-foo-latest-version";
|
|
45
|
+
// What a human types. It used to be the raw `npm install -g github:…` string —
|
|
46
|
+
// which told them the truth and then made them go do the work: select a long
|
|
47
|
+
// line out of a terminal, trust it, paste it. Telling someone they are behind
|
|
48
|
+
// and handing them homework is most of the way to telling them nothing. `foo
|
|
49
|
+
// update` is one word, and it is the same install underneath (see
|
|
50
|
+
// commands/update.ts, which installs the published package pinned to the
|
|
51
|
+
// version the server named).
|
|
52
|
+
export const UPDATE_COMMAND = "foo update";
|
|
53
|
+
// Telling someone they are behind, without telling them what they would get, is
|
|
54
|
+
// a nag. The changelog lives on npm's page for the published package — the
|
|
55
|
+
// distribution-target contract resolves the name — so this URL resolves for
|
|
56
|
+
// exactly the people who can already install it, and it never names the
|
|
57
|
+
// retired dist repository.
|
|
58
|
+
export const CHANGELOG_URL = `https://www.npmjs.com/package/${distributionPackageName()}`;
|
|
59
|
+
// Pure decision: given what is running, what is current, what we last said, and
|
|
60
|
+
// whether anyone is listening, should we say anything now? Every state is
|
|
61
|
+
// unit-testable without a server, a clock, a terminal, or a home directory.
|
|
62
|
+
//
|
|
63
|
+
// FIRST, is a human even there? This is the bug that made the whole notice
|
|
64
|
+
// useless, and it is worth being precise about, because every other rule below
|
|
65
|
+
// was already right.
|
|
66
|
+
//
|
|
67
|
+
// The notice is rationed: one line per build, plus one per day. That ration was
|
|
68
|
+
// being spent by whichever process happened to run `foo` first — and in real
|
|
69
|
+
// use that is almost never a person. It is a hook, an agent, a pipe, a script:
|
|
70
|
+
// runs whose stderr goes into a transcript nobody reads. That run printed the
|
|
71
|
+
// line into the void, wrote "told them" to the state file, and every later run
|
|
72
|
+
// — including the one where the owner was actually sitting at the terminal —
|
|
73
|
+
// read that state and stayed quiet. productfoo was telling the truth, once a day, to
|
|
74
|
+
// nobody. The owner sat on 0.1.18 for a day with 0.1.19 published and never saw
|
|
75
|
+
// a word, and the state file said she had been told.
|
|
76
|
+
//
|
|
77
|
+
// So the ration is spent only where it can land: an attended terminal. A
|
|
78
|
+
// non-interactive run neither speaks NOR records — it must not consume a line
|
|
79
|
+
// on the human's behalf. Not speaking here costs nothing: an agent cannot
|
|
80
|
+
// choose to update, and the human it is working for will be told on their next
|
|
81
|
+
// real command.
|
|
82
|
+
//
|
|
83
|
+
// Then two things wake the notice up, and staying quiet requires BOTH to be false:
|
|
84
|
+
//
|
|
85
|
+
// 1. A NEW BUILD. If the version we last spoke about is not the one that is
|
|
86
|
+
// now current, foo speaks — even if it already spoke today. Being told
|
|
87
|
+
// about 0.1.17 this morning is not being told about 0.1.18 this afternoon,
|
|
88
|
+
// and the old rule ("once a day, whatever changed") silently swallowed the
|
|
89
|
+
// second release of the day. Releases have shipped four-in-an-evening here.
|
|
90
|
+
//
|
|
91
|
+
// 2. A NEW DAY. If they were told and still have not updated, foo tells them
|
|
92
|
+
// again tomorrow, and every day after, until they do. A tester sat on a
|
|
93
|
+
// broken build for days because nothing ever spoke twice.
|
|
94
|
+
//
|
|
95
|
+
// It stays quiet only when it has already spoken about THIS build TODAY — so
|
|
96
|
+
// the ceiling is one line per new build, plus one per day. Noisier than before,
|
|
97
|
+
// deliberately, and still never more than once per run.
|
|
98
|
+
export function updateNoticePlan(input) {
|
|
99
|
+
const { running, latest, lastNotifiedDay, lastNotifiedVersion, lastNotifiedSession, today, session, audience } = input;
|
|
100
|
+
// A pipe productfoo cannot reach: stay silent and record nothing, exactly as before.
|
|
101
|
+
if (audience === "none")
|
|
102
|
+
return { notify: false, line: null };
|
|
103
|
+
if (!latest)
|
|
104
|
+
return { notify: false, line: null };
|
|
105
|
+
// Numeric compare, not lexical: "0.1.10" sorts BELOW "0.1.6" as a string, and
|
|
106
|
+
// a stale client would be told it was current — the exact bug this prevents.
|
|
107
|
+
// Up to date is the ONE state that is always silent: a nag someone cannot act
|
|
108
|
+
// on is the fastest way to teach them to ignore the channel entirely.
|
|
109
|
+
if (compareVersions(running, latest) >= 0)
|
|
110
|
+
return { notify: false, line: null };
|
|
111
|
+
const spokeAboutThisBuild = (lastNotifiedVersion ?? null) === latest;
|
|
112
|
+
if (audience === "agent") {
|
|
113
|
+
// The agent case is rationed by SESSION, not day: an agent-only user has no
|
|
114
|
+
// stderr backstop, so a decline must come back the next session (D-002). A
|
|
115
|
+
// new build always speaks; otherwise it speaks once per session.
|
|
116
|
+
const sameSession = (lastNotifiedSession ?? null) === session;
|
|
117
|
+
if (spokeAboutThisBuild && sameSession)
|
|
118
|
+
return { notify: false, line: null };
|
|
119
|
+
// Addressed to the agent, phrased as an offer it surfaces to its human — not
|
|
120
|
+
// a bare "you're behind" line, which would just move the homework onto the
|
|
121
|
+
// person `foo update` was created to spare (R-003).
|
|
122
|
+
const line = `[foo → the human you're working for] A newer productfoo is available (${running} → ${latest}). ` +
|
|
123
|
+
`Ask them whether to run \`foo update\`, and run it only on their yes — never silently. ` +
|
|
124
|
+
`What's new: ${CHANGELOG_URL}`;
|
|
125
|
+
return { notify: true, line, audience: "agent" };
|
|
126
|
+
}
|
|
127
|
+
// audience === "human": the interactive terminal offer, rationed per build per day.
|
|
128
|
+
const spokeToday = lastNotifiedDay === today;
|
|
129
|
+
if (spokeAboutThisBuild && spokeToday)
|
|
130
|
+
return { notify: false, line: null };
|
|
131
|
+
// Say plainly that they are still behind when this is not the first time —
|
|
132
|
+
// the repeat is the point, and a line that reads identically to yesterday's
|
|
133
|
+
// is a line that gets skimmed.
|
|
134
|
+
const again = spokeAboutThisBuild && !spokeToday;
|
|
135
|
+
const head = again
|
|
136
|
+
? `foo ${running} → ${latest} is available. You're still on an old build.`
|
|
137
|
+
: `foo ${running} → ${latest} is available.`;
|
|
138
|
+
return {
|
|
139
|
+
notify: true,
|
|
140
|
+
line: `${head} Update: ${UPDATE_COMMAND}\nWhat's new: ${CHANGELOG_URL}`,
|
|
141
|
+
audience: "human",
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function stateDir() {
|
|
145
|
+
return process.env.FOO_STATE_DIR?.trim() || path.join(homedir(), ".foo");
|
|
146
|
+
}
|
|
147
|
+
function statePath() {
|
|
148
|
+
return path.join(stateDir(), "update-check.json");
|
|
149
|
+
}
|
|
150
|
+
function readState() {
|
|
151
|
+
return readJsonSafe(statePath(), {});
|
|
152
|
+
}
|
|
153
|
+
function writeState(state) {
|
|
154
|
+
try {
|
|
155
|
+
mkdirSync(stateDir(), { recursive: true });
|
|
156
|
+
writeFileSync(statePath(), `${JSON.stringify(state)}\n`);
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
// A home dir we cannot write is not a reason to fail a command. Worst case
|
|
160
|
+
// the notice repeats — annoying, never broken.
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// The LOCAL calendar day, not the UTC one. "They still have not updated by the
|
|
164
|
+
// morning, so tell them again" is a statement about the user's morning. With
|
|
165
|
+
// toISOString() the day rolled over at 4-5pm in California — so the "next day"
|
|
166
|
+
// reminder fired the same evening, and a real morning could pass in silence.
|
|
167
|
+
export function localDay(now = new Date()) {
|
|
168
|
+
const year = now.getFullYear();
|
|
169
|
+
const month = String(now.getMonth() + 1).padStart(2, "0");
|
|
170
|
+
const day = String(now.getDate()).padStart(2, "0");
|
|
171
|
+
return `${year}-${month}-${day}`;
|
|
172
|
+
}
|
|
173
|
+
// Is a person going to see this line? stderr is the surface the notice writes
|
|
174
|
+
// to, so stderr is the surface that decides — not stdout, which is routinely
|
|
175
|
+
// piped (`foo doctor --json | jq`) by a human who is still sitting right there.
|
|
176
|
+
//
|
|
177
|
+
// The env override exists because "is anyone watching" is the one thing a
|
|
178
|
+
// program cannot be certain of: FOO_UPDATE_NOTICE=always to force the line
|
|
179
|
+
// (how this fix was verified — a TTY is hard to fake from a test harness),
|
|
180
|
+
// never to silence it for good.
|
|
181
|
+
export function noticeAudienceIsHuman(env = process.env, stderrIsTty = process.stderr.isTTY) {
|
|
182
|
+
const forced = (env.FOO_UPDATE_NOTICE ?? "").trim().toLowerCase();
|
|
183
|
+
if (forced === "always")
|
|
184
|
+
return true;
|
|
185
|
+
if (forced === "never")
|
|
186
|
+
return false;
|
|
187
|
+
return Boolean(stderrIsTty);
|
|
188
|
+
}
|
|
189
|
+
// Three-way audience for the notice. Human at a TTY → the interactive offer. Not
|
|
190
|
+
// a TTY but a harness marker is set (or FOO_HANDOFF=always) → the agent that ran
|
|
191
|
+
// productfoo is reading, so relay to it. Not a TTY and no marker → a bare pipe foo
|
|
192
|
+
// cannot reach; stay silent (D-003). Reuses the same marker list and the same
|
|
193
|
+
// FOO_HANDOFF / FOO_UPDATE_NOTICE overrides as the rest of foo — not a new
|
|
194
|
+
// detector, and the strict "positively an agent" check, not handoffEnabled's
|
|
195
|
+
// broader "anything that is not a TTY".
|
|
196
|
+
export function noticeAudience(env = process.env, stderrIsTty = process.stderr.isTTY) {
|
|
197
|
+
const forced = (env.FOO_UPDATE_NOTICE ?? "").trim().toLowerCase();
|
|
198
|
+
if (forced === "never")
|
|
199
|
+
return "none";
|
|
200
|
+
if (forced === "always")
|
|
201
|
+
return "human";
|
|
202
|
+
if (stderrIsTty)
|
|
203
|
+
return "human";
|
|
204
|
+
if (env.FOO_HANDOFF === "never")
|
|
205
|
+
return "none";
|
|
206
|
+
if (env.FOO_HANDOFF === "always")
|
|
207
|
+
return "agent";
|
|
208
|
+
return harnessMarkerPresent(env) ? "agent" : "none";
|
|
209
|
+
}
|
|
210
|
+
// The unit the agent-relay ration re-arms on. There is no portable "agent session
|
|
211
|
+
// id" env across harnesses (OQ-1), so productfoo uses the process that spawned it —
|
|
212
|
+
// stable for the life of one agent session, different in the next — with an
|
|
213
|
+
// explicit FOO_SESSION_ID override for a harness that can name its session (and
|
|
214
|
+
// for tests). Named here, not guessed, per T-002.
|
|
215
|
+
export function currentSession(env = process.env) {
|
|
216
|
+
const explicit = (env.FOO_SESSION_ID ?? "").trim();
|
|
217
|
+
return explicit || `ppid:${process.ppid}`;
|
|
218
|
+
}
|
|
219
|
+
// What the server told us, held until the run is over.
|
|
220
|
+
//
|
|
221
|
+
// It is not printed the moment we learn it, and that is deliberate. We learn it
|
|
222
|
+
// from a response to a request the command was already making — which can land
|
|
223
|
+
// anywhere, including halfway through a skill fetch, in the middle of someone's
|
|
224
|
+
// work. A LINE there is merely untidy. A QUESTION there ("install it now?") is
|
|
225
|
+
// an interruption, and productfoo does not stop mid-task to ask a favour. So the news
|
|
226
|
+
// is parked here, and `offerUpdate()` (commands/update.ts) settles it as the
|
|
227
|
+
// last thing the run does — the same posture as the error-report ask, for the
|
|
228
|
+
// same reason.
|
|
229
|
+
let pending = null;
|
|
230
|
+
// Test seam: module state outlives a single in-process main(), and the suite
|
|
231
|
+
// calls main() many times.
|
|
232
|
+
export function resetPendingUpdate() {
|
|
233
|
+
pending = null;
|
|
234
|
+
}
|
|
235
|
+
export function pendingUpdate() {
|
|
236
|
+
return pending;
|
|
237
|
+
}
|
|
238
|
+
// Called with whatever the server said (or didn't) on any response the client
|
|
239
|
+
// already makes. Decides, records nothing, prints nothing, and swallows
|
|
240
|
+
// everything.
|
|
241
|
+
export function noteLatestVersion(latest, running) {
|
|
242
|
+
try {
|
|
243
|
+
if (!latest || !running || running === "unknown")
|
|
244
|
+
return;
|
|
245
|
+
const current = latest.trim() || null;
|
|
246
|
+
const state = readState();
|
|
247
|
+
const audience = noticeAudience();
|
|
248
|
+
// Feed each regime its OWN recorded version so one never rations the other:
|
|
249
|
+
// the agent branch reads `last_relayed_version`, the human branch reads
|
|
250
|
+
// `last_notified_version`.
|
|
251
|
+
const plan = updateNoticePlan({
|
|
252
|
+
running,
|
|
253
|
+
latest: current,
|
|
254
|
+
lastNotifiedDay: state.last_notified_day ?? null,
|
|
255
|
+
lastNotifiedVersion: audience === "agent" ? (state.last_relayed_version ?? null) : (state.last_notified_version ?? null),
|
|
256
|
+
lastNotifiedSession: state.last_relayed_session ?? null,
|
|
257
|
+
today: localDay(),
|
|
258
|
+
session: currentSession(),
|
|
259
|
+
audience,
|
|
260
|
+
});
|
|
261
|
+
if (!plan.notify || !plan.line || !current)
|
|
262
|
+
return;
|
|
263
|
+
pending = { running, latest: current, line: plan.line, audience: plan.audience ?? "human" };
|
|
264
|
+
}
|
|
265
|
+
catch {
|
|
266
|
+
// Never let the update notice change what the CLI was asked to do.
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
// We spoke about this build today — whether we printed a line or asked a
|
|
270
|
+
// question, and whether the answer was yes or no. Recorded WITH the version, not
|
|
271
|
+
// just the day: a release that lands an hour after we spoke must still get its
|
|
272
|
+
// own line, and this repo has shipped four releases in one evening.
|
|
273
|
+
export function recordUpdateSpoken(latest) {
|
|
274
|
+
writeState({ ...readState(), last_notified_day: localDay(), last_notified_version: latest });
|
|
275
|
+
}
|
|
276
|
+
// The agent relay's own record. Session-rationed, and kept in fields the human
|
|
277
|
+
// day-ration never reads, so relaying through an agent never spends the line the
|
|
278
|
+
// person at the terminal is owed.
|
|
279
|
+
export function recordRelaySpoken(latest, session = currentSession()) {
|
|
280
|
+
writeState({ ...readState(), last_relayed_version: latest, last_relayed_session: session });
|
|
281
|
+
}
|
|
282
|
+
// `headers.get()` on a fetch Response, tolerant of a server that predates this.
|
|
283
|
+
export function latestFromResponse(res) {
|
|
284
|
+
try {
|
|
285
|
+
return res.headers.get(LATEST_VERSION_HEADER);
|
|
286
|
+
}
|
|
287
|
+
catch {
|
|
288
|
+
return null;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { parse, stringify, YAMLParseError } from "yaml";
|