@indigoai-us/hq-cli 5.128.0 → 5.129.0
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 +13 -0
- package/dist/command-catalog.generated.d.ts +169 -0
- package/dist/command-catalog.generated.js +221 -0
- package/dist/command-registration-plan.d.ts +6 -0
- package/dist/command-registration-plan.js +1 -0
- package/dist/commands/report.d.ts +16 -0
- package/dist/commands/report.js +310 -0
- package/dist/lib/report-publish.d.ts +173 -0
- package/dist/lib/report-publish.js +381 -0
- package/dist/lib/report-run.d.ts +61 -0
- package/dist/lib/report-run.js +123 -0
- package/dist/lib/report-templates.d.ts +10 -0
- package/dist/lib/report-templates.js +24 -0
- package/package.json +2 -1
- package/templates/reports/blank.md +3 -0
- package/templates/reports/daily-digest.md +11 -0
- package/templates/runbooks/update-report.md +21 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [5.129.0] — 2026-09-22
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `hq report` publishes a channel report folder to a fixed hq-deploy slug,
|
|
10
|
+
injects a strict Content-Security-Policy, and writes the run back onto the
|
|
11
|
+
report record. The same command group covers draft publish, promote,
|
|
12
|
+
discard-draft, access, adopt (install the bot's own job), and decommission.
|
|
13
|
+
|
|
14
|
+
- `hq report templates --json` lists the shipped report templates
|
|
15
|
+
(`daily-digest`, `blank`). The cloud job prompt is the `update-report`
|
|
16
|
+
runbook stored in `templates/runbooks/update-report.md`.
|
|
17
|
+
|
|
5
18
|
## [5.128.0] — 2026-09-22
|
|
6
19
|
|
|
7
20
|
### Fixed
|
|
@@ -7622,5 +7622,174 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
7622
7622
|
readonly subcommands: readonly [];
|
|
7623
7623
|
}];
|
|
7624
7624
|
}];
|
|
7625
|
+
}, {
|
|
7626
|
+
readonly name: "report";
|
|
7627
|
+
readonly description: "Publish and manage a channel report owned by this bot.";
|
|
7628
|
+
readonly aliases: readonly [];
|
|
7629
|
+
readonly hidden: false;
|
|
7630
|
+
readonly usage: "[options] [command]";
|
|
7631
|
+
readonly arguments: readonly [];
|
|
7632
|
+
readonly options: readonly [];
|
|
7633
|
+
readonly subcommands: readonly [{
|
|
7634
|
+
readonly name: "get";
|
|
7635
|
+
readonly description: "";
|
|
7636
|
+
readonly aliases: readonly [];
|
|
7637
|
+
readonly hidden: false;
|
|
7638
|
+
readonly usage: "[options] <reportId>";
|
|
7639
|
+
readonly arguments: readonly [{
|
|
7640
|
+
readonly name: "reportId";
|
|
7641
|
+
readonly required: true;
|
|
7642
|
+
readonly variadic: false;
|
|
7643
|
+
}];
|
|
7644
|
+
readonly options: readonly [{
|
|
7645
|
+
readonly flags: "--json";
|
|
7646
|
+
readonly description: "";
|
|
7647
|
+
}, {
|
|
7648
|
+
readonly flags: "--channel <channelId>";
|
|
7649
|
+
readonly description: "report channel context (or set HQ_REPORT_CHANNEL_ID)";
|
|
7650
|
+
}];
|
|
7651
|
+
readonly subcommands: readonly [];
|
|
7652
|
+
}, {
|
|
7653
|
+
readonly name: "publish";
|
|
7654
|
+
readonly description: "";
|
|
7655
|
+
readonly aliases: readonly [];
|
|
7656
|
+
readonly hidden: false;
|
|
7657
|
+
readonly usage: "[options] <reportId>";
|
|
7658
|
+
readonly arguments: readonly [{
|
|
7659
|
+
readonly name: "reportId";
|
|
7660
|
+
readonly required: true;
|
|
7661
|
+
readonly variadic: false;
|
|
7662
|
+
}];
|
|
7663
|
+
readonly options: readonly [{
|
|
7664
|
+
readonly flags: "--dir <path>";
|
|
7665
|
+
readonly description: "";
|
|
7666
|
+
}, {
|
|
7667
|
+
readonly flags: "--draft";
|
|
7668
|
+
readonly description: "";
|
|
7669
|
+
}, {
|
|
7670
|
+
readonly flags: "--json";
|
|
7671
|
+
readonly description: "";
|
|
7672
|
+
}, {
|
|
7673
|
+
readonly flags: "--channel <channelId>";
|
|
7674
|
+
readonly description: "report channel context (or set HQ_REPORT_CHANNEL_ID)";
|
|
7675
|
+
}];
|
|
7676
|
+
readonly subcommands: readonly [];
|
|
7677
|
+
}, {
|
|
7678
|
+
readonly name: "promote";
|
|
7679
|
+
readonly description: "";
|
|
7680
|
+
readonly aliases: readonly [];
|
|
7681
|
+
readonly hidden: false;
|
|
7682
|
+
readonly usage: "[options] <reportId>";
|
|
7683
|
+
readonly arguments: readonly [{
|
|
7684
|
+
readonly name: "reportId";
|
|
7685
|
+
readonly required: true;
|
|
7686
|
+
readonly variadic: false;
|
|
7687
|
+
}];
|
|
7688
|
+
readonly options: readonly [{
|
|
7689
|
+
readonly flags: "--dir <path>";
|
|
7690
|
+
readonly description: "report folder; defaults to <workerDir>/reports/<reportId>";
|
|
7691
|
+
}, {
|
|
7692
|
+
readonly flags: "--json";
|
|
7693
|
+
readonly description: "";
|
|
7694
|
+
}, {
|
|
7695
|
+
readonly flags: "--channel <channelId>";
|
|
7696
|
+
readonly description: "report channel context (or set HQ_REPORT_CHANNEL_ID)";
|
|
7697
|
+
}];
|
|
7698
|
+
readonly subcommands: readonly [];
|
|
7699
|
+
}, {
|
|
7700
|
+
readonly name: "discard-draft";
|
|
7701
|
+
readonly description: "";
|
|
7702
|
+
readonly aliases: readonly [];
|
|
7703
|
+
readonly hidden: false;
|
|
7704
|
+
readonly usage: "[options] <reportId>";
|
|
7705
|
+
readonly arguments: readonly [{
|
|
7706
|
+
readonly name: "reportId";
|
|
7707
|
+
readonly required: true;
|
|
7708
|
+
readonly variadic: false;
|
|
7709
|
+
}];
|
|
7710
|
+
readonly options: readonly [{
|
|
7711
|
+
readonly flags: "--json";
|
|
7712
|
+
readonly description: "";
|
|
7713
|
+
}, {
|
|
7714
|
+
readonly flags: "--channel <channelId>";
|
|
7715
|
+
readonly description: "report channel context (or set HQ_REPORT_CHANNEL_ID)";
|
|
7716
|
+
}];
|
|
7717
|
+
readonly subcommands: readonly [];
|
|
7718
|
+
}, {
|
|
7719
|
+
readonly name: "access";
|
|
7720
|
+
readonly description: "";
|
|
7721
|
+
readonly aliases: readonly [];
|
|
7722
|
+
readonly hidden: false;
|
|
7723
|
+
readonly usage: "[options] <reportId>";
|
|
7724
|
+
readonly arguments: readonly [{
|
|
7725
|
+
readonly name: "reportId";
|
|
7726
|
+
readonly required: true;
|
|
7727
|
+
readonly variadic: false;
|
|
7728
|
+
}];
|
|
7729
|
+
readonly options: readonly [{
|
|
7730
|
+
readonly flags: "--mode <mode>";
|
|
7731
|
+
readonly description: "company|selected|password|public";
|
|
7732
|
+
}, {
|
|
7733
|
+
readonly flags: "--password <password>";
|
|
7734
|
+
readonly description: "";
|
|
7735
|
+
}, {
|
|
7736
|
+
readonly flags: "--json";
|
|
7737
|
+
readonly description: "";
|
|
7738
|
+
}, {
|
|
7739
|
+
readonly flags: "--channel <channelId>";
|
|
7740
|
+
readonly description: "report channel context (or set HQ_REPORT_CHANNEL_ID)";
|
|
7741
|
+
}];
|
|
7742
|
+
readonly subcommands: readonly [];
|
|
7743
|
+
}, {
|
|
7744
|
+
readonly name: "decommission";
|
|
7745
|
+
readonly description: "";
|
|
7746
|
+
readonly aliases: readonly [];
|
|
7747
|
+
readonly hidden: false;
|
|
7748
|
+
readonly usage: "[options] <reportId>";
|
|
7749
|
+
readonly arguments: readonly [{
|
|
7750
|
+
readonly name: "reportId";
|
|
7751
|
+
readonly required: true;
|
|
7752
|
+
readonly variadic: false;
|
|
7753
|
+
}];
|
|
7754
|
+
readonly options: readonly [{
|
|
7755
|
+
readonly flags: "--json";
|
|
7756
|
+
readonly description: "";
|
|
7757
|
+
}, {
|
|
7758
|
+
readonly flags: "--channel <channelId>";
|
|
7759
|
+
readonly description: "report channel context (or set HQ_REPORT_CHANNEL_ID)";
|
|
7760
|
+
}];
|
|
7761
|
+
readonly subcommands: readonly [];
|
|
7762
|
+
}, {
|
|
7763
|
+
readonly name: "adopt";
|
|
7764
|
+
readonly description: "";
|
|
7765
|
+
readonly aliases: readonly [];
|
|
7766
|
+
readonly hidden: false;
|
|
7767
|
+
readonly usage: "[options] <reportId>";
|
|
7768
|
+
readonly arguments: readonly [{
|
|
7769
|
+
readonly name: "reportId";
|
|
7770
|
+
readonly required: true;
|
|
7771
|
+
readonly variadic: false;
|
|
7772
|
+
}];
|
|
7773
|
+
readonly options: readonly [{
|
|
7774
|
+
readonly flags: "--json";
|
|
7775
|
+
readonly description: "";
|
|
7776
|
+
}, {
|
|
7777
|
+
readonly flags: "--channel <channelId>";
|
|
7778
|
+
readonly description: "report channel context (or set HQ_REPORT_CHANNEL_ID)";
|
|
7779
|
+
}];
|
|
7780
|
+
readonly subcommands: readonly [];
|
|
7781
|
+
}, {
|
|
7782
|
+
readonly name: "templates";
|
|
7783
|
+
readonly description: "";
|
|
7784
|
+
readonly aliases: readonly [];
|
|
7785
|
+
readonly hidden: false;
|
|
7786
|
+
readonly usage: "[options]";
|
|
7787
|
+
readonly arguments: readonly [];
|
|
7788
|
+
readonly options: readonly [{
|
|
7789
|
+
readonly flags: "--json";
|
|
7790
|
+
readonly description: "";
|
|
7791
|
+
}];
|
|
7792
|
+
readonly subcommands: readonly [];
|
|
7793
|
+
}];
|
|
7625
7794
|
}];
|
|
7626
7795
|
//# sourceMappingURL=command-catalog.generated.d.ts.map
|
|
@@ -9860,6 +9860,227 @@ export const COMMAND_CATALOG = [
|
|
|
9860
9860
|
]
|
|
9861
9861
|
}
|
|
9862
9862
|
]
|
|
9863
|
+
},
|
|
9864
|
+
{
|
|
9865
|
+
"name": "report",
|
|
9866
|
+
"description": "Publish and manage a channel report owned by this bot.",
|
|
9867
|
+
"aliases": [],
|
|
9868
|
+
"hidden": false,
|
|
9869
|
+
"usage": "[options] [command]",
|
|
9870
|
+
"arguments": [],
|
|
9871
|
+
"options": [],
|
|
9872
|
+
"subcommands": [
|
|
9873
|
+
{
|
|
9874
|
+
"name": "get",
|
|
9875
|
+
"description": "",
|
|
9876
|
+
"aliases": [],
|
|
9877
|
+
"hidden": false,
|
|
9878
|
+
"usage": "[options] <reportId>",
|
|
9879
|
+
"arguments": [
|
|
9880
|
+
{
|
|
9881
|
+
"name": "reportId",
|
|
9882
|
+
"required": true,
|
|
9883
|
+
"variadic": false
|
|
9884
|
+
}
|
|
9885
|
+
],
|
|
9886
|
+
"options": [
|
|
9887
|
+
{
|
|
9888
|
+
"flags": "--json",
|
|
9889
|
+
"description": ""
|
|
9890
|
+
},
|
|
9891
|
+
{
|
|
9892
|
+
"flags": "--channel <channelId>",
|
|
9893
|
+
"description": "report channel context (or set HQ_REPORT_CHANNEL_ID)"
|
|
9894
|
+
}
|
|
9895
|
+
],
|
|
9896
|
+
"subcommands": []
|
|
9897
|
+
},
|
|
9898
|
+
{
|
|
9899
|
+
"name": "publish",
|
|
9900
|
+
"description": "",
|
|
9901
|
+
"aliases": [],
|
|
9902
|
+
"hidden": false,
|
|
9903
|
+
"usage": "[options] <reportId>",
|
|
9904
|
+
"arguments": [
|
|
9905
|
+
{
|
|
9906
|
+
"name": "reportId",
|
|
9907
|
+
"required": true,
|
|
9908
|
+
"variadic": false
|
|
9909
|
+
}
|
|
9910
|
+
],
|
|
9911
|
+
"options": [
|
|
9912
|
+
{
|
|
9913
|
+
"flags": "--dir <path>",
|
|
9914
|
+
"description": ""
|
|
9915
|
+
},
|
|
9916
|
+
{
|
|
9917
|
+
"flags": "--draft",
|
|
9918
|
+
"description": ""
|
|
9919
|
+
},
|
|
9920
|
+
{
|
|
9921
|
+
"flags": "--json",
|
|
9922
|
+
"description": ""
|
|
9923
|
+
},
|
|
9924
|
+
{
|
|
9925
|
+
"flags": "--channel <channelId>",
|
|
9926
|
+
"description": "report channel context (or set HQ_REPORT_CHANNEL_ID)"
|
|
9927
|
+
}
|
|
9928
|
+
],
|
|
9929
|
+
"subcommands": []
|
|
9930
|
+
},
|
|
9931
|
+
{
|
|
9932
|
+
"name": "promote",
|
|
9933
|
+
"description": "",
|
|
9934
|
+
"aliases": [],
|
|
9935
|
+
"hidden": false,
|
|
9936
|
+
"usage": "[options] <reportId>",
|
|
9937
|
+
"arguments": [
|
|
9938
|
+
{
|
|
9939
|
+
"name": "reportId",
|
|
9940
|
+
"required": true,
|
|
9941
|
+
"variadic": false
|
|
9942
|
+
}
|
|
9943
|
+
],
|
|
9944
|
+
"options": [
|
|
9945
|
+
{
|
|
9946
|
+
"flags": "--dir <path>",
|
|
9947
|
+
"description": "report folder; defaults to <workerDir>/reports/<reportId>"
|
|
9948
|
+
},
|
|
9949
|
+
{
|
|
9950
|
+
"flags": "--json",
|
|
9951
|
+
"description": ""
|
|
9952
|
+
},
|
|
9953
|
+
{
|
|
9954
|
+
"flags": "--channel <channelId>",
|
|
9955
|
+
"description": "report channel context (or set HQ_REPORT_CHANNEL_ID)"
|
|
9956
|
+
}
|
|
9957
|
+
],
|
|
9958
|
+
"subcommands": []
|
|
9959
|
+
},
|
|
9960
|
+
{
|
|
9961
|
+
"name": "discard-draft",
|
|
9962
|
+
"description": "",
|
|
9963
|
+
"aliases": [],
|
|
9964
|
+
"hidden": false,
|
|
9965
|
+
"usage": "[options] <reportId>",
|
|
9966
|
+
"arguments": [
|
|
9967
|
+
{
|
|
9968
|
+
"name": "reportId",
|
|
9969
|
+
"required": true,
|
|
9970
|
+
"variadic": false
|
|
9971
|
+
}
|
|
9972
|
+
],
|
|
9973
|
+
"options": [
|
|
9974
|
+
{
|
|
9975
|
+
"flags": "--json",
|
|
9976
|
+
"description": ""
|
|
9977
|
+
},
|
|
9978
|
+
{
|
|
9979
|
+
"flags": "--channel <channelId>",
|
|
9980
|
+
"description": "report channel context (or set HQ_REPORT_CHANNEL_ID)"
|
|
9981
|
+
}
|
|
9982
|
+
],
|
|
9983
|
+
"subcommands": []
|
|
9984
|
+
},
|
|
9985
|
+
{
|
|
9986
|
+
"name": "access",
|
|
9987
|
+
"description": "",
|
|
9988
|
+
"aliases": [],
|
|
9989
|
+
"hidden": false,
|
|
9990
|
+
"usage": "[options] <reportId>",
|
|
9991
|
+
"arguments": [
|
|
9992
|
+
{
|
|
9993
|
+
"name": "reportId",
|
|
9994
|
+
"required": true,
|
|
9995
|
+
"variadic": false
|
|
9996
|
+
}
|
|
9997
|
+
],
|
|
9998
|
+
"options": [
|
|
9999
|
+
{
|
|
10000
|
+
"flags": "--mode <mode>",
|
|
10001
|
+
"description": "company|selected|password|public"
|
|
10002
|
+
},
|
|
10003
|
+
{
|
|
10004
|
+
"flags": "--password <password>",
|
|
10005
|
+
"description": ""
|
|
10006
|
+
},
|
|
10007
|
+
{
|
|
10008
|
+
"flags": "--json",
|
|
10009
|
+
"description": ""
|
|
10010
|
+
},
|
|
10011
|
+
{
|
|
10012
|
+
"flags": "--channel <channelId>",
|
|
10013
|
+
"description": "report channel context (or set HQ_REPORT_CHANNEL_ID)"
|
|
10014
|
+
}
|
|
10015
|
+
],
|
|
10016
|
+
"subcommands": []
|
|
10017
|
+
},
|
|
10018
|
+
{
|
|
10019
|
+
"name": "decommission",
|
|
10020
|
+
"description": "",
|
|
10021
|
+
"aliases": [],
|
|
10022
|
+
"hidden": false,
|
|
10023
|
+
"usage": "[options] <reportId>",
|
|
10024
|
+
"arguments": [
|
|
10025
|
+
{
|
|
10026
|
+
"name": "reportId",
|
|
10027
|
+
"required": true,
|
|
10028
|
+
"variadic": false
|
|
10029
|
+
}
|
|
10030
|
+
],
|
|
10031
|
+
"options": [
|
|
10032
|
+
{
|
|
10033
|
+
"flags": "--json",
|
|
10034
|
+
"description": ""
|
|
10035
|
+
},
|
|
10036
|
+
{
|
|
10037
|
+
"flags": "--channel <channelId>",
|
|
10038
|
+
"description": "report channel context (or set HQ_REPORT_CHANNEL_ID)"
|
|
10039
|
+
}
|
|
10040
|
+
],
|
|
10041
|
+
"subcommands": []
|
|
10042
|
+
},
|
|
10043
|
+
{
|
|
10044
|
+
"name": "adopt",
|
|
10045
|
+
"description": "",
|
|
10046
|
+
"aliases": [],
|
|
10047
|
+
"hidden": false,
|
|
10048
|
+
"usage": "[options] <reportId>",
|
|
10049
|
+
"arguments": [
|
|
10050
|
+
{
|
|
10051
|
+
"name": "reportId",
|
|
10052
|
+
"required": true,
|
|
10053
|
+
"variadic": false
|
|
10054
|
+
}
|
|
10055
|
+
],
|
|
10056
|
+
"options": [
|
|
10057
|
+
{
|
|
10058
|
+
"flags": "--json",
|
|
10059
|
+
"description": ""
|
|
10060
|
+
},
|
|
10061
|
+
{
|
|
10062
|
+
"flags": "--channel <channelId>",
|
|
10063
|
+
"description": "report channel context (or set HQ_REPORT_CHANNEL_ID)"
|
|
10064
|
+
}
|
|
10065
|
+
],
|
|
10066
|
+
"subcommands": []
|
|
10067
|
+
},
|
|
10068
|
+
{
|
|
10069
|
+
"name": "templates",
|
|
10070
|
+
"description": "",
|
|
10071
|
+
"aliases": [],
|
|
10072
|
+
"hidden": false,
|
|
10073
|
+
"usage": "[options]",
|
|
10074
|
+
"arguments": [],
|
|
10075
|
+
"options": [
|
|
10076
|
+
{
|
|
10077
|
+
"flags": "--json",
|
|
10078
|
+
"description": ""
|
|
10079
|
+
}
|
|
10080
|
+
],
|
|
10081
|
+
"subcommands": []
|
|
10082
|
+
}
|
|
10083
|
+
]
|
|
9863
10084
|
}
|
|
9864
10085
|
];
|
|
9865
10086
|
//# sourceMappingURL=command-catalog.generated.js.map
|
|
@@ -413,6 +413,12 @@ export declare const REGISTRATION_PLAN: readonly [{
|
|
|
413
413
|
readonly parent: "program";
|
|
414
414
|
readonly module: "./commands/bot.js";
|
|
415
415
|
readonly exportName: "registerBotCommand";
|
|
416
|
+
}, {
|
|
417
|
+
readonly type: "registrar";
|
|
418
|
+
readonly root: "report";
|
|
419
|
+
readonly parent: "program";
|
|
420
|
+
readonly module: "./commands/report.js";
|
|
421
|
+
readonly exportName: "registerReportCommand";
|
|
416
422
|
}];
|
|
417
423
|
export declare function registerAllCommands(program: Command): Promise<void>;
|
|
418
424
|
export declare function registerCommandRoot(program: Command, root: string): Promise<boolean>;
|
|
@@ -71,6 +71,7 @@ export const REGISTRATION_PLAN = [
|
|
|
71
71
|
{ type: "registrar", root: "mesh", parent: "program", module: "./commands/mesh.js", exportName: "registerMeshCommand" },
|
|
72
72
|
{ type: "registrar", root: "lanes", parent: "program", module: "./commands/lanes.js", exportName: "registerLanesCommand", hidden: true },
|
|
73
73
|
{ type: "registrar", root: "bot", parent: "program", module: "./commands/bot.js", exportName: "registerBotCommand" },
|
|
74
|
+
{ type: "registrar", root: "report", parent: "program", module: "./commands/report.js", exportName: "registerReportCommand" },
|
|
74
75
|
];
|
|
75
76
|
async function executePlan(program, steps) {
|
|
76
77
|
const parents = new Map([["program", program]]);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** `hq report` — safe channel-report lifecycle commands for bot runbooks. */
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { buildReportTarball, deployOrgContext, type ChannelReport, type DeployAccessPolicy, type ReportDeployment, type ReportPatch } from "../lib/report-publish.js";
|
|
4
|
+
/** Explicit context has priority; discovery is the authenticated fallback for normal CLI use. */
|
|
5
|
+
export declare function resolveReport(token: string, reportId: string, requestedChannelId?: string): Promise<ChannelReport>;
|
|
6
|
+
export declare function patchReport(token: string, report: ChannelReport, patch: ReportPatch): Promise<ChannelReport>;
|
|
7
|
+
export declare function resolveCompanySlug(token: string, companyUid: string): Promise<string>;
|
|
8
|
+
export declare function deployReportStatic(token: string, input: {
|
|
9
|
+
slug: string;
|
|
10
|
+
files: Parameters<typeof buildReportTarball>[0];
|
|
11
|
+
access: DeployAccessPolicy;
|
|
12
|
+
org: ReturnType<typeof deployOrgContext>;
|
|
13
|
+
}): Promise<ReportDeployment>;
|
|
14
|
+
export declare function registerReportCommand(program: Command): void;
|
|
15
|
+
export declare function runReportCommand(action: () => Promise<void>): Promise<void>;
|
|
16
|
+
//# sourceMappingURL=report.d.ts.map
|